Skip to content

Commit

Permalink
🐛 vue-dash: Fix unit tests in template (#1910)
Browse files Browse the repository at this point in the history
  • Loading branch information
deraw authored Apr 8, 2022
1 parent 8752b50 commit 72055d5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
- **template:** Correction du fichier `main.js` non supprimé ([#1905](https://github.com/assurance-maladie-digital/design-system/pull/1905)) ([15eed3b](https://github.com/assurance-maladie-digital/design-system/commit/15eed3bfd1c9c27d889440e25f1964b0cc941ae0))
- **template:** Correction des éléments de navigation dans l'en-tête ([#1906](https://github.com/assurance-maladie-digital/design-system/pull/1906)) ([723f7e6](https://github.com/assurance-maladie-digital/design-system/commit/723f7e608dc960cb5478365c00fd655e8237c028))
- **template:** Correction de la suppression des anciens fichiers ([#1907](https://github.com/assurance-maladie-digital/design-system/pull/1907)) ([fcfa312](https://github.com/assurance-maladie-digital/design-system/commit/fcfa312e71efafe9057ad2541919abd87a52ab63))
- **template:** Correction de la configuration des tests unitaires ([#1909](https://github.com/assurance-maladie-digital/design-system/pull/1909))
- **template:** Correction de la configuration des tests unitaires ([#1909](https://github.com/assurance-maladie-digital/design-system/pull/1909)) ([8752b50](https://github.com/assurance-maladie-digital/design-system/commit/8752b503ffc677b7966c6277e3e6f1f573795ff4))
- **template:** Correction des tests unitaires ([#1910](https://github.com/assurance-maladie-digital/design-system/pull/1910))

- 🎨 **Qualité de code**
- **global:** Amélioration de la qualité du code ([#1908](https://github.com/assurance-maladie-digital/design-system/pull/1908)) ([7a25f77](https://github.com/assurance-maladie-digital/design-system/commit/7a25f77243e5ea7a0a2a900d1c1ed08628b6d46b))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe('AppHeader', () => {
it('renders correctly', () => {
wrapper = mountComponent(AppHeader, {
mocks: {
$maintenanceEnabled: false,
$t: (key: string) => {
return key === 'components.layout.appHeader.navigationItems' ? [] : key;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,21 @@ let wrapper: Wrapper<Vue>;
describe('App', () => {
it('renders correctly', () => {
wrapper = mountComponent(App, {
router
router,
mocks: {
$maintenanceEnabled: false
}
});

expect(html(wrapper)).toMatchSnapshot();
});

it('renders correctly when maintenance is enabled', () => {
wrapper = mountComponent(App, {
router,
mocks: {
$maintenanceEnabled: true
}
});

expect(html(wrapper)).toMatchSnapshot();
Expand Down

0 comments on commit 72055d5

Please sign in to comment.