diff options
Diffstat (limited to 'spec/javascripts/pipelines/graph/stage_column_component_spec.js')
-rw-r--r-- | spec/javascripts/pipelines/graph/stage_column_component_spec.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/spec/javascripts/pipelines/graph/stage_column_component_spec.js b/spec/javascripts/pipelines/graph/stage_column_component_spec.js index f6e6bd3132e..d0b8f877d6f 100644 --- a/spec/javascripts/pipelines/graph/stage_column_component_spec.js +++ b/spec/javascripts/pipelines/graph/stage_column_component_spec.js @@ -25,17 +25,16 @@ describe('stage column component', () => { }; beforeEach(() => { - - const mockJobs = []; + const mockGroups = []; for (let i = 0; i < 3; i += 1) { const mockedJob = Object.assign({}, mockJob); mockedJob.id += i; - mockJobs.push(mockedJob); + mockGroups.push(mockedJob); } component = mountComponent(StageColumnComponent, { title: 'foo', - jobs: mockJobs, + groups: mockGroups, }); }); @@ -43,14 +42,14 @@ describe('stage column component', () => { expect(component.$el.querySelector('.stage-name').textContent.trim()).toEqual('foo'); }); - it('should render the provided jobs', () => { + it('should render the provided groups', () => { expect(component.$el.querySelectorAll('.builds-container > ul > li').length).toEqual(3); }); describe('jobId', () => { it('escapes job name', () => { component = mountComponent(StageColumnComponent, { - jobs: [ + groups: [ { id: 4259, name: '<img src=x onerror=alert(document.domain)>', @@ -64,9 +63,9 @@ describe('stage column component', () => { title: 'test', }); - expect( - component.$el.querySelector('.builds-container li').getAttribute('id'), - ).toEqual('ci-badge-<img src=x onerror=alert(document.domain)>'); + expect(component.$el.querySelector('.builds-container li').getAttribute('id')).toEqual( + 'ci-badge-<img src=x onerror=alert(document.domain)>', + ); }); }); }); |