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
6cf8378d
Commit
6cf8378d
authored
Dec 01, 2017
by
Jarka Kadlecova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add additional spec and assertions for epis_issues
parent
d15e704e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
spec/ee/spec/features/epics/epic_issues_spec.rb
spec/ee/spec/features/epics/epic_issues_spec.rb
+21
-6
No files found.
spec/ee/spec/features/epics/epic_issues_spec.rb
View file @
6cf8378d
...
...
@@ -43,6 +43,17 @@ describe 'Epic Issues', :js do
end
context
'when user is a group member'
do
let
(
:issue_to_add
)
{
create
(
:issue
,
project:
private_project
)
}
let
(
:issue_invalid
)
{
create
(
:issue
)
}
def
add_issues
(
references
)
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
end
before
do
group
.
add_developer
(
user
)
visit_epic
...
...
@@ -64,16 +75,20 @@ describe 'Epic Issues', :js do
end
end
it
'user cannot add new issues to the epic from another group'
do
add_issues
(
"
#{
issue_invalid
.
to_reference
(
full:
true
)
}
"
)
expect
(
page
).
to
have_selector
(
'.content-wrapper .alert-wrapper .flash-text'
)
expect
(
find
(
'.flash-alert'
)).
to
have_text
(
'No Issue found for given params'
)
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
add_issues
(
references
)
wait_for_requests
expect
(
page
).
not_to
have_selector
(
'.content-wrapper .alert-wrapper .flash-text'
)
expect
(
page
).
not_to
have_content
(
'No Issue found for given params'
)
within
(
'.related-issues-block ul.issuable-list'
)
do
expect
(
page
).
to
have_selector
(
'li'
,
count:
3
)
...
...
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