diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-04-28 16:04:22 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-04-28 16:04:22 +0100 |
commit | e769db676076d8774d53b0361e6491ba19f2f738 (patch) | |
tree | 7298dc046f15300a616fafc7131f0e24e12aa157 | |
parent | bf8f5572c5cf1b14272d1ab28a4eb7a80449f994 (diff) | |
download | gitlab-ce-e769db676076d8774d53b0361e6491ba19f2f738.tar.gz |
Fix broken specs
4 files changed, 17 insertions, 25 deletions
diff --git a/spec/javascripts/pipelines/graph/action_component_spec.js b/spec/javascripts/pipelines/graph/action_component_spec.js index 4a225d30d8b..c2de01c2899 100644 --- a/spec/javascripts/pipelines/graph/action_component_spec.js +++ b/spec/javascripts/pipelines/graph/action_component_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; import actionComponent from '~/pipelines/components/graph/action_component.vue'; -describe('action component', () => { +describe('pipeline graph action component', () => { let component; beforeEach(() => { diff --git a/spec/javascripts/pipelines/graph/job_component_spec.js b/spec/javascripts/pipelines/graph/job_component_spec.js index 0729c6b98e1..63986b6c0db 100644 --- a/spec/javascripts/pipelines/graph/job_component_spec.js +++ b/spec/javascripts/pipelines/graph/job_component_spec.js @@ -1,7 +1,7 @@ import Vue from 'vue'; import jobComponent from '~/pipelines/components/graph/job_component.vue'; -describe('job component', () => { +describe('pipeline graph job component', () => { let JobComponent; const mockJob = { @@ -34,7 +34,7 @@ describe('job component', () => { }, }).$mount(); - const link = component.$el.querySelector(''); + const link = component.$el.querySelector('a'); expect(link.getAttribute('href')).toEqual(mockJob.status.details_path); diff --git a/spec/javascripts/pipelines_spec.js b/spec/javascripts/pipelines_spec.js index 122e86cd2c2..81ac589f4e6 100644 --- a/spec/javascripts/pipelines_spec.js +++ b/spec/javascripts/pipelines_spec.js @@ -5,26 +5,18 @@ if (!Element.prototype.matches && Element.prototype.webkitMatchesSelector) { Element.prototype.matches = Element.prototype.webkitMatchesSelector; } -(() => { - describe('Pipelines', () => { - preloadFixtures('static/pipeline_graph.html.raw'); +describe('Pipelines', () => { + preloadFixtures('static/pipeline_graph.html.raw'); - beforeEach(() => { - loadFixtures('static/pipeline_graph.html.raw'); - }); - - it('should be defined', () => { - expect(Pipelines).toBeDefined(); - }); - - it('should create a `Pipelines` instance without options', () => { - expect(() => { new Pipelines(); }).not.toThrow(); //eslint-disable-line - }); + beforeEach(() => { + loadFixtures('static/pipeline_graph.html.raw'); + }); - it('should create a `Pipelines` instance with options', () => { - const pipelines = new Pipelines({ foo: 'bar' }); + it('should be defined', () => { + expect(Pipelines).toBeDefined(); + }); - expect(pipelines.pipelineGraph).toBeDefined(); - }); + it('should create a `Pipelines` instance without options', () => { + expect(() => { new Pipelines(); }).not.toThrow(); //eslint-disable-line }); -})(); +}); diff --git a/spec/javascripts/vue_shared/ci_status_icon_spec.js b/spec/javascripts/vue_shared/ci_status_icon_spec.js index c82dbc18c81..b6621d6054d 100644 --- a/spec/javascripts/vue_shared/ci_status_icon_spec.js +++ b/spec/javascripts/vue_shared/ci_status_icon_spec.js @@ -1,4 +1,4 @@ -import { BorderlessStatusIconEntityMap, StatusIconEntityMap } from '~/vue_shared/ci_status_icons'; +import { borderlessStatusIconEntityMap, statusIconEntityMap } from '~/vue_shared/ci_status_icons'; describe('CI status icons', () => { const statuses = [ @@ -15,13 +15,13 @@ describe('CI status icons', () => { it('should have a dictionary for borderless icons', () => { statuses.forEach((status) => { - expect(BorderlessStatusIconEntityMap[status]).toBeDefined(); + expect(borderlessStatusIconEntityMap[status]).toBeDefined(); }); }); it('should have a dictionary for icons', () => { statuses.forEach((status) => { - expect(StatusIconEntityMap[status]).toBeDefined(); + expect(statusIconEntityMap[status]).toBeDefined(); }); }); }); |