summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-05-23 17:01:00 +0100
committerFilipa Lacerda <filipa@gitlab.com>2018-05-23 17:01:00 +0100
commit25aec20fab63946dfe1c5b9ae544e15cfcff2b81 (patch)
tree5b574019e238ef1f2399230f715466203d7a228d /spec
parent3f7b9244dcf76841bcd32087842d51988a5387b5 (diff)
downloadgitlab-ce-25aec20fab63946dfe1c5b9ae544e15cfcff2b81.tar.gz
Show loading icon only when making the requestfl-loading-icon
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/pipelines/pipelines_table_row_spec.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/javascripts/pipelines/pipelines_table_row_spec.js b/spec/javascripts/pipelines/pipelines_table_row_spec.js
index 05ca4cb9044..68043b91bd0 100644
--- a/spec/javascripts/pipelines/pipelines_table_row_spec.js
+++ b/spec/javascripts/pipelines/pipelines_table_row_spec.js
@@ -182,7 +182,16 @@ describe('Pipelines Table Row', () => {
});
component.$el.querySelector('.js-pipelines-cancel-button').click();
- expect(component.isCancelling).toEqual(true);
+ });
+
+ it('renders a loading icon when `cancelingPipeline` matches pipeline id', done => {
+ component.cancelingPipeline = pipeline.id;
+ component.$nextTick()
+ .then(() => {
+ expect(component.isCancelling).toEqual(true);
+ })
+ .then(done)
+ .catch(done.fail);
});
});
});