From f833c7e336c09c1cd7fef424a8017e639d20dfa2 Mon Sep 17 00:00:00 2001 From: Derick Montague Date: Tue, 27 Oct 2020 08:21:20 -0500 Subject: Update failing unit tests - Add babel plugin to handle Jest import of SVG. Without plugin the test fails with a require.context() is undefined - Update snapshot tests that have changed - Removed globals from .eslintrc.js that were needed prior to migrating from Mocha and Chai to Jest Signed-off-by: Derick Montague Change-Id: Ibd01d2e629b5ecb47d072e277e4e9b5ae5c5f001 --- tests/unit/AppHeader.spec.js | 1 + tests/unit/__snapshots__/AppHeader.spec.js.snap | 57 +- .../unit/__snapshots__/AppNavigation.spec.js.snap | 1000 +++++++++++--------- 3 files changed, 582 insertions(+), 476 deletions(-) (limited to 'tests/unit') diff --git a/tests/unit/AppHeader.spec.js b/tests/unit/AppHeader.spec.js index f9a65395..6d359c88 100644 --- a/tests/unit/AppHeader.spec.js +++ b/tests/unit/AppHeader.spec.js @@ -12,6 +12,7 @@ describe('AppHeader.vue', () => { const actions = { 'global/getHostStatus': jest.fn(), 'eventLog/getEventLogData': jest.fn(), + 'authentication/resetStoreState': jest.fn(), }; const store = new Vuex.Store({ actions }); diff --git a/tests/unit/__snapshots__/AppHeader.spec.js.snap b/tests/unit/__snapshots__/AppHeader.spec.js.snap index 712353b0..8300ac19 100644 --- a/tests/unit/__snapshots__/AppHeader.spec.js.snap +++ b/tests/unit/__snapshots__/AppHeader.spec.js.snap @@ -23,30 +23,33 @@ exports[`AppHeader.vue should render correctly 1`] = ` aria-hidden="true" class="nav-trigger" id="app-header-trigger" - title="Open navigation" type="button" variant="link" > - @@ -55,7 +58,7 @@ exports[`AppHeader.vue should render correctly 1`] = ` class="header-logo" src="@/assets/images/logo-header.svg" /> - + + + + + + + + + + + - + + + `; @@ -540,19 +588,19 @@ exports[`AppNavigation.vue should render with nav-container open 1`] = ` > @@ -572,16 +620,16 @@ exports[`AppNavigation.vue should render with nav-container open 1`] = ` > @@ -608,68 +656,79 @@ exports[`AppNavigation.vue should render with nav-container open 1`] = ` - + + + + + + + + + + - + + + `; -- cgit v1.2.3