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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-11 15:09:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-11 15:09:49 +0300
commitdcf94a76413ddb50148bdac7b189afb7bffa7580 (patch)
treeb5ecff1d1aea4d3ad95d728531f95f80c00a47ca /spec/frontend/nav
parenta350f877c4246fee981690388239d1e19e17202a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/nav')
-rw-r--r--spec/frontend/nav/components/responsive_app_spec.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/spec/frontend/nav/components/responsive_app_spec.js b/spec/frontend/nav/components/responsive_app_spec.js
index 4d7f053e43b..7221ea2c5cd 100644
--- a/spec/frontend/nav/components/responsive_app_spec.js
+++ b/spec/frontend/nav/components/responsive_app_spec.js
@@ -8,6 +8,11 @@ import { resetMenuItemsActive } from '~/nav/utils/reset_menu_items_active';
import KeepAliveSlots from '~/vue_shared/components/keep_alive_slots.vue';
import { TEST_NAV_DATA } from '../mock_data';
+const HTML_HEADER_CONTENT = '<div class="header-content"></div>';
+const HTML_MENU_EXPANDED = '<div class="menu-expanded"></div>';
+const HTML_HEADER_WITH_MENU_EXPANDED =
+ '<div></div><div class="header-content menu-expanded"></div>';
+
describe('~/nav/components/responsive_app.vue', () => {
let wrapper;
@@ -53,11 +58,11 @@ describe('~/nav/components/responsive_app.vue', () => {
});
it.each`
- bodyHtml | expectation
- ${''} | ${false}
- ${'<div class="header-content"></div>'} | ${false}
- ${'<div class="menu-expanded"></div>'} | ${false}
- ${'<div></div><div class="header-content menu-expanded"></div>}'} | ${true}
+ bodyHtml | expectation
+ ${''} | ${false}
+ ${HTML_HEADER_CONTENT} | ${false}
+ ${HTML_MENU_EXPANDED} | ${false}
+ ${HTML_HEADER_WITH_MENU_EXPANDED} | ${true}
`(
'with responsive toggle event and html set to $bodyHtml, responsive open = $expectation',
({ bodyHtml, expectation }) => {
@@ -93,7 +98,7 @@ describe('~/nav/components/responsive_app.vue', () => {
describe('with menu expanded in body', () => {
beforeEach(() => {
- document.body.innerHTML = '<div></div><div class="header-content menu-expanded"></div>';
+ document.body.innerHTML = HTML_HEADER_WITH_MENU_EXPANDED;
createComponent();
});