From fba4d625042171cb1da8ff8a273cd808d7d20c44 Mon Sep 17 00:00:00 2001 From: Sukanya Pandey Date: Tue, 29 Dec 2020 13:31:19 +0530 Subject: Resolve issue of page not found when opening new tab Signed-off-by: Sukanya Pandey Signed-off-by: Derick Montague Change-Id: Id46f9f663c456a7d09b55d6d322b00785df4cbe7 --- src/components/AppNavigation/AppNavigation.vue | 19 +- tests/unit/AppNavigation.spec.js | 4 + .../unit/__snapshots__/AppNavigation.spec.js.snap | 468 +++++++-------------- 3 files changed, 171 insertions(+), 320 deletions(-) diff --git a/src/components/AppNavigation/AppNavigation.vue b/src/components/AppNavigation/AppNavigation.vue index 6e893a33..acfabe76 100644 --- a/src/components/AppNavigation/AppNavigation.vue +++ b/src/components/AppNavigation/AppNavigation.vue @@ -27,14 +27,17 @@ - - {{ subNavItem.label }} - + diff --git a/tests/unit/AppNavigation.spec.js b/tests/unit/AppNavigation.spec.js index ab962046..b37c1e4c 100644 --- a/tests/unit/AppNavigation.spec.js +++ b/tests/unit/AppNavigation.spec.js @@ -1,13 +1,17 @@ import { mount, createWrapper } from '@vue/test-utils'; import AppNavigation from '@/components/AppNavigation'; import Vue from 'vue'; +import VueRouter from 'vue-router'; import { BootstrapVue } from 'bootstrap-vue'; describe('AppNavigation.vue', () => { let wrapper; Vue.use(BootstrapVue); + Vue.use(VueRouter); + const router = new VueRouter(); wrapper = mount(AppNavigation, { + router, mocks: { $t: (key) => key, }, diff --git a/tests/unit/__snapshots__/AppNavigation.spec.js.snap b/tests/unit/__snapshots__/AppNavigation.spec.js.snap index 2aa19c4a..e0ab2737 100644 --- a/tests/unit/__snapshots__/AppNavigation.spec.js.snap +++ b/tests/unit/__snapshots__/AppNavigation.spec.js.snap @@ -16,7 +16,8 @@ exports[`AppNavigation.vue should render correctly 1`] = ` data-test-id="nav-item-overview" > @@ -121,44 +122,33 @@ exports[`AppNavigation.vue should render correctly 1`] = ` > - - @@ -225,100 +215,69 @@ exports[`AppNavigation.vue should render correctly 1`] = ` > - - - - - - @@ -388,72 +347,51 @@ exports[`AppNavigation.vue should render correctly 1`] = ` > - - - - @@ -525,58 +463,42 @@ exports[`AppNavigation.vue should render correctly 1`] = ` > - - - @@ -610,7 +532,8 @@ exports[`AppNavigation.vue should render with nav-container open 1`] = ` data-test-id="nav-item-overview" > @@ -715,44 +638,33 @@ exports[`AppNavigation.vue should render with nav-container open 1`] = ` > - - @@ -819,100 +731,69 @@ exports[`AppNavigation.vue should render with nav-container open 1`] = ` > - - - - - - @@ -982,72 +863,51 @@ exports[`AppNavigation.vue should render with nav-container open 1`] = ` > - - - - @@ -1119,58 +979,42 @@ exports[`AppNavigation.vue should render with nav-container open 1`] = ` > - - - -- cgit v1.2.3