karma spec updates
This commit is contained in:
parent
7c331ac951
commit
b20381204a
4 changed files with 14 additions and 10 deletions
|
@ -122,7 +122,9 @@
|
||||||
// we need to do this to prevent noteForm inconsistent content warning
|
// we need to do this to prevent noteForm inconsistent content warning
|
||||||
// this is something we intentionally do so we need to recover the content
|
// this is something we intentionally do so we need to recover the content
|
||||||
this.note.note = noteText;
|
this.note.note = noteText;
|
||||||
this.$refs.noteBody.$refs.noteForm.note = noteText; // TODO: This could be better
|
if (this.$refs.noteBody) {
|
||||||
|
this.$refs.noteBody.$refs.noteForm.note = noteText; // TODO: This could be better
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
|
@ -98,7 +98,7 @@ Once you confirm %{deleteAccount}, it cannot be undone or recovered.`),
|
||||||
@toggle="toggleOpen"
|
@toggle="toggleOpen"
|
||||||
@submit="onSubmit">
|
@submit="onSubmit">
|
||||||
|
|
||||||
<template slot="body" scope="props">
|
<template slot="body" slot-scope="props">
|
||||||
<p v-html="props.text"></p>
|
<p v-html="props.text"></p>
|
||||||
|
|
||||||
<form
|
<form
|
||||||
|
|
|
@ -431,9 +431,9 @@ describe('AppComponent', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render groups tree', (done) => {
|
it('should render groups tree', (done) => {
|
||||||
vm.groups = [mockParentGroupItem];
|
vm.store.state.groups = [mockParentGroupItem];
|
||||||
vm.isLoading = false;
|
vm.isLoading = false;
|
||||||
vm.pageInfo = mockPageInfo;
|
vm.store.state.pageInfo = mockPageInfo;
|
||||||
Vue.nextTick(() => {
|
Vue.nextTick(() => {
|
||||||
expect(vm.$el.querySelector('.groups-list-tree-container')).toBeDefined();
|
expect(vm.$el.querySelector('.groups-list-tree-container')).toBeDefined();
|
||||||
done();
|
done();
|
||||||
|
|
|
@ -42,12 +42,14 @@ describe('Markdown field component', () => {
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
spyOn(Vue.http, 'post').and.callFake(() => new Promise((resolve) => {
|
spyOn(Vue.http, 'post').and.callFake(() => new Promise((resolve) => {
|
||||||
resolve({
|
setTimeout(() => {
|
||||||
json() {
|
resolve({
|
||||||
return {
|
json() {
|
||||||
body: '<p>markdown preview</p>',
|
return {
|
||||||
};
|
body: '<p>markdown preview</p>',
|
||||||
},
|
};
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue