diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-25 21:06:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-25 21:06:28 +0000 |
commit | eb7390edf3afd52174b786fff1e06d5ffae0cec5 (patch) | |
tree | 395dce44e5ea2b55704414e4d38fc24da4b1b676 /qa | |
parent | 801ced25ff0540b096c395f9ac8d2d9e005878e8 (diff) | |
download | gitlab-ce-eb7390edf3afd52174b786fff1e06d5ffae0cec5.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/dashboard/snippet/show.rb | 12 | ||||
-rw-r--r-- | qa/qa/page/issuable/sidebar.rb | 13 | ||||
-rw-r--r-- | qa/qa/page/merge_request/show.rb | 5 |
3 files changed, 13 insertions, 17 deletions
diff --git a/qa/qa/page/dashboard/snippet/show.rb b/qa/qa/page/dashboard/snippet/show.rb index a75ea63eca7..88d6ef02d22 100644 --- a/qa/qa/page/dashboard/snippet/show.rb +++ b/qa/qa/page/dashboard/snippet/show.rb @@ -6,8 +6,8 @@ module QA module Snippet class Show < Page::Base view 'app/views/shared/snippets/_header.html.haml' do - element :snippet_title - element :snippet_description + element :snippet_title, required: true + element :snippet_description, required: true element :embed_type element :snippet_box end @@ -21,15 +21,11 @@ module QA end def has_snippet_title?(snippet_title) - within_element(:snippet_title) do - has_text?(snippet_title) - end + has_element? :snippet_title, text: snippet_title end def has_snippet_description?(snippet_description) - within_element(:snippet_description) do - has_text?(snippet_description) - end + has_element? :snippet_description, text: snippet_description end def has_embed_type?(embed_type) diff --git a/qa/qa/page/issuable/sidebar.rb b/qa/qa/page/issuable/sidebar.rb index 9bb1c702576..d381c13ef5b 100644 --- a/qa/qa/page/issuable/sidebar.rb +++ b/qa/qa/page/issuable/sidebar.rb @@ -5,19 +5,20 @@ module QA module Issuable class Sidebar < Page::Base view 'app/views/shared/issuable/_sidebar.html.haml' do - element :labels_block, ".issuable-show-labels" # rubocop:disable QA/ElementWithPattern - element :milestones_block, '.block.milestone' # rubocop:disable QA/ElementWithPattern + element :labels_block + element :milestone_block + element :milestone_title end def has_label?(label) - page.within('.issuable-show-labels') do - !!find('span', text: label) + within_element(:labels_block) do + has_element?(:label, label_name: label) end end def has_milestone?(milestone) - page.within('.block.milestone') do - !!find("[href*='/milestones/']", text: milestone) + within_element(:milestone_block) do + has_element?(:milestone_title, text: milestone) end end end diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb index 14b8c420b16..54a08d911cb 100644 --- a/qa/qa/page/merge_request/show.rb +++ b/qa/qa/page/merge_request/show.rb @@ -122,9 +122,8 @@ module QA end def has_label?(label) - page.within(element_selector_css(:labels_block)) do - element = find('span', text: label) - !element.nil? + within_element(:labels_block) do + !!has_element?(:label, label_name: label) end end |