summaryrefslogtreecommitdiff
path: root/spec/javascripts/vue_pipelines_index/error_state_spec.js
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2017-03-24 01:12:44 +0000
committerAlfredo Sumaran <alfredo@gitlab.com>2017-03-24 01:12:44 +0000
commit453d755ae4c83cbdd0a6542aca7028f4e1521679 (patch)
treefa202ad1115e38a52c8797925d86befb4973c09c /spec/javascripts/vue_pipelines_index/error_state_spec.js
parent856edee368c8c6a93821bff97eb0bb08b3e15bf9 (diff)
parenta5f17beb43c792618cd0e8612d8e00bb8edb6942 (diff)
downloadgitlab-ce-453d755ae4c83cbdd0a6542aca7028f4e1521679.tar.gz
Merge branch '27574-pipelines-empty-state' into 'master'
Pipelines empty state Closes #27574 See merge request !9978
Diffstat (limited to 'spec/javascripts/vue_pipelines_index/error_state_spec.js')
-rw-r--r--spec/javascripts/vue_pipelines_index/error_state_spec.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/javascripts/vue_pipelines_index/error_state_spec.js b/spec/javascripts/vue_pipelines_index/error_state_spec.js
new file mode 100644
index 00000000000..524e018b1fa
--- /dev/null
+++ b/spec/javascripts/vue_pipelines_index/error_state_spec.js
@@ -0,0 +1,23 @@
+import Vue from 'vue';
+import errorStateComp from '~/vue_pipelines_index/components/error_state';
+
+describe('Pipelines Error State', () => {
+ let component;
+ let ErrorStateComponent;
+
+ beforeEach(() => {
+ ErrorStateComponent = Vue.extend(errorStateComp);
+
+ component = new ErrorStateComponent().$mount();
+ });
+
+ it('should render error state SVG', () => {
+ expect(component.$el.querySelector('.svg-content svg')).toBeDefined();
+ });
+
+ it('should render emtpy state information', () => {
+ expect(
+ component.$el.querySelector('h4').textContent,
+ ).toContain('The API failed to fetch the pipelines');
+ });
+});