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
Boxiang Sun
gitlab-ce
Commits
c15174c0
Commit
c15174c0
authored
Aug 09, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Adds tests for placeholder note component
parent
0c1cf679
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
spec/javascripts/notes/components/issue_note_form_spec.js
spec/javascripts/notes/components/issue_note_form_spec.js
+0
-1
spec/javascripts/notes/components/issue_placeholder_note_spec.js
...vascripts/notes/components/issue_placeholder_note_spec.js
+18
-15
No files found.
spec/javascripts/notes/components/issue_note_form_spec.js
View file @
c15174c0
...
@@ -27,7 +27,6 @@ describe('issue_note_form component', () => {
...
@@ -27,7 +27,6 @@ describe('issue_note_form component', () => {
});
});
describe
(
'
keyboard events
'
,
()
=>
{
describe
(
'
keyboard events
'
,
()
=>
{
describe
(
'
up
'
,
()
=>
{
describe
(
'
up
'
,
()
=>
{
it
(
'
should ender edit mode
'
,
()
=>
{
it
(
'
should ender edit mode
'
,
()
=>
{
...
...
spec/javascripts/notes/components/issue_placeholder_note_spec.js
View file @
c15174c0
import
Vue
from
'
vue
'
;
import
issuePlaceholderNote
from
'
~/notes/components/issue_placeholder_note.vue
'
;
import
store
from
'
~/notes/stores
'
;
import
{
userDataMock
}
from
'
../mock_data
'
;
describe
(
'
issue placeholder system note component
'
,
()
=>
{
describe
(
'
issue placeholder system note component
'
,
()
=>
{
let
vm
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
const
Component
=
Vue
.
extend
(
issuePlaceholderNote
);
store
.
dispatch
(
'
setUserData
'
,
userDataMock
);
vm
=
new
Component
({
store
,
propsData
:
{
note
:
{
body
:
'
Foo
'
}
},
}).
$mount
();
});
});
describe
(
'
user information
'
,
()
=>
{
describe
(
'
user information
'
,
()
=>
{
it
(
'
should render user avatar with link
'
,
()
=>
{
it
(
'
should render user avatar with link
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.user-avatar-link
'
).
getAttribute
(
'
href
'
)).
toEqual
(
userDataMock
.
path
);
expect
(
vm
.
$el
.
querySelector
(
'
.user-avatar-link img
'
).
getAttribute
(
'
src
'
)).
toEqual
(
userDataMock
.
avatar_url
);
});
});
});
});
describe
(
'
note content
'
,
()
=>
{
describe
(
'
note content
'
,
()
=>
{
it
(
'
should render note header information
'
,
()
=>
{
it
(
'
should render note header information
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.note-header-info a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
userDataMock
.
path
);
expect
(
vm
.
$el
.
querySelector
(
'
.note-header-info .note-headline-light
'
).
textContent
.
trim
()).
toEqual
(
`@
${
userDataMock
.
username
}
`
);
});
});
it
(
'
should render note body
'
,
()
=>
{
it
(
'
should render note body
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.note-text p
'
).
textContent
.
trim
()).
toEqual
(
'
Foo
'
);
});
it
(
'
should render system note placeholder with markdown
'
,
()
=>
{
});
it
(
'
should render emojis
'
,
()
=>
{
});
it
(
'
should render slash commands
'
,
()
=>
{
});
});
});
});
});
});
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