Commit 646c773f authored by Paul Slaughter's avatar Paul Slaughter

Update test to use async/await

**Why?**
- This is to demonstrate the change in [this MR][1]

[1]: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23606
parent 3ac176bb
......@@ -69,24 +69,19 @@ describe('IDE commit form', () => {
});
});
it('collapses if lastCommitMsg is set to empty and current view is not commit view', () => {
it('collapses if lastCommitMsg is set to empty and current view is not commit view', async () => {
store.state.lastCommitMsg = 'abc';
store.state.currentActivityView = leftSidebarViews.edit.name;
await vm.$nextTick();
return vm
.$nextTick()
.then(() => {
// if commit message is set, form is uncollapsed
expect(vm.isCompact).toBe(false);
// if commit message is set, form is uncollapsed
expect(vm.isCompact).toBe(false);
store.state.lastCommitMsg = '';
store.state.lastCommitMsg = '';
await vm.$nextTick();
return vm.$nextTick();
})
.then(() => {
// collapsed when set to empty
expect(vm.isCompact).toBe(true);
});
// collapsed when set to empty
expect(vm.isCompact).toBe(true);
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment