summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-04-21 09:36:35 +0000
committerPhil Hughes <me@iamphill.com>2017-04-21 09:36:35 +0000
commita2e4e650bc19c969c02cae36e30d20a71d79130e (patch)
treef4401c5acd4322d8dc04dc5d29b139d2d2f44b09 /spec
parent1b929586387af4db42fc81253ad310260655f829 (diff)
parent2ded26f622b56fc42ea986325bf8a28d98adfdc0 (diff)
downloadgitlab-ce-a2e4e650bc19c969c02cae36e30d20a71d79130e.tar.gz
Merge branch '31189-pipelines-error-state' into 'master'
Guarantee only one state is shown at a time Closes #31189 See merge request !10835
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/commit/pipelines/pipelines_spec.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/javascripts/commit/pipelines/pipelines_spec.js b/spec/javascripts/commit/pipelines/pipelines_spec.js
index 8cac3cad232..ad31448f81c 100644
--- a/spec/javascripts/commit/pipelines/pipelines_spec.js
+++ b/spec/javascripts/commit/pipelines/pipelines_spec.js
@@ -36,6 +36,7 @@ describe('Pipelines table in Commits and Merge requests', () => {
setTimeout(() => {
expect(this.component.$el.querySelector('.empty-state')).toBeDefined();
expect(this.component.$el.querySelector('.realtime-loading')).toBe(null);
+ expect(this.component.$el.querySelector('.js-pipelines-error-state')).toBe(null);
done();
}, 1);
});
@@ -67,6 +68,8 @@ describe('Pipelines table in Commits and Merge requests', () => {
setTimeout(() => {
expect(this.component.$el.querySelectorAll('table > tbody > tr').length).toEqual(1);
expect(this.component.$el.querySelector('.realtime-loading')).toBe(null);
+ expect(this.component.$el.querySelector('.empty-state')).toBe(null);
+ expect(this.component.$el.querySelector('.js-pipelines-error-state')).toBe(null);
done();
}, 0);
});
@@ -95,10 +98,12 @@ describe('Pipelines table in Commits and Merge requests', () => {
this.component.$destroy();
});
- it('should render empty state', function (done) {
+ it('should render error state', function (done) {
setTimeout(() => {
expect(this.component.$el.querySelector('.js-pipelines-error-state')).toBeDefined();
expect(this.component.$el.querySelector('.realtime-loading')).toBe(null);
+ expect(this.component.$el.querySelector('.js-empty-state')).toBe(null);
+ expect(this.component.$el.querySelector('table')).toBe(null);
done();
}, 0);
});