Update karma for new expansion cell markup
Also cleans up spec by: - Add missing `afterEach ... $destroy` - Add missing `done` call when `$nextTick` was used
This commit is contained in:
parent
22dc7a0ca8
commit
ccce365ac5
2 changed files with 13 additions and 5 deletions
|
@ -213,7 +213,7 @@ export default {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<td :colspan="colspan">
|
<td :colspan="colspan">
|
||||||
<div class="content">
|
<div class="content js-line-expansion-content">
|
||||||
<a
|
<a
|
||||||
v-if="canExpandUp"
|
v-if="canExpandUp"
|
||||||
v-tooltip
|
v-tooltip
|
||||||
|
|
|
@ -15,8 +15,12 @@ describe('DiffFile', () => {
|
||||||
}).$mount();
|
}).$mount();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
vm.$destroy();
|
||||||
|
});
|
||||||
|
|
||||||
describe('template', () => {
|
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 el = vm.$el;
|
||||||
const { file_hash, file_path } = vm.file;
|
const { file_hash, file_path } = vm.file;
|
||||||
|
|
||||||
|
@ -30,9 +34,13 @@ describe('DiffFile', () => {
|
||||||
|
|
||||||
vm.file.renderIt = true;
|
vm.file.renderIt = true;
|
||||||
|
|
||||||
vm.$nextTick(() => {
|
vm.$nextTick()
|
||||||
expect(el.querySelectorAll('.line_content').length).toBeGreaterThan(5);
|
.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', () => {
|
describe('collapsed', () => {
|
||||||
|
|
Loading…
Reference in a new issue