Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/search/sidebar/components/scope_legacy_navigation_spec.js')
-rw-r--r--spec/frontend/search/sidebar/components/scope_legacy_navigation_spec.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/frontend/search/sidebar/components/scope_legacy_navigation_spec.js b/spec/frontend/search/sidebar/components/scope_legacy_navigation_spec.js
index 6a94da31a1b..786ad806ea6 100644
--- a/spec/frontend/search/sidebar/components/scope_legacy_navigation_spec.js
+++ b/spec/frontend/search/sidebar/components/scope_legacy_navigation_spec.js
@@ -7,6 +7,8 @@ import ScopeLegacyNavigation from '~/search/sidebar/components/scope_legacy_navi
Vue.use(Vuex);
+const MOCK_NAVIGATION_ENTRIES = Object.entries(MOCK_NAVIGATION);
+
describe('ScopeLegacyNavigation', () => {
let wrapper;
@@ -55,12 +57,12 @@ describe('ScopeLegacyNavigation', () => {
});
it('renders all nav item components', () => {
- expect(findGlNavItems()).toHaveLength(9);
+ expect(findGlNavItems()).toHaveLength(MOCK_NAVIGATION_ENTRIES.length);
});
it('has all proper links', () => {
const linkAtPosition = 3;
- const { link } = MOCK_NAVIGATION[Object.keys(MOCK_NAVIGATION)[linkAtPosition]];
+ const { link } = MOCK_NAVIGATION_ENTRIES[linkAtPosition][1];
expect(findGlNavItems().at(linkAtPosition).attributes('href')).toBe(link);
});