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
79086ede
Commit
79086ede
authored
Apr 16, 2019
by
Victor Wu
Committed by
Annabel Dunstone Gray
Apr 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`None` for assignees
Update assignees_spec.js Update sidebar_spec.rb Update issues_spec.rb
parent
232a8f75
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
app/assets/javascripts/sidebar/components/assignees/assignees.vue
...ts/javascripts/sidebar/components/assignees/assignees.vue
+2
-2
spec/features/boards/sidebar_spec.rb
spec/features/boards/sidebar_spec.rb
+2
-2
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+4
-4
spec/javascripts/sidebar/assignees_spec.js
spec/javascripts/sidebar/assignees_spec.js
+5
-5
No files found.
app/assets/javascripts/sidebar/components/assignees/assignees.vue
View file @
79086ede
...
...
@@ -153,7 +153,7 @@ export default {
data-placement="left"
data-boundary="viewport"
>
<i
v-if=
"hasNoUsers"
aria-label=
"No
Assigne
e"
class=
"fa fa-user"
>
</i>
<i
v-if=
"hasNoUsers"
aria-label=
"No
n
e"
class=
"fa fa-user"
>
</i>
<button
v-for=
"(user, index) in users"
v-if=
"shouldRenderCollapsedAssignee(index)"
...
...
@@ -185,7 +185,7 @@ export default {
</span>
<template
v-if=
"hasNoUsers"
>
<span
class=
"assign-yourself no-value"
>
No
assigne
e
No
n
e
<template
v-if=
"editable"
>
-
<button
type=
"button"
class=
"btn-link"
@
click=
"assignSelf"
>
assign yourself
</button>
</
template
>
...
...
spec/features/boards/sidebar_spec.rb
View file @
79086ede
...
...
@@ -133,7 +133,7 @@ describe 'Issue Boards', :js do
close_dropdown_menu_if_visible
wait_for_requests
expect
(
page
).
to
have_content
(
'No
assigne
e'
)
expect
(
page
).
to
have_content
(
'No
n
e'
)
end
expect
(
card_two
).
not_to
have_selector
(
'.avatar'
)
...
...
@@ -143,7 +143,7 @@ describe 'Issue Boards', :js do
click_card
(
card
)
page
.
within
(
find
(
'.assignee'
))
do
expect
(
page
).
to
have_content
(
'No
assigne
e'
)
expect
(
page
).
to
have_content
(
'No
n
e'
)
click_button
'assign yourself'
...
...
spec/features/issues_spec.rb
View file @
79086ede
...
...
@@ -91,7 +91,7 @@ describe 'Issues' do
click_button
'Save changes'
page
.
within
(
'.assignee'
)
do
expect
(
page
).
to
have_content
'No
assigne
e - assign yourself'
expect
(
page
).
to
have_content
'No
n
e - assign yourself'
end
expect
(
issue
.
reload
.
assignees
).
to
be_empty
...
...
@@ -465,7 +465,7 @@ describe 'Issues' do
click_link
'Edit'
click_link
'Unassigned'
first
(
'.title'
).
click
expect
(
page
).
to
have_content
'No
assigne
e'
expect
(
page
).
to
have_content
'No
n
e'
end
# wait_for_requests does not work with vue-resource at the moment
...
...
@@ -479,7 +479,7 @@ describe 'Issues' do
visit
project_issue_path
(
project
,
issue2
)
page
.
within
(
'.assignee'
)
do
expect
(
page
).
to
have_content
"No
assigne
e"
expect
(
page
).
to
have_content
"No
n
e"
end
page
.
within
'.assignee'
do
...
...
@@ -522,7 +522,7 @@ describe 'Issues' do
close_dropdown_menu_if_visible
page
.
within
'.value .assign-yourself'
do
expect
(
page
).
to
have_content
"No
assigne
e"
expect
(
page
).
to
have_content
"No
n
e"
end
end
end
...
...
spec/javascripts/sidebar/assignees_spec.js
View file @
79086ede
...
...
@@ -24,12 +24,12 @@ describe('Assignee component', () => {
const
collapsed
=
component
.
$el
.
querySelector
(
'
.sidebar-collapsed-icon
'
);
expect
(
collapsed
.
childElementCount
).
toEqual
(
1
);
expect
(
collapsed
.
children
[
0
].
getAttribute
(
'
aria-label
'
)).
toEqual
(
'
No
Assigne
e
'
);
expect
(
collapsed
.
children
[
0
].
getAttribute
(
'
aria-label
'
)).
toEqual
(
'
No
n
e
'
);
expect
(
collapsed
.
children
[
0
].
classList
.
contains
(
'
fa
'
)).
toEqual
(
true
);
expect
(
collapsed
.
children
[
0
].
classList
.
contains
(
'
fa-user
'
)).
toEqual
(
true
);
});
it
(
'
displays only "No
assigne
e" when no users are assigned and the issue is read-only
'
,
()
=>
{
it
(
'
displays only "No
n
e" when no users are assigned and the issue is read-only
'
,
()
=>
{
component
=
new
AssigneeComponent
({
propsData
:
{
rootPath
:
'
http://localhost:3000
'
,
...
...
@@ -39,11 +39,11 @@ describe('Assignee component', () => {
}).
$mount
();
const
componentTextNoUsers
=
component
.
$el
.
querySelector
(
'
.assign-yourself
'
).
innerText
.
trim
();
expect
(
componentTextNoUsers
).
toBe
(
'
No
assigne
e
'
);
expect
(
componentTextNoUsers
).
toBe
(
'
No
n
e
'
);
expect
(
componentTextNoUsers
.
indexOf
(
'
assign yourself
'
)).
toEqual
(
-
1
);
});
it
(
'
displays only "No
assigne
e" when no users are assigned and the issue can be edited
'
,
()
=>
{
it
(
'
displays only "No
n
e" when no users are assigned and the issue can be edited
'
,
()
=>
{
component
=
new
AssigneeComponent
({
propsData
:
{
rootPath
:
'
http://localhost:3000
'
,
...
...
@@ -53,7 +53,7 @@ describe('Assignee component', () => {
}).
$mount
();
const
componentTextNoUsers
=
component
.
$el
.
querySelector
(
'
.assign-yourself
'
).
innerText
.
trim
();
expect
(
componentTextNoUsers
.
indexOf
(
'
No
assigne
e
'
)).
toEqual
(
0
);
expect
(
componentTextNoUsers
.
indexOf
(
'
No
n
e
'
)).
toEqual
(
0
);
expect
(
componentTextNoUsers
.
indexOf
(
'
assign yourself
'
)).
toBeGreaterThan
(
0
);
});
...
...
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