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 {
:data-id="issuable.id"
:data-labels="labelIdsString"
:data-url="issuable.web_url"
data-qa-selector="issue_container"
:data-qa-issue-title="issuable.title"
>
<div class="gl-display-flex">
<!-- Bulk edit checkbox -->
......@@ -265,7 +267,12 @@ export default {
:title="$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 }}
<gl-icon
v-if="isJiraIssue"
......@@ -355,6 +362,7 @@ export default {
:title="__('Weight')"
class="gl-display-none d-sm-inline-block"
data-testid="weight"
data-qa-selector="issuable_weight_content"
>
<gl-icon name="weight" class="align-text-bottom" />
{{ issuable.weight }}
......
......@@ -88,6 +88,7 @@ export default {
:img-size="iconSize"
class="js-no-trigger"
tooltip-placement="bottom"
data-qa-selector="assignee_link"
>
<span class="js-assignee-tooltip">
<span class="bold d-block">{{ __('Assignee') }}</span> {{ assignee.name }}
......@@ -100,6 +101,7 @@ export default {
:title="assigneesCounterTooltip"
class="avatar-counter"
data-placement="bottom"
data-qa-selector="avatar_counter_content"
>{{ assigneeCounterLabel }}</span
>
</div>
......
-# 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
- if @can_bulk_update
.issue-check.hidden
......
......@@ -7,4 +7,4 @@
= link_to_member(@project, assignee, name: false, title: "Assigned to :name")
- 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)
- 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;
= sprite_icon('weight', size: 16, css_class: 'issue-weight-icon')
= issue.weight
......@@ -17,14 +17,14 @@ module QA
element :issue_filter_input, /%input.form-control.filtered-search/ # rubocop:disable QA/ElementWithPattern
end
view 'ee/app/views/projects/issues/_issue_weight.html.haml' do
element :issuable_weight
view 'app/assets/javascripts/issuables_list/components/issuable.vue' do
element :issuable_weight_content
end
end
end
def issuable_weight
find_element(:issuable_weight)
find_element(:issuable_weight_content)
end
def wait_for_issue_replication(issue)
......
......@@ -5,8 +5,14 @@ module QA
module Project
module Issue
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 :avatar_counter_content
end
view 'app/views/projects/issues/export_csv/_button.html.haml' do
......@@ -23,21 +29,12 @@ module QA
element :import_from_jira_link
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
element :closed_issues_link
end
def avatar_counter
find_element(:avatar_counter)
find_element(:avatar_counter_content)
end
def click_issue_link(title)
......@@ -80,7 +77,7 @@ module QA
end
def has_issue?(issue)
has_element? :issue, issue_title: issue.title
has_element? :issue_container, issue_title: issue.title
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