summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-07-12 11:52:06 +0000
committerRémy Coutable <remy@rymai.me>2018-07-12 11:52:06 +0000
commitfc4c7956850ff40100301ea44aaf0b8b8725e114 (patch)
treed6deff4b847628100d3ce9ece44a86a8b59ad516 /qa
parent2f83794d2b727594676e25e85ada53e33cf5246a (diff)
parenta825dc229a9b9ecb76dc6b88d7002afe29ff5781 (diff)
downloadgitlab-ce-fc4c7956850ff40100301ea44aaf0b8b8725e114.tar.gz
Merge branch '48690-follow-up-from-milestone-tests' into 'master'
Resolve "Follow-up from "Milestone tests"" Closes #48690 See merge request gitlab-org/gitlab-ce!20563
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/issuable/sidebar.rb7
-rw-r--r--qa/qa/page/merge_request/show.rb6
-rw-r--r--qa/qa/specs/features/merge_request/create_spec.rb11
3 files changed, 13 insertions, 11 deletions
diff --git a/qa/qa/page/issuable/sidebar.rb b/qa/qa/page/issuable/sidebar.rb
index dec2ce1eab3..f207264e24f 100644
--- a/qa/qa/page/issuable/sidebar.rb
+++ b/qa/qa/page/issuable/sidebar.rb
@@ -4,6 +4,7 @@ module QA
class Sidebar < Page::Base
view 'app/views/shared/issuable/_sidebar.html.haml' do
element :labels_block, ".issuable-show-labels"
+ element :milestones_block, '.block.milestone'
end
def has_label?(label)
@@ -11,6 +12,12 @@ module QA
!!find('span', text: label)
end
end
+
+ def has_milestone?(milestone)
+ page.within('.block.milestone') do
+ !!find("[href*='/milestones/']", text: milestone)
+ end
+ end
end
end
end
diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb
index f3200160a78..c200f14f4fb 100644
--- a/qa/qa/page/merge_request/show.rb
+++ b/qa/qa/page/merge_request/show.rb
@@ -79,12 +79,6 @@ module QA
click_element :squash_checkbox
end
-
- def has_milestone?(milestone_title)
- page.within('.issuable-sidebar') do
- !!find("[href*='/milestones/']", text: milestone_title, wait: 1)
- end
- end
end
end
end
diff --git a/qa/qa/specs/features/merge_request/create_spec.rb b/qa/qa/specs/features/merge_request/create_spec.rb
index 5807e539699..36d7efb02e1 100644
--- a/qa/qa/specs/features/merge_request/create_spec.rb
+++ b/qa/qa/specs/features/merge_request/create_spec.rb
@@ -20,11 +20,12 @@ module QA
merge_request.milestone = current_milestone
end
- Page::MergeRequest::Show.perform do |merge_request|
- expect(page).to have_content('This is a merge request with a milestone')
- expect(page).to have_content('Great feature with milestone')
- expect(page).to have_content(/Opened [\w\s]+ ago/)
- expect(merge_request).to have_milestone(current_milestone.title)
+ expect(page).to have_content('This is a merge request with a milestone')
+ expect(page).to have_content('Great feature with milestone')
+ expect(page).to have_content(/Opened [\w\s]+ ago/)
+
+ Page::Issuable::Sidebar.perform do |sidebar|
+ expect(sidebar).to have_milestone(current_milestone.title)
end
end
end