Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
db735b66
Commit
db735b66
authored
Feb 20, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add snapshot test to discussion_jump_to_next_button_spec.js
parent
fd874969
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
spec/frontend/notes/components/__snapshots__/discussion_jump_to_next_button_spec.js.snap
...__snapshots__/discussion_jump_to_next_button_spec.js.snap
+20
-0
spec/frontend/notes/components/discussion_jump_to_next_button_spec.js
...d/notes/components/discussion_jump_to_next_button_spec.js
+7
-3
No files found.
spec/frontend/notes/components/__snapshots__/discussion_jump_to_next_button_spec.js.snap
0 → 100644
View file @
db735b66
// 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>
`;
spec/frontend/notes/components/discussion_jump_to_next_button_spec.js
View file @
db735b66
import
j
umpToNextDiscussionButton
from
'
~/notes/components/discussion_jump_to_next_button.vue
'
;
import
J
umpToNextDiscussionButton
from
'
~/notes/components/discussion_jump_to_next_button.vue
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
describe
(
'
j
umpToNextDiscussionButton
'
,
()
=>
{
describe
(
'
J
umpToNextDiscussionButton
'
,
()
=>
{
let
wrapper
;
beforeEach
(()
=>
{
wrapper
=
shallowMount
(
j
umpToNextDiscussionButton
,
{
wrapper
=
shallowMount
(
J
umpToNextDiscussionButton
,
{
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
'
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment