Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
62972975
Commit
62972975
authored
Jun 27, 2021
by
Mauricio Gonzalez
Committed by
Paul Slaughter
Jul 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix js test
parent
4eca9329
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+0
-1
spec/frontend/nav/components/responsive_app_spec.js
spec/frontend/nav/components/responsive_app_spec.js
+4
-6
No files found.
app/assets/javascripts/main.js
View file @
62972975
...
...
@@ -35,7 +35,6 @@ import GlFieldErrors from './gl_field_errors';
import
initUserPopovers
from
'
./user_popovers
'
;
import
initBroadcastNotifications
from
'
./broadcast_notification
'
;
import
{
initTopNav
}
from
'
./nav
'
;
import
navEventHub
,
{
EVENT_RESPONSIVE_TOGGLE
}
from
'
./nav/event_hub
'
;
import
'
ee_else_ce/main_ee
'
;
...
...
spec/frontend/nav/components/responsive_app_spec.js
View file @
62972975
...
...
@@ -3,7 +3,6 @@ import ResponsiveApp from '~/nav/components/responsive_app.vue';
import
ResponsiveHeader
from
'
~/nav/components/responsive_header.vue
'
;
import
ResponsiveHome
from
'
~/nav/components/responsive_home.vue
'
;
import
TopNavContainerView
from
'
~/nav/components/top_nav_container_view.vue
'
;
import
eventHub
,
{
EVENT_RESPONSIVE_TOGGLE
}
from
'
~/nav/event_hub
'
;
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
'
;
...
...
@@ -26,8 +25,7 @@ describe('~/nav/components/responsive_app.vue', () => {
},
});
};
const
triggerResponsiveToggle
=
()
=>
eventHub
.
$emit
(
EVENT_RESPONSIVE_TOGGLE
);
const
triggerResponsiveToggle
=
()
=>
document
.
body
.
classList
.
toggle
(
'
top-nav-responsive-open
'
);
const
findHome
=
()
=>
wrapper
.
findComponent
(
ResponsiveHome
);
const
findMobileOverlay
=
()
=>
wrapper
.
find
(
'
[data-testid="mobile-overlay"]
'
);
const
findSubviewHeader
=
()
=>
wrapper
.
findComponent
(
ResponsiveHeader
);
...
...
@@ -68,7 +66,8 @@ describe('~/nav/components/responsive_app.vue', () => {
({
bodyHtml
,
expectation
})
=>
{
document
.
body
.
innerHTML
=
bodyHtml
;
triggerResponsiveToggle
();
if
(
bodyHtml
===
HTML_HEADER_WITH_MENU_EXPANDED
)
triggerResponsiveToggle
();
expect
(
hasBodyResponsiveOpen
()).
toBe
(
expectation
);
},
...
...
@@ -99,6 +98,7 @@ describe('~/nav/components/responsive_app.vue', () => {
describe
(
'
with menu expanded in body
'
,
()
=>
{
beforeEach
(()
=>
{
document
.
body
.
innerHTML
=
HTML_HEADER_WITH_MENU_EXPANDED
;
triggerResponsiveToggle
();
createComponent
();
});
...
...
@@ -167,8 +167,6 @@ describe('~/nav/components/responsive_app.vue', () => {
});
it
(
'
responsive toggle event does nothing
'
,
()
=>
{
triggerResponsiveToggle
();
expect
(
hasBodyResponsiveOpen
()).
toBe
(
false
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment