Fix karma
This commit is contained in:
parent
a153f006ff
commit
03445de899
2 changed files with 8 additions and 6 deletions
|
@ -53,7 +53,7 @@
|
|||
class="js-write-link"
|
||||
href="#md-write-holder"
|
||||
tabindex="-1"
|
||||
@click.prevent="writeMarkdownTab($event, form)">
|
||||
@click.prevent="writeMarkdownTab($event)">
|
||||
Write
|
||||
</a>
|
||||
</li>
|
||||
|
@ -62,7 +62,7 @@
|
|||
class="js-preview-link"
|
||||
href="#md-preview-holder"
|
||||
tabindex="-1"
|
||||
@click.prevent="previewMarkdownTab($event, form)">
|
||||
@click.prevent="previewMarkdownTab($event)">
|
||||
Preview
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -43,11 +43,13 @@ describe('Markdown field header component', () => {
|
|||
it('emits toggle markdown event when clicking preview', () => {
|
||||
spyOn(vm, '$emit');
|
||||
|
||||
vm.$el.querySelector('li:nth-child(2) a').click();
|
||||
vm.$el.querySelector('.js-preview-link').click();
|
||||
|
||||
expect(
|
||||
vm.$emit,
|
||||
).toHaveBeenCalledWith('toggle-markdown');
|
||||
expect(vm.$emit).toHaveBeenCalledWith('preview-markdown');
|
||||
|
||||
vm.$el.querySelector('.js-write-link').click();
|
||||
|
||||
expect(vm.$emit).toHaveBeenCalledWith('write-markdown');
|
||||
});
|
||||
|
||||
it('blurs preview link after click', (done) => {
|
||||
|
|
Loading…
Reference in a new issue