diff options
author | Phil Hughes <me@iamphill.com> | 2018-05-29 14:26:46 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-05-29 14:26:46 +0100 |
commit | aab713132e00be10d86ebcc50824365d0ff7a0c8 (patch) | |
tree | d0dd797e910f36c608ba4a24a502bd94b0c7e6f3 /spec | |
parent | 66bf2de830c421c06bef571a87f8d3d48edcad76 (diff) | |
download | gitlab-ce-aab713132e00be10d86ebcc50824365d0ff7a0c8.tar.gz |
karma fixes
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/ide/components/pipelines/list_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/vue_shared/components/tabs/tabs_spec.js | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/spec/javascripts/ide/components/pipelines/list_spec.js b/spec/javascripts/ide/components/pipelines/list_spec.js index d727dbdc1da..81fd00c7153 100644 --- a/spec/javascripts/ide/components/pipelines/list_spec.js +++ b/spec/javascripts/ide/components/pipelines/list_spec.js @@ -38,7 +38,7 @@ describe('IDE pipelines list', () => { mock .onGet('/abc/def/commit/123/pipelines') - .reply(200, { pipelines: [...pipelines] }, { 'poll-interval': '-1' }); + .replyOnce(200, { pipelines: [...pipelines] }, { 'poll-interval': '-1' }); vm = createComponentWithStore(Component, store).$mount(); @@ -48,6 +48,8 @@ describe('IDE pipelines list', () => { afterEach(() => { vm.$destroy(); mock.restore(); + vm.$store.dispatch('stopPipelinePolling'); + vm.$store.dispatch('clearEtagPoll'); }); it('renders pipeline data', () => { diff --git a/spec/javascripts/vue_shared/components/tabs/tabs_spec.js b/spec/javascripts/vue_shared/components/tabs/tabs_spec.js index 07752329965..50ba18cd338 100644 --- a/spec/javascripts/vue_shared/components/tabs/tabs_spec.js +++ b/spec/javascripts/vue_shared/components/tabs/tabs_spec.js @@ -43,15 +43,15 @@ describe('Tabs component', () => { }); it('renders active class', () => { - expect(vm.$el.querySelector('li').classList).toContain('active'); + expect(vm.$el.querySelector('a').classList).toContain('active'); }); it('updates active class on click', done => { vm.$el.querySelectorAll('a')[1].click(); setTimeout(() => { - expect(vm.$el.querySelector('li').classList).not.toContain('active'); - expect(vm.$el.querySelectorAll('li')[1].classList).toContain('active'); + expect(vm.$el.querySelector('a').classList).not.toContain('active'); + expect(vm.$el.querySelectorAll('a')[1].classList).toContain('active'); done(); }); |