Add snapshot test to discussion_jump_to_next_button_spec.js
This commit is contained in:
parent
fd87496971
commit
db735b66a0
|
@ -0,0 +1,20 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`JumpToNextDiscussionButton matches the snapshot 1`] = `
|
||||
<div
|
||||
class="btn-group"
|
||||
role="group"
|
||||
>
|
||||
<button
|
||||
class="btn btn-default discussion-next-btn"
|
||||
data-original-title="Jump to next unresolved discussion"
|
||||
title=""
|
||||
>
|
||||
<icon-stub
|
||||
cssclasses=""
|
||||
name="comment-next"
|
||||
size="16"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
|
@ -1,11 +1,11 @@
|
|||
import jumpToNextDiscussionButton from '~/notes/components/discussion_jump_to_next_button.vue';
|
||||
import JumpToNextDiscussionButton from '~/notes/components/discussion_jump_to_next_button.vue';
|
||||
import { shallowMount } from '@vue/test-utils';
|
||||
|
||||
describe('jumpToNextDiscussionButton', () => {
|
||||
describe('JumpToNextDiscussionButton', () => {
|
||||
let wrapper;
|
||||
|
||||
beforeEach(() => {
|
||||
wrapper = shallowMount(jumpToNextDiscussionButton, {
|
||||
wrapper = shallowMount(JumpToNextDiscussionButton, {
|
||||
sync: false,
|
||||
});
|
||||
});
|
||||
|
@ -14,6 +14,10 @@ describe('jumpToNextDiscussionButton', () => {
|
|||
wrapper.destroy();
|
||||
});
|
||||
|
||||
it('matches the snapshot', () => {
|
||||
expect(wrapper.vm.$el).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('emits onClick event on button click', () => {
|
||||
const button = wrapper.find({ ref: 'button' });
|
||||
|
||||
|
|
Loading…
Reference in New Issue