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
e6aa05e7
Commit
e6aa05e7
authored
Dec 13, 2019
by
Walmyr Lima e Silva Filho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor end-to-end test to make it more robust
And simpler.
parent
b0ece70a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
25 deletions
+15
-25
qa/qa/specs/features/browser_ui/2_plan/issue/close_issue_spec.rb
...pecs/features/browser_ui/2_plan/issue/close_issue_spec.rb
+15
-25
No files found.
qa/qa/specs/features/browser_ui/2_plan/issue/close_issue_spec.rb
View file @
e6aa05e7
...
...
@@ -3,19 +3,18 @@
module
QA
context
'Plan'
do
describe
'Close issue'
do
let
(
:issue_title
)
{
'issue title'
}
let
(
:commit_message
)
{
'Closes'
}
let
(
:issue
)
do
Resource
::
Issue
.
fabricate_via_api!
do
|
issue
|
issue
.
title
=
'Issue to be closed via pushing a commit'
end
end
let
(
:project
)
{
issue
.
project
}
let
(
:issue_id
)
{
issue
.
api_response
[
:iid
]
}
before
do
Flow
::
Login
.
sign_in
issue
=
Resource
::
Issue
.
fabricate_via_api!
do
|
issue
|
issue
.
title
=
issue_title
end
@project
=
issue
.
project
@issue_id
=
issue
.
api_response
[
:iid
]
# Initial commit should be pushed because
# the very first commit to the project doesn't close the issue
# https://gitlab.com/gitlab-org/gitlab-foss/issues/38965
...
...
@@ -23,24 +22,15 @@ module QA
end
it
'user closes an issue by pushing commit'
do
push_commit
(
"
#{
commit_message
}
#
#{
@issue_id
}
"
,
false
)
@project
.
visit!
Page
::
Project
::
Show
.
perform
do
|
show
|
show
.
click_commit
(
commit_message
)
end
commit_sha
=
Page
::
Project
::
Commit
::
Show
.
perform
(
&
:commit_sha
)
push_commit
(
"Closes #
#{
issue_id
}
"
,
false
)
Page
::
Project
::
Menu
.
perform
(
&
:click_issues
)
Page
::
Project
::
Issue
::
Index
.
perform
do
|
index
|
index
.
click_closed_issues_link
index
.
click_issue_link
(
issue_title
)
end
issue
.
visit!
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show
|
show
.
select_all_activities_filter
expect
(
show
).
to
have_element
(
:reopen_issue_button
)
expect
(
show
).
to
have_content
(
"closed via commit
#{
commit_sha
}
"
)
reopen_issue_button_visible
=
show
.
wait
(
reload:
true
)
do
show
.
has_element?
(
:reopen_issue_button
,
wait:
1.0
)
end
expect
(
reopen_issue_button_visible
).
to
be_truthy
end
end
...
...
@@ -49,7 +39,7 @@ module QA
push
.
commit_message
=
commit_message
push
.
new_branch
=
new_branch
push
.
file_content
=
commit_message
push
.
project
=
@
project
push
.
project
=
project
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