Skip to content

Commit 0be936e

Browse files
committed
Fix Hierarchy.spec.js
1 parent 3f06424 commit 0be936e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/unit/components/DocumentationTopic/Hero/Hierarchy.spec.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ describe('Hierarchy', () => {
191191
]);
192192
});
193193

194-
it('renders a list with `root + 2 collapsed + max 2 items`, between 1000 and 1200px', () => {
194+
it('renders a list with `root + 2 collapsed + max 2 items`, between 1000 and 1200px', async () => {
195195
changeSize(1100);
196-
196+
await wrapper.vm.$nextTick();
197197
const items = wrapper.findAll(HierarchyItem);
198198
// assert what items are shown
199199
// assert root item
@@ -234,8 +234,9 @@ describe('Hierarchy', () => {
234234
]);
235235
});
236236

237-
it('renders a list with `3 collapsed + max 1 item`, between 735 and 1000px', () => {
237+
it('renders a list with `3 collapsed + max 1 item`, between 735 and 1000px', async () => {
238238
changeSize(900);
239+
await wrapper.vm.$nextTick();
239240
const items = wrapper.findAll(HierarchyItem);
240241
// assert what items are shown
241242
// assert there is no root item
@@ -283,8 +284,9 @@ describe('Hierarchy', () => {
283284
]);
284285
});
285286

286-
it('renders a list with `5 collapsed and no external links`, below 735', () => {
287+
it('renders a list with `5 collapsed and no external links`, below 735', async () => {
287288
changeSize(720);
289+
await wrapper.vm.$nextTick();
288290
const items = wrapper.findAll(HierarchyItem);
289291
// assert what items are shown
290292
// assert there is no root item

0 commit comments

Comments
 (0)