Skip to content
Snippets Groups Projects
Commit ccce365a authored by André Luís's avatar André Luís Committed by Paul Slaughter
Browse files

Update karma for new expansion cell markup

Also cleans up spec by:
- Add missing `afterEach ... $destroy`
- Add missing `done` call when `$nextTick` was used
parent 22dc7a0c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -213,7 +213,7 @@ export default {
 
<template>
<td :colspan="colspan">
<div class="content">
<div class="content js-line-expansion-content">
<a
v-if="canExpandUp"
v-tooltip
Loading
Loading
Loading
Loading
@@ -15,8 +15,12 @@ describe('DiffFile', () => {
}).$mount();
});
 
afterEach(() => {
vm.$destroy();
});
describe('template', () => {
it('should render component with file header, file content components', () => {
it('should render component with file header, file content components', done => {
const el = vm.$el;
const { file_hash, file_path } = vm.file;
 
Loading
Loading
@@ -30,9 +34,13 @@ describe('DiffFile', () => {
 
vm.file.renderIt = true;
 
vm.$nextTick(() => {
expect(el.querySelectorAll('.line_content').length).toBeGreaterThan(5);
});
vm.$nextTick()
.then(() => {
expect(el.querySelectorAll('.line_content').length).toBeGreaterThanOrEqual(5);
expect(el.querySelectorAll('.js-line-expansion-content').length).toBe(1);
})
.then(done)
.catch(done.fail);
});
 
describe('collapsed', () => {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment