Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions webroot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"uuid": "^14.0.0",
"vue": "^3.5.35",
"vue-facing-decorator": "^3.0.4",
"vue-i18n": "10.0.8",
"vue-i18n": "^11.4.7",
"vue-responsiveness": "^0.2.5",
"vue-router": "^4.5.1",
"vue3-lazyload": "^0.4.2",
Expand All @@ -48,7 +48,6 @@
"@babel/core": "^7.29.7",
"@babel/polyfill": "^7.11.5",
"@babel/preset-env": "^7.29.7",
"@intlify/unplugin-vue-i18n": "^0.6.2",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/chai": "^4.2.11",
"@types/mocha": "^8.2.3",
Expand All @@ -69,12 +68,12 @@
"@vue/eslint-config-typescript": "^10.0.0",
"@vue/test-utils": "2.4.11",
"axe-core": "^4.12.0",
"babel-loader": "^8.2.2",
"babel-loader": "^10.1.1",
"babel-plugin-istanbul": "^6.1.1",
"chai": "^4.1.2",
"chai-match-pattern": "^1.3.0",
"chalk": "^4.1.2",
"cypress": "^14.5.2",
"cypress": "^15.17.0",
"cypress-axe": "^1.7.0",
"cypress-file-upload": "^5.0.8",
"cypress-localstorage-commands": "^2.3.0",
Expand All @@ -84,24 +83,24 @@
"eslint-plugin-vue": "^8.0.3",
"eslint-plugin-vue-a11y": "^0.0.31",
"eslint-plugin-vuejs-accessibility": "^1.1.0",
"express": "^4.22.1",
"express": "^5.2.1",
"favicons": "^7.3.0",
"favicons-webpack-plugin": "^6.0.1",
"flush-promises": "^1.0.2",
"inquirer": "^8.0.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"less-loader": "^13.0.0",
"lint-staged": "^16.4.0",
"moment-timezone": "^0.6.1",
"nyc": "^15.1.0",
"replace-in-file": "^5.0.2",
"sharp": "0.34.5",
"sinon": "^21.1.2",
"style-resources-loader": "^1.5.0",
"stylelint": "^13.3.0",
"stylelint": "^17.14.1",
"stylelint-config-rational-order": "^0.1.2",
"stylelint-config-standard": "^20.0.0",
"stylelint-webpack-plugin": "^1.2.3",
"stylelint-webpack-plugin": "^5.1.0",
"typescript": "~5.1.6"
},
"resolutions": {
Expand Down
4 changes: 3 additions & 1 deletion webroot/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import es from '@locales/es.json';
import { defaultLanguage } from '@/app.config';

const i18n = createI18n({
legacy: false,
globalInjection: true,
locale: defaultLanguage,
fallbackLocale: defaultLanguage,
warnHtmlInMessage: 'off',
warnHtmlMessage: false,
Comment thread
coderabbitai[bot] marked this conversation as resolved.
messages: {
en,
es,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('AdverseAction model', () => {
}
}
};
i18n.global.locale = 'en';
i18n.global.locale.value = 'en';
});
it('should create an AdverseAction model with expected defaults', () => {
const adverseAction = new AdverseAction();
Expand Down
2 changes: 1 addition & 1 deletion webroot/src/models/Compact/Compact.model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Compact model', () => {
}
}
};
i18n.global.locale = 'en';
i18n.global.locale.value = 'en';
});
it('should create a Compact with default values', () => {
const compact = new Compact();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Investigation model', () => {
}
}
};
i18n.global.locale = 'en';
i18n.global.locale.value = 'en';
});
it('should create an Investigation model with expected defaults', () => {
const investigation = new Investigation();
Expand Down
2 changes: 1 addition & 1 deletion webroot/src/models/License/License.model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('License model', () => {
}
}
};
i18n.global.locale = 'en';
i18n.global.locale.value = 'en';
});
it('should create a License with expected defaults', () => {
const license = new License();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('LicenseHistoryItem model', () => {
}
}
};
i18n.global.locale = 'en';
i18n.global.locale.value = 'en';
});
it('should create a LicenseHistoryItem with expected defaults', () => {
const licenseHistoryItem = new LicenseHistoryItem();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('PrivilegeAttestation model', () => {
}
}
};
i18n.global.locale = 'en';
i18n.global.locale.value = 'en';
});
it('should create a PrivilegeAttestation with expected defaults', () => {
const privilegeAttestation = new PrivilegeAttestation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('PrivilegePurchaseOption model', () => {
}
}
};
i18n.global.locale = 'en';
i18n.global.locale.value = 'en';
});
it('should create a PrivilegePurchaseOption with expected defaults', () => {
const privilegePurchaseOption = new PrivilegePurchaseOption();
Expand Down
10 changes: 2 additions & 8 deletions webroot/tests/helpers/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ beforeEach(() => {
const { tm: $tm, t: $t } = i18n.global;

// Force English locale for every test
(i18n.global as any).locale = 'en';
(i18n.global as any).fallbackLocale = 'en';
i18n.global.locale.value = 'en';
i18n.global.fallbackLocale.value = 'en';

// Force global setup since main.ts works differently for tests
(window as any).Vue = {
Expand Down Expand Up @@ -192,10 +192,7 @@ const mountShallow = async (component, mountConfig: any = {}) => {
],
mocks: {
$envConfig: mockEnvConfig,
// $auth: TODO,
$api: mockApi,
$t: sinon.spy(() => ''),
$i18n: { locale: 'en' },
$features: statsigClientMock,
$analytics: statsigClientMock,
},
Expand Down Expand Up @@ -245,10 +242,7 @@ const mountFull = async (component, mountConfig: any = {}) => {
],
mocks: {
$envConfig: mockEnvConfig,
// $auth: TODO,
$api: mockApi,
$t: sinon.spy(() => ''),
$i18n: { locale: 'en' },
$features: statsigClientMock,
$analytics: statsigClientMock,
},
Expand Down
Loading
Loading