diff options
Diffstat (limited to 'qa/qa/page/project/branches/show.rb')
-rw-r--r-- | qa/qa/page/project/branches/show.rb | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/qa/qa/page/project/branches/show.rb b/qa/qa/page/project/branches/show.rb index 4bf8abb555b..22b960b47ce 100644 --- a/qa/qa/page/project/branches/show.rb +++ b/qa/qa/page/project/branches/show.rb @@ -16,22 +16,22 @@ module QA end view 'app/views/projects/branches/_branch.html.haml' do - element :branch_name + element :badge_content + element :branch_container + element :branch_link end view 'app/views/projects/branches/_panel.html.haml' do - element :all_branches + element :all_branches_container end view 'app/views/projects/branches/index.html.haml' do - element :delete_merged_branches + element :delete_merged_branches_link end def delete_branch(branch_name) - within_element(:all_branches) do - within(".js-branch-#{branch_name}") do - click_element(:delete_branch_button) - end + within_element(:branch_container, name: branch_name) do + click_element(:delete_branch_button) end click_element(:delete_branch_confirmation_button) @@ -41,22 +41,20 @@ module QA def has_no_branch?(branch_name, reload: false) wait_until(reload: reload) do - within_element(:all_branches) do - has_no_element?(:branch_name, text: branch_name) + within_element(:all_branches_container) do + has_no_element?(:branch_link, text: branch_name) end end end def has_branch_with_badge?(branch_name, badge) - within_element(:all_branches) do - within(".js-branch-#{branch_name} .badge") do - has_text?(badge) - end + within_element(:branch_container, name: branch_name) do + has_element?(:badge_content, text: badge) end end def delete_merged_branches - click_element(:delete_merged_branches) + click_element(:delete_merged_branches_link) click_confirmation_ok_button end end |