Commit 8ce331c2 authored by Walmyr Lima e Silva Filho's avatar Walmyr Lima e Silva Filho

Merge branch 'qa/e2e-tests-for-issue-weights' into 'master'

Backport of end-to-end test for visualizing issue weight on different pages

See merge request gitlab-org/gitlab-ce!32766
parents 71e44e7c 404950f1
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,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: "" } = 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 .value.hide-collapsed
- if milestone.present? - 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' } = 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' }
- else - else
%span.no-value %span.no-value
= _('None') = _('None')
......
...@@ -35,12 +35,17 @@ module QA ...@@ -35,12 +35,17 @@ module QA
element :labels_block element :labels_block
element :edit_link_labels element :edit_link_labels
element :dropdown_menu_labels element :dropdown_menu_labels
element :milestone_link
end end
view 'app/views/shared/issuable/_close_reopen_button.html.haml' do view 'app/views/shared/issuable/_close_reopen_button.html.haml' do
element :reopen_issue_button element :reopen_issue_button
end end
def click_milestone_link
click_element(:milestone_link)
end
# Adds a comment to an issue # Adds a comment to an issue
# attachment option should be an absolute path # attachment option should be an absolute path
def comment(text, attachment: nil, filter: :all_activities) def comment(text, attachment: nil, filter: :all_activities)
......
...@@ -17,3 +17,5 @@ module QA ...@@ -17,3 +17,5 @@ module QA
end end
end end
end end
QA::Page::Project::Milestone::Index.prepend_if_ee('QA::EE::Page::Project::Milestone::Index')
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
module Resource module Resource
class Issue < Base class Issue < Base
attr_writer :description, :milestone attr_writer :description, :milestone, :weight
attribute :project do attribute :project do
Project.fabricate! do |resource| Project.fabricate! do |resource|
...@@ -46,6 +46,7 @@ module QA ...@@ -46,6 +46,7 @@ module QA
title: title title: title
}.tap do |hash| }.tap do |hash|
hash[:milestone_id] = @milestone.id if @milestone hash[:milestone_id] = @milestone.id if @milestone
hash[:weight] = @weight if @weight
end end
end end
end end
......
Markdown is supported
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