Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwinh <winnie@gitlab.com>2017-06-13 14:48:13 +0300
committerwinh <winnie@gitlab.com>2017-06-22 11:06:58 +0300
commit07742c02545c6ed725779e91fef73a96974be0b1 (patch)
tree32e779988b540f9779e5eec88fd39277d2b3d834
parent8cc9ab50179cd6842ca6cd092ba391f0a6145945 (diff)
Add failing test for #32987
-rw-r--r--spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
index 647b59520f8..0ffa4ac46e3 100644
--- a/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
+++ b/spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
@@ -76,6 +76,25 @@ describe('MRWidgetPipeline', () => {
el = vm.$el;
});
+ afterEach(() => {
+ vm.$destroy();
+ });
+
+ describe('without a pipeline', () => {
+ beforeEach(() => {
+ vm.mr = { pipeline: null };
+ });
+
+ it('should render message with spinner', (done) => {
+ Vue.nextTick(() => {
+ expect(el.querySelector('.pipeline-id')).toBe(null);
+ expect(el.innerText.trim()).toBe('Waiting for pipeline...');
+ expect(el.querySelectorAll('i.fa.fa-spinner.fa-spin').length).toBe(1);
+ done();
+ });
+ });
+ });
+
it('should render template elements correctly', () => {
expect(el.classList.contains('mr-widget-heading')).toBeTruthy();
expect(el.querySelectorAll('.ci-status-icon.ci-status-icon-success').length).toEqual(1);