Unverified Commit 7b84905b authored by Daniel Davison's avatar Daniel Davison
Browse files

Add data-qa-title attribute to milestone title

Change validation to use milestone_link rather than title
Change has_milestone? to check for new data-qa-title
rather than text
Remove milestone_title from sidebar
Unquarantine failing spec
parent 45c51442
......@@ -33,7 +33,7 @@
.block.milestone{ data: { qa_selector: 'milestone_block' } }
.sidebar-collapsed-icon.has-tooltip{ title: sidebar_milestone_tooltip_label(milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } }
= icon('clock-o', 'aria-hidden': 'true')
%span.milestone-title.collapse-truncated-title{ data: { qa_selector: 'milestone_title' } }
%span.milestone-title.collapse-truncated-title
- if milestone.present?
= milestone[:title]
- else
......@@ -45,7 +45,7 @@
= link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link float-right', data: { track_label: "right_sidebar", track_property: "milestone", track_event: "click_edit_button", track_value: "" }
.value.hide-collapsed
- if milestone.present?
= link_to milestone[:title], milestone[:web_url], class: "bold has-tooltip", title: sidebar_milestone_remaining_days(milestone), data: { container: "body", html: 'true', boundary: 'viewport', qa_selector: 'milestone_link' }
= link_to milestone[:title], milestone[:web_url], class: "bold has-tooltip", title: sidebar_milestone_remaining_days(milestone), data: { container: "body", html: 'true', boundary: 'viewport', qa_selector: 'milestone_link', qa_title: milestone[:title] }
- else
%span.no-value
= _('None')
......
......@@ -7,7 +7,7 @@ module QA
view 'app/views/shared/issuable/_sidebar.html.haml' do
element :labels_block
element :milestone_block
element :milestone_title
element :milestone_link
end
 
def has_label?(label)
......@@ -16,9 +16,9 @@ module QA
end
end
 
def has_milestone?(milestone)
def has_milestone?(milestone_title)
within_element(:milestone_block) do
has_element?(:milestone_title, text: milestone)
has_element?(:milestone_link, title: milestone_title)
end
end
end
......
......@@ -27,8 +27,7 @@ module QA
end
end
 
# Failure issue (in master): https://gitlab.com/gitlab-org/gitlab/issues/37304
it 'creates a merge request with a milestone and label', :quarantine do
it 'creates a merge request with a milestone and label' do
gitlab_account_username = "@#{Runtime::User.username}"
 
milestone = Resource::ProjectMilestone.fabricate_via_api! do |milestone|
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment