chore: fix circleci on vite build (#10214)

- Switch to pnpm based build
- Switch circleci from docker to machine to have more memory
- Fix frontend and backend tests

Fixes
https://linear.app/chatwoot/issue/CW-3610/fix-circle-ci-for-vite-build
---------

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Pranav <pranavrajs@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
Vishnu Narayanan
2024-10-07 15:27:41 +05:30
committed by GitHub
parent 0677d8763d
commit ee02923ace
54 changed files with 1130 additions and 1334 deletions

View File

@@ -1,18 +1,9 @@
import { shallowMount } from '@vue/test-utils';
import { createStore } from 'vuex';
import DateSeparator from '../DateSeparator.vue';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vuex from 'vuex';
import VueI18n from 'vue-i18n';
const localVue = createLocalVue();
import i18n from 'dashboard/i18n';
localVue.use(Vuex);
localVue.use(VueI18n);
const i18nConfig = new VueI18n({
locale: 'en',
messages: i18n,
});
describe('dateSeparator', () => {
describe('DateSeparator', () => {
let store = null;
let actions = null;
let modules = null;
@@ -23,22 +14,28 @@ describe('dateSeparator', () => {
modules = {
auth: {
namespaced: true,
getters: {
'appConfig/darkMode': () => 'light',
},
},
};
store = new Vuex.Store({
actions,
store = createStore({
modules,
actions,
});
dateSeparator = shallowMount(DateSeparator, {
store,
localVue,
propsData: { date: 'Nov 18, 2019' },
mocks: { $t: msg => msg },
i18n: i18nConfig,
global: {
plugins: [store],
mocks: {
$t: msg => msg, // Mocking $t function for translations
},
},
props: {
date: 'Nov 18, 2019',
},
});
});

View File

@@ -1,5 +1,14 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`DateSeparator > date separator snapshot 1`] = `
<div
class="date--separator text-slate-700"
data-v-b24b73fa=""
>
Nov 18, 2019
</div>
`;
exports[`dateSeparator > date separator snapshot 1`] = `
<div
class="date--separator text-slate-700"

View File

@@ -2,7 +2,7 @@
exports[`Spinner > matches snapshot 1`] = `
<span
class="spinner small "
class="spinner small"
data-v-3e416633=""
/>
`;