Commit aab71313 authored by Phil Hughes's avatar Phil Hughes

karma fixes

parent 66bf2de8
......@@ -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', () => {
......
......@@ -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();
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment