summaryrefslogtreecommitdiff
path: root/spec/frontend/ide/components
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ide/components')
-rw-r--r--spec/frontend/ide/components/error_message_spec.js9
-rw-r--r--spec/frontend/ide/components/file_templates/dropdown_spec.js4
-rw-r--r--spec/frontend/ide/components/jobs/stage_spec.js5
3 files changed, 14 insertions, 4 deletions
diff --git a/spec/frontend/ide/components/error_message_spec.js b/spec/frontend/ide/components/error_message_spec.js
index e995c64645e..db29413af24 100644
--- a/spec/frontend/ide/components/error_message_spec.js
+++ b/spec/frontend/ide/components/error_message_spec.js
@@ -90,8 +90,13 @@ describe('IDE error message component', () => {
it('does not dispatch action when already loading', () => {
wrapper.find('button').trigger('click');
actionMock.mockReset();
- wrapper.find('button').trigger('click');
- expect(actionMock).not.toHaveBeenCalled();
+ return wrapper.vm.$nextTick(() => {
+ wrapper.find('button').trigger('click');
+
+ return wrapper.vm.$nextTick().then(() => {
+ expect(actionMock).not.toHaveBeenCalled();
+ });
+ });
});
it('shows loading icon when loading', () => {
diff --git a/spec/frontend/ide/components/file_templates/dropdown_spec.js b/spec/frontend/ide/components/file_templates/dropdown_spec.js
index 83d797469ad..e107d3a364f 100644
--- a/spec/frontend/ide/components/file_templates/dropdown_spec.js
+++ b/spec/frontend/ide/components/file_templates/dropdown_spec.js
@@ -62,7 +62,9 @@ describe('IDE file templates dropdown component', () => {
const item = findItemButtons().at(0);
item.trigger('click');
- expect(wrapper.emitted().click[0][0]).toBe(itemData);
+ return wrapper.vm.$nextTick().then(() => {
+ expect(wrapper.emitted().click[0][0]).toBe(itemData);
+ });
});
it('renders dropdown title', () => {
diff --git a/spec/frontend/ide/components/jobs/stage_spec.js b/spec/frontend/ide/components/jobs/stage_spec.js
index 2e42ab26d27..dadf5b4caee 100644
--- a/spec/frontend/ide/components/jobs/stage_spec.js
+++ b/spec/frontend/ide/components/jobs/stage_spec.js
@@ -52,7 +52,10 @@ describe('IDE pipeline stage', () => {
const id = 5;
createComponent({ stage: { ...defaultProps.stage, id } });
findHeader().trigger('click');
- expect(wrapper.emitted().toggleCollapsed[0][0]).toBe(id);
+
+ return wrapper.vm.$nextTick().then(() => {
+ expect(wrapper.emitted().toggleCollapsed[0][0]).toBe(id);
+ });
});
it('emits clickViewLog entity with job', () => {