Skip to content

Commit 617ae25

Browse files
committed
Fix DocumentationLayout.spec.js
1 parent 23d2032 commit 617ae25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/unit/components/DocumentationLayout.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,15 +463,17 @@ describe('DocumentationLayout', () => {
463463
const sidebar = wrapper.findComponent(AdjustableSidebarWidth);
464464
// set the breakpoint to small on the sidebar
465465
sidebar.vm.breakpoint = BreakpointName.small;
466+
await wrapper.vm.$nextTick();
466467
expect(sidebar.props('shownOnMobile')).toBe(true);
467468
await flushPromises();
468469
navigator.vm.$emit('close');
470+
await wrapper.vm.$nextTick();
469471
expect(sidebar.props('shownOnMobile')).toBe(false);
470472
// Test that Medium works with the same set of props/events
471473
// toggle the navigator from the Nav component, in Medium breakpoint
472474
nav.vm.$emit('toggle-sidenav', BreakpointName.medium);
475+
await wrapper.vm.$nextTick();
473476
expect(sidebar.props('shownOnMobile')).toBe(true);
474-
await flushPromises();
475477
sidebar.vm.breakpoint = BreakpointName.medium;
476478
navigator.vm.$emit('close');
477479
await wrapper.vm.$nextTick();
@@ -488,6 +490,7 @@ describe('DocumentationLayout', () => {
488490
const nav = wrapper.findComponent(Nav);
489491
// close the navigator
490492
wrapper.findComponent(Navigator).vm.$emit('close');
493+
await wrapper.vm.$nextTick();
491494
// assert its closed on Large
492495
expect(sidebar.props('hiddenOnLarge')).toBe(true);
493496
// now toggle it back from the Nav

0 commit comments

Comments
 (0)