Commit dc06f23d authored by Dan Davison's avatar Dan Davison

Merge branch 'qa-add-issuable-list-vue-selectors' into 'master'

Adds qa selectors for issuable list vue

Closes #230922, #230917, and #230916

See merge request gitlab-org/gitlab!37627
parents ac510e71 e64e8a84
...@@ -237,6 +237,8 @@ export default { ...@@ -237,6 +237,8 @@ export default {
:data-id="issuable.id" :data-id="issuable.id"
:data-labels="labelIdsString" :data-labels="labelIdsString"
:data-url="issuable.web_url" :data-url="issuable.web_url"
data-qa-selector="issue_container"
:data-qa-issue-title="issuable.title"
> >
<div class="gl-display-flex"> <div class="gl-display-flex">
<!-- Bulk edit checkbox --> <!-- Bulk edit checkbox -->
...@@ -265,7 +267,12 @@ export default { ...@@ -265,7 +267,12 @@ export default {
:title="$options.confidentialTooltipText" :title="$options.confidentialTooltipText"
:aria-label="$options.confidentialTooltipText" :aria-label="$options.confidentialTooltipText"
/> />
<gl-link :href="issuable.web_url" :target="linkTarget" data-testid="issuable-title"> <gl-link
:href="issuable.web_url"
:target="linkTarget"
data-testid="issuable-title"
data-qa-selector="issue_link"
>
{{ issuable.title }} {{ issuable.title }}
<gl-icon <gl-icon
v-if="isJiraIssue" v-if="isJiraIssue"
...@@ -355,6 +362,7 @@ export default { ...@@ -355,6 +362,7 @@ export default {
:title="__('Weight')" :title="__('Weight')"
class="gl-display-none d-sm-inline-block" class="gl-display-none d-sm-inline-block"
data-testid="weight" data-testid="weight"
data-qa-selector="issuable_weight_content"
> >
<gl-icon name="weight" class="align-text-bottom" /> <gl-icon name="weight" class="align-text-bottom" />
{{ issuable.weight }} {{ issuable.weight }}
......
...@@ -88,6 +88,7 @@ export default { ...@@ -88,6 +88,7 @@ export default {
:img-size="iconSize" :img-size="iconSize"
class="js-no-trigger" class="js-no-trigger"
tooltip-placement="bottom" tooltip-placement="bottom"
data-qa-selector="assignee_link"
> >
<span class="js-assignee-tooltip"> <span class="js-assignee-tooltip">
<span class="bold d-block">{{ __('Assignee') }}</span> {{ assignee.name }} <span class="bold d-block">{{ __('Assignee') }}</span> {{ assignee.name }}
...@@ -100,6 +101,7 @@ export default { ...@@ -100,6 +101,7 @@ export default {
:title="assigneesCounterTooltip" :title="assigneesCounterTooltip"
class="avatar-counter" class="avatar-counter"
data-placement="bottom" data-placement="bottom"
data-qa-selector="avatar_counter_content"
>{{ assigneeCounterLabel }}</span >{{ assigneeCounterLabel }}</span
> >
</div> </div>
......
-# DANGER: Any changes to this file need to be reflected in issuables_list/components/issuable.vue! -# DANGER: Any changes to this file need to be reflected in issuables_list/components/issuable.vue!
%li{ id: dom_id(issue), class: issue_css_classes(issue), url: issue_path(issue), data: { labels: issue.label_ids, id: issue.id, qa_selector: 'issue', qa_issue_title: issue.title } } %li{ id: dom_id(issue), class: issue_css_classes(issue), url: issue_path(issue), data: { labels: issue.label_ids, id: issue.id, qa_selector: 'issue_container', qa_issue_title: issue.title } }
.issue-box .issue-box
- if @can_bulk_update - if @can_bulk_update
.issue-check.hidden .issue-check.hidden
......
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
= link_to_member(@project, assignee, name: false, title: "Assigned to :name") = link_to_member(@project, assignee, name: false, title: "Assigned to :name")
- if more_assignees_count.positive? - if more_assignees_count.positive?
%span{ class: 'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old', 'original-title' => "+#{more_assignees_count} more assignees", qa_selector: 'avatar_counter' } } +#{more_assignees_count} %span{ class: 'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old', 'original-title' => "+#{more_assignees_count} more assignees", qa_selector: 'avatar_counter_content' } } +#{more_assignees_count}
- issue = local_assigns.fetch(:issue) - issue = local_assigns.fetch(:issue)
- if issue.weight - if issue.weight
%span.issuable-weight.d-none.d-sm-inline-block.has-tooltip{ data: { container: 'body', qa_selector: 'issuable_weight' }, title: _('Weight') } %span.issuable-weight.d-none.d-sm-inline-block.has-tooltip{ data: { container: 'body', qa_selector: 'issuable_weight_content' }, title: _('Weight') }
&nbsp; &nbsp;
= sprite_icon('weight', size: 16, css_class: 'issue-weight-icon') = sprite_icon('weight', size: 16, css_class: 'issue-weight-icon')
= issue.weight = issue.weight
...@@ -17,14 +17,14 @@ module QA ...@@ -17,14 +17,14 @@ module QA
element :issue_filter_input, /%input.form-control.filtered-search/ # rubocop:disable QA/ElementWithPattern element :issue_filter_input, /%input.form-control.filtered-search/ # rubocop:disable QA/ElementWithPattern
end end
view 'ee/app/views/projects/issues/_issue_weight.html.haml' do view 'app/assets/javascripts/issuables_list/components/issuable.vue' do
element :issuable_weight element :issuable_weight_content
end end
end end
end end
def issuable_weight def issuable_weight
find_element(:issuable_weight) find_element(:issuable_weight_content)
end end
def wait_for_issue_replication(issue) def wait_for_issue_replication(issue)
......
...@@ -5,8 +5,14 @@ module QA ...@@ -5,8 +5,14 @@ module QA
module Project module Project
module Issue module Issue
class Index < Page::Base class Index < Page::Base
view 'app/helpers/projects_helper.rb' do view 'app/assets/javascripts/issuables_list/components/issuable.vue' do
element :issue_container
element :issue_link
end
view 'app/assets/javascripts/vue_shared/components/issue/issue_assignees.vue' do
element :assignee_link element :assignee_link
element :avatar_counter_content
end end
view 'app/views/projects/issues/export_csv/_button.html.haml' do view 'app/views/projects/issues/export_csv/_button.html.haml' do
...@@ -23,21 +29,12 @@ module QA ...@@ -23,21 +29,12 @@ module QA
element :import_from_jira_link element :import_from_jira_link
end end
view 'app/views/projects/issues/_issue.html.haml' do
element :issue
element :issue_link, 'link_to issue.title' # rubocop:disable QA/ElementWithPattern
end
view 'app/views/shared/issuable/_assignees.html.haml' do
element :avatar_counter
end
view 'app/views/shared/issuable/_nav.html.haml' do view 'app/views/shared/issuable/_nav.html.haml' do
element :closed_issues_link element :closed_issues_link
end end
def avatar_counter def avatar_counter
find_element(:avatar_counter) find_element(:avatar_counter_content)
end end
def click_issue_link(title) def click_issue_link(title)
...@@ -80,7 +77,7 @@ module QA ...@@ -80,7 +77,7 @@ module QA
end end
def has_issue?(issue) def has_issue?(issue)
has_element? :issue, issue_title: issue.title has_element? :issue_container, issue_title: issue.title
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