summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-11-13 15:40:22 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-11-13 15:40:22 +0000
commit2356f9ab2560dcb54af71a806df75de6eea45b09 (patch)
tree905f09e10648d98d811906fd36be0c373e0228ae /qa
parent9f5dfd59f147db5f27da6f73a4c1ca06293c21ae (diff)
parent8fe96f4e50e8711e376d3ac33a04bced8f6d4f55 (diff)
downloadgitlab-ce-2356f9ab2560dcb54af71a806df75de6eea45b09.tar.gz
Merge branch 'qa-auto-assign-codeowner-spec' into 'master'
Update merge request page object and selectors See merge request gitlab-org/gitlab-ce!22939
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/merge_request/show.rb8
-rw-r--r--qa/qa/resource/merge_request.rb10
2 files changed, 15 insertions, 3 deletions
diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb
index 2e69a89e386..2fd30e15ffb 100644
--- a/qa/qa/page/merge_request/show.rb
+++ b/qa/qa/page/merge_request/show.rb
@@ -55,6 +55,10 @@ module QA
element :labels_block
end
+ view 'app/views/projects/merge_requests/_mr_title.html.haml' do
+ element :edit_button
+ end
+
def fast_forward_possible?
!has_text?('Fast-forward merge is not possible')
end
@@ -163,6 +167,10 @@ module QA
all_elements(:discussion_reply).last.click
fill_element :reply_input, reply_text
end
+
+ def edit!
+ click_element :edit_button
+ end
end
end
end
diff --git a/qa/qa/resource/merge_request.rb b/qa/qa/resource/merge_request.rb
index 466a7942dc6..77afb3cfcba 100644
--- a/qa/qa/resource/merge_request.rb
+++ b/qa/qa/resource/merge_request.rb
@@ -11,7 +11,9 @@ module QA
:target_branch,
:assignee,
:milestone,
- :labels
+ :labels,
+ :file_name,
+ :file_content
attribute :project do
Project.fabricate! do |resource|
@@ -35,8 +37,8 @@ module QA
resource.branch_name = target_branch
resource.remote_branch = source_branch
resource.new_branch = false
- resource.file_name = "added_file.txt"
- resource.file_content = "File Added"
+ resource.file_name = file_name
+ resource.file_content = file_content
end
end
@@ -48,6 +50,8 @@ module QA
@assignee = nil
@milestone = nil
@labels = []
+ @file_name = "added_file.txt"
+ @file_content = "File Added"
end
def fabricate!