Skip to content

Commit c21347f

Browse files
committed
Remove redundant nextTick
1 parent 37605bf commit c21347f

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

tests/unit/components/AdjustableSidebarWidth.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,6 @@ describe('AdjustableSidebarWidth', () => {
621621
}],
622622
}));
623623
await wrapper.vm.$nextTick();
624-
await flushPromises();
625624
expect(store.state.contentWidth).toBe(99);
626625
});
627626

tests/unit/components/Filter/FilterInput.spec.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ describe('FilterInput', () => {
107107
it('renders focus class if showSuggestedTags is true and border style is not prevented', async () => {
108108
await wrapper.setData({ showSuggestedTags: true });
109109
await wrapper.setProps({ preventBorderStyle: false });
110-
await wrapper.vm.$nextTick();
111110

112111
expect(wrapper.findComponent('.filter.focus').exists()).toBe(true);
113112
});
@@ -143,7 +142,6 @@ describe('FilterInput', () => {
143142

144143
it('renders an filter label element that has a input-value attrib to resize the input', async () => {
145144
await wrapper.setProps({ value: inputValue });
146-
await wrapper.vm.$nextTick();
147145
const filterLabel = wrapper.findComponent('#filter-label');
148146
// check input-value attrib for filter label contains the input value
149147
expect(filterLabel.attributes('data-value')).toBe(inputValue);
@@ -158,7 +156,6 @@ describe('FilterInput', () => {
158156

159157
// simulate the `handleScrollbar` mixin triggering ON
160158
await wrapper.setData({ isScrolling: true });
161-
await wrapper.vm.$nextTick();
162159

163160
expect(inputBoxWrapper.classes('scrolling')).toBe(true);
164161
});
@@ -722,7 +719,6 @@ describe('FilterInput', () => {
722719
await wrapper.vm.$nextTick();
723720

724721
await wrapper.setProps({ selectedTags: [selectedTag] });
725-
await wrapper.vm.$nextTick();
726722
selectedTagsComponent = wrapper.findComponent({ ref: 'selectedTags' });
727723
});
728724

@@ -762,7 +758,6 @@ describe('FilterInput', () => {
762758
document.activeElement.blur();
763759
await wrapper.vm.$nextTick();
764760
await wrapper.setProps({ selectedTags: [] });
765-
await wrapper.vm.$nextTick();
766761
expect(document.activeElement).not.toEqual(input.element);
767762
});
768763

@@ -917,7 +912,6 @@ describe('FilterInput', () => {
917912
it('deletes selected tag when tag is clicked on a virtual keyboard', async () => {
918913
await wrapper.setData({ keyboardIsVirtual: true });
919914
await wrapper.setProps({ selectedTags: [selectedTag, 'Tag2'] });
920-
await wrapper.vm.$nextTick();
921915

922916
selectedTagsComponent.vm.$emit('click-tags', { tagName: 'Tag2' });
923917
await flushPromises();
@@ -946,7 +940,6 @@ describe('FilterInput', () => {
946940

947941
it('resets filters when `deleteButton` is clicked', async () => {
948942
await wrapper.setProps({ value: '', selectedTags: [] });
949-
await wrapper.vm.$nextTick();
950943
const deleteBtn = wrapper.findComponent('.filter__delete-button');
951944
deleteBtn.trigger('click');
952945

@@ -1142,7 +1135,6 @@ describe('FilterInput', () => {
11421135

11431136
it('assigns selected tags to active tags when cmd + a is triggered on input', async () => {
11441137
await wrapper.setProps({ value: 'Foo', selectedTags: tags });
1145-
await wrapper.vm.$nextTick();
11461138
const selectedTagsComponent = wrapper.findComponent({ ref: 'selectedTags' });
11471139
wrapper.findComponent('input').trigger('keydown', {
11481140
key: 'a',
@@ -1418,7 +1410,6 @@ describe('FilterInput', () => {
14181410
beforeEach(async () => {
14191411
jest.resetAllMocks();
14201412
await wrapper.setProps({ selectedTags });
1421-
await wrapper.vm.$nextTick();
14221413
selectedTagsComponent = wrapper.findComponent({ ref: 'selectedTags' });
14231414
spyFocusTag = jest.spyOn(selectedTagsComponent.vm, 'focusTag').mockReturnValueOnce();
14241415
});

0 commit comments

Comments
 (0)