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
02c66dad
Commit
02c66dad
authored
Aug 09, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Adds unit tests for issue_note_signed_out_widget component
parent
18091353
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
spec/javascripts/notes/components/issue_note_signed_out_widget_spec.js
...pts/notes/components/issue_note_signed_out_widget_spec.js
+29
-1
No files found.
spec/javascripts/notes/components/issue_note_signed_out_widget_spec.js
View file @
02c66dad
import
Vue
from
'
vue
'
;
import
issueNoteSignedOut
from
'
~/notes/components/issue_note_signed_out_widget.vue
'
;
import
store
from
'
~/notes/stores
'
;
import
{
notesDataMock
}
from
'
../mock_data
'
;
describe
(
'
issue_note_signed_out_widget component
'
,
()
=>
{
it
(
'
should render sign in link provided in the store
'
,
()
=>
{
let
vm
;
beforeEach
(()
=>
{
const
Component
=
Vue
.
extend
(
issueNoteSignedOut
);
store
.
dispatch
(
'
setNotesData
'
,
notesDataMock
);
vm
=
new
Component
({
store
,
}).
$mount
();
});
afterEach
(()
=>
{
vm
.
$destroy
();
});
it
(
'
should render sign in link provided in the store
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
`a[href="
${
notesDataMock
.
newSessionPath
}
"]`
).
textContent
,
).
toEqual
(
'
sign in
'
);
});
it
(
'
should render register link provided in the store
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
`a[href="
${
notesDataMock
.
registerPath
}
"]`
).
textContent
,
).
toEqual
(
'
register
'
);
});
it
(
'
should render information text
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
.
replace
(
/
\s
+/g
,
'
'
).
trim
()).
toEqual
(
'
Please register or sign in to reply
'
);
});
});
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