Update merge request page object and selectors
These are changes from EE that are also relevant to CE from: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8372
This commit is contained in:
parent
89494036f0
commit
8fe96f4e50
3 changed files with 16 additions and 4 deletions
|
@ -37,6 +37,6 @@
|
||||||
= link_to 'Reopen', merge_request_path(@merge_request, merge_request: { state_event: :reopen }), method: :put, class: 'reopen-mr-link', title: 'Reopen merge request'
|
= link_to 'Reopen', merge_request_path(@merge_request, merge_request: { state_event: :reopen }), method: :put, class: 'reopen-mr-link', title: 'Reopen merge request'
|
||||||
|
|
||||||
- if can_update_merge_request
|
- if can_update_merge_request
|
||||||
= link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "d-none d-sm-none d-md-block btn btn-grouped js-issuable-edit"
|
= link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "d-none d-sm-none d-md-block btn btn-grouped js-issuable-edit qa-edit-button"
|
||||||
|
|
||||||
= render 'shared/issuable/close_reopen_button', issuable: @merge_request, can_update: can_update_merge_request, can_reopen: can_update_merge_request
|
= render 'shared/issuable/close_reopen_button', issuable: @merge_request, can_update: can_update_merge_request, can_reopen: can_update_merge_request
|
||||||
|
|
|
@ -55,6 +55,10 @@ module QA
|
||||||
element :labels_block
|
element :labels_block
|
||||||
end
|
end
|
||||||
|
|
||||||
|
view 'app/views/projects/merge_requests/_mr_title.html.haml' do
|
||||||
|
element :edit_button
|
||||||
|
end
|
||||||
|
|
||||||
def fast_forward_possible?
|
def fast_forward_possible?
|
||||||
!has_text?('Fast-forward merge is not possible')
|
!has_text?('Fast-forward merge is not possible')
|
||||||
end
|
end
|
||||||
|
@ -163,6 +167,10 @@ module QA
|
||||||
all_elements(:discussion_reply).last.click
|
all_elements(:discussion_reply).last.click
|
||||||
fill_element :reply_input, reply_text
|
fill_element :reply_input, reply_text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edit!
|
||||||
|
click_element :edit_button
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,7 +11,9 @@ module QA
|
||||||
:target_branch,
|
:target_branch,
|
||||||
:assignee,
|
:assignee,
|
||||||
:milestone,
|
:milestone,
|
||||||
:labels
|
:labels,
|
||||||
|
:file_name,
|
||||||
|
:file_content
|
||||||
|
|
||||||
attribute :project do
|
attribute :project do
|
||||||
Project.fabricate! do |resource|
|
Project.fabricate! do |resource|
|
||||||
|
@ -35,8 +37,8 @@ module QA
|
||||||
resource.branch_name = target_branch
|
resource.branch_name = target_branch
|
||||||
resource.remote_branch = source_branch
|
resource.remote_branch = source_branch
|
||||||
resource.new_branch = false
|
resource.new_branch = false
|
||||||
resource.file_name = "added_file.txt"
|
resource.file_name = file_name
|
||||||
resource.file_content = "File Added"
|
resource.file_content = file_content
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -48,6 +50,8 @@ module QA
|
||||||
@assignee = nil
|
@assignee = nil
|
||||||
@milestone = nil
|
@milestone = nil
|
||||||
@labels = []
|
@labels = []
|
||||||
|
@file_name = "added_file.txt"
|
||||||
|
@file_content = "File Added"
|
||||||
end
|
end
|
||||||
|
|
||||||
def fabricate!
|
def fabricate!
|
||||||
|
|
Loading…
Reference in a new issue