karma fixes
This commit is contained in:
parent
66bf2de830
commit
aab713132e
2 changed files with 6 additions and 4 deletions
|
@ -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();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue