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
aa36924a
Commit
aa36924a
authored
Nov 14, 2017
by
Jarka Kadlecova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add epic issues feature specs
parent
13db4f30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
0 deletions
+82
-0
spec/ee/spec/features/epics/epic_issues_spec.rb
spec/ee/spec/features/epics/epic_issues_spec.rb
+82
-0
No files found.
spec/ee/spec/features/epics/epic_issues_spec.rb
0 → 100644
View file @
aa36924a
require
'spec_helper'
describe
'Epic Issues'
,
:js
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
,
:public
)
}
let
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:public_project
)
{
create
(
:project
,
:public
,
group:
group
)
}
let
(
:private_project
)
{
create
(
:project
,
:private
,
group:
group
)
}
let
(
:public_issue
)
{
create
(
:issue
,
project:
public_project
)
}
let
(
:private_issue
)
{
create
(
:issue
,
project:
private_project
)
}
let!
(
:epic_issues
)
do
[
create
(
:epic_issue
,
epic:
epic
,
issue:
public_issue
),
create
(
:epic_issue
,
epic:
epic
,
issue:
private_issue
)
]
end
def
visit_epic
sign_in
(
user
)
visit
group_epic_path
(
group
,
epic
)
wait_for_requests
end
context
'when user is not a group member of a public group'
do
before
do
visit_epic
end
it
'user can see issues from public project but cannot delete the associations'
do
within
(
'.related-issues-block ul.issuable-list'
)
do
expect
(
page
).
to
have_selector
(
'li'
,
count:
1
)
expect
(
page
).
to
have_content
(
public_issue
.
title
)
expect
(
page
).
not_to
have_selector
(
'button.js-issue-token-remove-button'
)
end
end
it
'user cannot add new issues to the epic'
do
expect
(
page
).
not_to
have_selector
(
'.related-issues-block h3.panel-title button'
)
end
end
context
'when user is a group member'
do
before
do
group
.
add_developer
(
user
)
visit_epic
end
it
'user can see all issues of the group and delete the associations'
do
within
(
'.related-issues-block ul.issuable-list'
)
do
expect
(
page
).
to
have_selector
(
'li'
,
count:
2
)
expect
(
page
).
to
have_content
(
public_issue
.
title
)
expect
(
page
).
to
have_content
(
private_issue
.
title
)
first
(
'li button.js-issue-token-remove-button'
).
click
end
wait_for_requests
within
(
'.related-issues-block ul.issuable-list'
)
do
expect
(
page
).
to
have_selector
(
'li'
,
count:
1
)
end
end
it
'user can add new issues to the epic'
do
issue_to_add
=
create
(
:issue
,
project:
private_project
)
issue_invalid
=
create
(
:issue
)
references
=
"
#{
issue_to_add
.
to_reference
(
full:
true
)
}
#{
issue_invalid
.
to_reference
(
full:
true
)
}
"
find
(
'.related-issues-block h3.panel-title button'
).
click
find
(
'.js-add-issuable-form-input'
).
set
references
find
(
'.js-add-issuable-form-add-button'
).
click
wait_for_requests
within
(
'.related-issues-block ul.issuable-list'
)
do
expect
(
page
).
to
have_selector
(
'li'
,
count:
3
)
expect
(
page
).
to
have_content
(
issue_to_add
.
title
)
end
end
end
end
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