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
Show 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 @@
...
@@ -3,19 +3,18 @@
module
QA
module
QA
context
'Plan'
do
context
'Plan'
do
describe
'Close issue'
do
describe
'Close issue'
do
let
(
:issue_title
)
{
'issue title'
}
let
(
:issue
)
do
let
(
:commit_message
)
{
'Closes'
}
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
before
do
Flow
::
Login
.
sign_in
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
# Initial commit should be pushed because
# the very first commit to the project doesn't close the issue
# the very first commit to the project doesn't close the issue
# https://gitlab.com/gitlab-org/gitlab-foss/issues/38965
# https://gitlab.com/gitlab-org/gitlab-foss/issues/38965
...
@@ -23,24 +22,15 @@ module QA
...
@@ -23,24 +22,15 @@ module QA
end
end
it
'user closes an issue by pushing commit'
do
it
'user closes an issue by pushing commit'
do
push_commit
(
"
#{
commit_message
}
#
#{
@
issue_id
}
"
,
false
)
push_commit
(
"
Closes #
#{
issue_id
}
"
,
false
)
@project
.
visit!
issue
.
visit!
Page
::
Project
::
Show
.
perform
do
|
show
|
show
.
click_commit
(
commit_message
)
end
commit_sha
=
Page
::
Project
::
Commit
::
Show
.
perform
(
&
:commit_sha
)
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
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show
|
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show
|
show
.
select_all_activities_filter
reopen_issue_button_visible
=
show
.
wait
(
reload:
true
)
do
expect
(
show
).
to
have_element
(
:reopen_issue_button
)
show
.
has_element?
(
:reopen_issue_button
,
wait:
1.0
)
expect
(
show
).
to
have_content
(
"closed via commit
#{
commit_sha
}
"
)
end
expect
(
reopen_issue_button_visible
).
to
be_truthy
end
end
end
end
...
@@ -49,7 +39,7 @@ module QA
...
@@ -49,7 +39,7 @@ module QA
push
.
commit_message
=
commit_message
push
.
commit_message
=
commit_message
push
.
new_branch
=
new_branch
push
.
new_branch
=
new_branch
push
.
file_content
=
commit_message
push
.
file_content
=
commit_message
push
.
project
=
@
project
push
.
project
=
project
end
end
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