Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-14 03:08:27 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-14 03:08:27 +0300
commitb7d58ff8b17623f64ac7835a590e79d916e758ac (patch)
tree4f75a8f9e0e30cf8c7e944ea2c4461be396c0d5f /qa
parent0e2fc1701bd0c87cc458cbbb34c618b0e0dc5a14 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/close_issue_spec.rb40
1 files changed, 15 insertions, 25 deletions
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/close_issue_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/close_issue_spec.rb
index dc7fa9f3859..bab6b1ac5fc 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/close_issue_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/close_issue_spec.rb
@@ -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