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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
4732b271
Commit
4732b271
authored
Mar 20, 2019
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move EE-specific tests to separate file
Extracts tests related to issue weight into a separate file
parent
ba47c0da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
44 deletions
+59
-44
ee/spec/features/issues/issue_weight_spec.rb
ee/spec/features/issues/issue_weight_spec.rb
+40
-0
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+19
-44
No files found.
ee/spec/features/issues/issue_weight_spec.rb
0 → 100644
View file @
4732b271
# frozen_string_literal: true
require
'spec_helper'
describe
'Issue weight'
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
it
'shows weight on issue list row'
do
create
(
:issue
,
project:
project
,
weight:
2
)
visit
project_issues_path
(
project
)
page
.
within
(
first
(
'.issuable-info'
))
do
expect
(
page
).
to
have_selector
(
'.issue-weight-icon'
)
expect
(
page
).
to
have_content
(
2
)
end
end
it
'allows user to update weight'
,
:js
do
user
=
create
(
:user
)
issue
=
create
(
:issue
,
author:
user
,
project:
project
)
project
.
add_developer
(
user
)
sign_in
(
user
)
visit
project_issue_path
(
project
,
issue
)
page
.
within
(
'.weight'
)
do
expect
(
page
).
to
have_content
"None"
click_link
'Edit'
find
(
'.block.weight input'
).
send_keys
1
,
:enter
page
.
within
(
'.value'
)
do
expect
(
page
).
to
have_content
"1"
end
end
end
end
spec/features/issues_spec.rb
View file @
4732b271
...
@@ -57,9 +57,9 @@ describe 'Issues' do
...
@@ -57,9 +57,9 @@ describe 'Issues' do
describe
'Edit issue'
do
describe
'Edit issue'
do
let!
(
:issue
)
do
let!
(
:issue
)
do
create
(
:issue
,
create
(
:issue
,
author:
user
,
author:
user
,
assignees:
[
user
],
assignees:
[
user
],
project:
project
)
project:
project
)
end
end
before
do
before
do
...
@@ -75,9 +75,9 @@ describe 'Issues' do
...
@@ -75,9 +75,9 @@ describe 'Issues' do
describe
'Editing issue assignee'
do
describe
'Editing issue assignee'
do
let!
(
:issue
)
do
let!
(
:issue
)
do
create
(
:issue
,
create
(
:issue
,
author:
user
,
author:
user
,
assignees:
[
user
],
assignees:
[
user
],
project:
project
)
project:
project
)
end
end
it
'allows user to select unassigned'
,
:js
do
it
'allows user to select unassigned'
,
:js
do
...
@@ -187,27 +187,16 @@ describe 'Issues' do
...
@@ -187,27 +187,16 @@ describe 'Issues' do
expect
(
page
).
to
have_content
'foobar'
expect
(
page
).
to
have_content
'foobar'
expect
(
page
.
all
(
'.no-comments'
).
first
.
text
).
to
eq
"0"
expect
(
page
.
all
(
'.no-comments'
).
first
.
text
).
to
eq
"0"
end
end
it
'shows weight on issue row'
do
create
(
:issue
,
author:
user
,
project:
project
,
weight:
2
)
visit
project_issues_path
(
project
)
page
.
within
(
first
(
'.issuable-info'
))
do
expect
(
page
).
to
have_selector
(
'.issue-weight-icon'
)
expect
(
page
).
to
have_content
(
2
)
end
end
end
end
describe
'Filter issue'
do
describe
'Filter issue'
do
before
do
before
do
%w(foobar barbaz gitlab)
.
each
do
|
title
|
%w(foobar barbaz gitlab)
.
each
do
|
title
|
create
(
:issue
,
create
(
:issue
,
author:
user
,
author:
user
,
assignees:
[
user
],
assignees:
[
user
],
project:
project
,
project:
project
,
title:
title
)
title:
title
)
end
end
@issue
=
Issue
.
find_by
(
title:
'foobar'
)
@issue
=
Issue
.
find_by
(
title:
'foobar'
)
...
@@ -508,13 +497,20 @@ describe 'Issues' do
...
@@ -508,13 +497,20 @@ describe 'Issues' do
it
'allows user to unselect themselves'
,
:js
do
it
'allows user to unselect themselves'
,
:js
do
issue2
=
create
(
:issue
,
project:
project
,
author:
user
)
issue2
=
create
(
:issue
,
project:
project
,
author:
user
)
visit
project_issue_path
(
project
,
issue2
)
visit
project_issue_path
(
project
,
issue2
)
def
close_dropdown_menu_if_visible
find
(
'.dropdown-menu-toggle'
,
visible: :all
).
tap
do
|
toggle
|
toggle
.
click
if
toggle
.
visible?
end
end
page
.
within
'.assignee'
do
page
.
within
'.assignee'
do
click_link
'Edit'
click_link
'Edit'
click_link
user
.
name
click_link
user
.
name
find
(
'.dropdown-menu-toggle'
).
click
close_dropdown_menu_if_visible
page
.
within
'.value .author'
do
page
.
within
'.value .author'
do
expect
(
page
).
to
have_content
user
.
name
expect
(
page
).
to
have_content
user
.
name
...
@@ -523,7 +519,7 @@ describe 'Issues' do
...
@@ -523,7 +519,7 @@ describe 'Issues' do
click_link
'Edit'
click_link
'Edit'
click_link
user
.
name
click_link
user
.
name
find
(
'.dropdown-menu-toggle'
).
click
close_dropdown_menu_if_visible
page
.
within
'.value .assign-yourself'
do
page
.
within
'.value .assign-yourself'
do
expect
(
page
).
to
have_content
"No assignee"
expect
(
page
).
to
have_content
"No assignee"
...
@@ -549,27 +545,6 @@ describe 'Issues' do
...
@@ -549,27 +545,6 @@ describe 'Issues' do
end
end
end
end
describe
'update weight from issue#show'
,
:js
do
let!
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
before
do
visit
project_issue_path
(
project
,
issue
)
end
it
'allows user to update to a weight'
do
page
.
within
(
'.weight'
)
do
expect
(
page
).
to
have_content
"None"
click_link
'Edit'
find
(
'.block.weight input'
).
send_keys
1
,
:enter
page
.
within
(
'.value'
)
do
expect
(
page
).
to
have_content
"1"
end
end
end
end
describe
'update milestone from issue#show'
do
describe
'update milestone from issue#show'
do
let!
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
user
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
user
)
}
let!
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let!
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
...
...
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