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
This commit is contained in:
commit
fc4c795685
3 changed files with 13 additions and 11 deletions
|
@ -4,6 +4,7 @@ module QA
|
||||||
class Sidebar < Page::Base
|
class Sidebar < Page::Base
|
||||||
view 'app/views/shared/issuable/_sidebar.html.haml' do
|
view 'app/views/shared/issuable/_sidebar.html.haml' do
|
||||||
element :labels_block, ".issuable-show-labels"
|
element :labels_block, ".issuable-show-labels"
|
||||||
|
element :milestones_block, '.block.milestone'
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_label?(label)
|
def has_label?(label)
|
||||||
|
@ -11,6 +12,12 @@ module QA
|
||||||
!!find('span', text: label)
|
!!find('span', text: label)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def has_milestone?(milestone)
|
||||||
|
page.within('.block.milestone') do
|
||||||
|
!!find("[href*='/milestones/']", text: milestone)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -79,12 +79,6 @@ module QA
|
||||||
|
|
||||||
click_element :squash_checkbox
|
click_element :squash_checkbox
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_milestone?(milestone_title)
|
|
||||||
page.within('.issuable-sidebar') do
|
|
||||||
!!find("[href*='/milestones/']", text: milestone_title, wait: 1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,11 +20,12 @@ module QA
|
||||||
merge_request.milestone = current_milestone
|
merge_request.milestone = current_milestone
|
||||||
end
|
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('This is a merge request with a milestone')
|
expect(page).to have_content('Great feature with milestone')
|
||||||
expect(page).to have_content('Great feature with milestone')
|
expect(page).to have_content(/Opened [\w\s]+ ago/)
|
||||||
expect(page).to have_content(/Opened [\w\s]+ ago/)
|
|
||||||
expect(merge_request).to have_milestone(current_milestone.title)
|
Page::Issuable::Sidebar.perform do |sidebar|
|
||||||
|
expect(sidebar).to have_milestone(current_milestone.title)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue