Commit 7273eb72 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch 'qa-iteration-selector-update' into 'master'

Update e2e selectors for iteration sidebar & unquarantine test

See merge request gitlab-org/gitlab!63240
parents 8d05ef17 238c31bc
......@@ -117,7 +117,6 @@ export default {
:issuable-type="issuableType"
class="gl-mt-5"
data-testid="iteration-edit"
data-qa-selector="iteration_container"
/>
</template>
<template v-else>
......@@ -129,7 +128,6 @@ export default {
:issuable-type="issuableType"
class="gl-mt-5"
data-testid="iteration-edit"
data-qa-selector="iteration_container"
/>
</template>
</div>
......
......@@ -300,7 +300,11 @@ export default {
:attributeUrl="attributeUrl"
:currentAttribute="currentAttribute"
>
<gl-link class="gl-text-gray-900! gl-font-weight-bold" :href="attributeUrl">
<gl-link
class="gl-text-gray-900! gl-font-weight-bold"
:href="attributeUrl"
:data-qa-selector="`${issuableAttribute}_link`"
>
{{ attributeTitle }}
</gl-link>
</slot>
......
......@@ -61,7 +61,7 @@
= dropdown_tag('Milestone', options: { title: _('Assign milestone'), toggle_class: 'js-milestone-select js-extra-options', filter: true, dropdown_class: 'dropdown-menu-selectable', placeholder: _('Search milestones'), data: { show_no: true, field_name: "#{issuable_type}[milestone_id]", project_id: issuable_sidebar[:project_id], issuable_id: issuable_sidebar[:id], ability_name: issuable_type, issue_update: issuable_sidebar[:issuable_json_path], use_id: true, default_no: true, selected: milestone[:title], null_default: true, display: 'static' }})
- if @project.group.present? && issuable_sidebar[:supports_iterations]
.block{ class: 'gl-pt-0!' }
.block{ class: 'gl-pt-0!', data: { qa_selector: 'iteration_container' } }
= render_if_exists 'shared/issuable/iteration_select', can_edit: can_edit_issuable.to_s, group_path: @project.group.full_path, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid], issuable_type: issuable_type
- if issuable_sidebar[:supports_time_tracking]
......
......@@ -108,24 +108,38 @@ export default {
</script>
<template>
<div data-qa-selector="iteration_container">
<gl-dropdown :text="title" class="gl-w-full" @show="onDropdownShow">
<gl-dropdown-section-header class="gl-display-flex! gl-justify-content-center">{{
__('Assign Iteration')
}}</gl-dropdown-section-header>
<gl-search-box-by-type v-model="searchTerm" />
<gl-dropdown :text="title" class="gl-w-full" @show="onDropdownShow">
<gl-dropdown-section-header class="gl-display-flex! gl-justify-content-center">{{
__('Assign Iteration')
}}</gl-dropdown-section-header>
<gl-search-box-by-type v-model="searchTerm" />
<gl-dropdown-item
:is-check-item="true"
:is-checked="isIterationChecked($options.noIteration.id)"
@click="onClick($options.noIteration)"
>
{{ $options.noIteration.title }}
</gl-dropdown-item>
<gl-dropdown-divider />
<gl-loading-icon v-if="$apollo.queries.iterations.loading" />
<template v-else-if="!glFeatures.iterationCadences">
<gl-dropdown-item
v-for="iterationItem in iterations"
:key="iterationItem.id"
:is-check-item="true"
:is-checked="isIterationChecked($options.noIteration.id)"
@click="onClick($options.noIteration)"
:is-checked="isIterationChecked(iterationItem.id)"
@click="onClick(iterationItem)"
>{{ iterationItem.title }}</gl-dropdown-item
>
{{ $options.noIteration.title }}
</gl-dropdown-item>
<gl-dropdown-divider />
<gl-loading-icon v-if="$apollo.queries.iterations.loading" />
<template v-else-if="!glFeatures.iterationCadences">
</template>
<template v-else>
<template v-for="(cadence, index) in iterationCadences">
<gl-dropdown-divider v-if="index !== 0" :key="index" />
<gl-dropdown-section-header :key="cadence.title">
{{ cadence.title }}
</gl-dropdown-section-header>
<gl-dropdown-item
v-for="iterationItem in iterations"
v-for="iterationItem in cadence.iterations"
:key="iterationItem.id"
:is-check-item="true"
:is-checked="isIterationChecked(iterationItem.id)"
......@@ -133,22 +147,6 @@ export default {
>{{ iterationItem.title }}</gl-dropdown-item
>
</template>
<template v-else>
<template v-for="(cadence, index) in iterationCadences">
<gl-dropdown-divider v-if="index !== 0" :key="index" />
<gl-dropdown-section-header :key="cadence.title">
{{ cadence.title }}
</gl-dropdown-section-header>
<gl-dropdown-item
v-for="iterationItem in cadence.iterations"
:key="iterationItem.id"
:is-check-item="true"
:is-checked="isIterationChecked(iterationItem.id)"
@click="onClick(iterationItem)"
>{{ iterationItem.title }}</gl-dropdown-item
>
</template>
</template>
</gl-dropdown>
</div>
</template>
</gl-dropdown>
</template>
......@@ -34,7 +34,6 @@ exports[`ee/BoardContentSidebar matches the snapshot 1`] = `
<sidebardropdownwidget-stub
attrworkspacepath="gitlab-org"
class="gl-mt-5"
data-qa-selector="iteration_container"
data-testid="iteration-edit"
iid="27"
issuableattribute="iteration"
......
......@@ -31,8 +31,8 @@ exports[`IterationDropdown default shows gl-dropdown 1`] = `
secondarytext=""
>
No iteration
No iteration
</gl-dropdown-item-stub>
<gl-dropdown-divider-stub />
......
......@@ -16,6 +16,14 @@ module QA
element :edit_link
end
view 'app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue' do
element :iteration_link, "`${issuableAttribute}_link`" # rubocop:disable QA/ElementWithPattern
end
view 'app/views/shared/issuable/_sidebar.html.haml' do
element :iteration_container
end
view 'ee/app/assets/javascripts/sidebar/components/weight/weight.vue' do
element :edit_weight_link
element :remove_weight_link
......
......@@ -23,7 +23,7 @@ module QA
Flow::Login.sign_in
end
it 'assigns a group iteration to an existing issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1173', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/332484', type: :stale } do
it 'assigns a group iteration to an existing issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1173' do
issue.visit!
Page::Project::Issue::Show.perform do |issue|
......
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