Commit 8a5c3f65 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'qa-update-e2e-for-vue-issues-list-ff' into 'master'

Update e2e tests for vue_issues_list ff

See merge request gitlab-org/gitlab!75285
parents 9bce23fe 7be97553
......@@ -272,6 +272,7 @@ export default {
:show-checkbox="showBulkEditSidebar"
:checkbox-checked="allIssuablesChecked"
class="gl-flex-grow-1 gl-border-t-none row-content-block"
data-qa-selector="issuable_search_container"
@checked-input="handleAllIssuablesCheckedInput"
@onFilter="$emit('filter', $event)"
@onSort="$emit('sort', $event)"
......@@ -302,6 +303,8 @@ export default {
v-for="issuable in issuables"
:key="issuableId(issuable)"
:class="{ 'gl-cursor-grab': isManualOrdering }"
data-qa-selector="issuable_container"
:data-qa-issuable-title="issuable.title"
:issuable-symbol="issuableSymbol"
:issuable="issuable"
:enable-label-permalinks="enableLabelPermalinks"
......
......@@ -46,7 +46,9 @@ export default {
@click="$emit('click', tab.name)"
>
<template #title>
<span :title="tab.titleTooltip">{{ tab.title }}</span>
<span :title="tab.titleTooltip" :data-qa-selector="`${tab.name}_issuables_tab`">
{{ tab.title }}
</span>
<gl-badge
v-if="tabCounts && isTabCountNumeric(tab)"
variant="muted"
......
......@@ -26,7 +26,11 @@ export default {
<template>
<issue-card-time-info :issue="issue">
<weight-count class="issuable-weight gl-mr-3" :weight="issue.weight" />
<weight-count
class="issuable-weight gl-mr-3"
:weight="issue.weight"
data-qa-selector="issuable_weight_content"
/>
<issue-health-status v-if="showHealthStatus" :health-status="issue.healthStatus" />
</issue-card-time-info>
</template>
......@@ -12,12 +12,7 @@ module QA
super
base.class_eval do
view 'app/views/shared/issuable/_search_bar.html.haml' do
element :issue_filter_form, /form_tag.+class: 'filter-form / # rubocop:disable QA/ElementWithPattern
element :issue_filter_input, /%input.form-control.filtered-search/ # rubocop:disable QA/ElementWithPattern
end
view 'app/assets/javascripts/issues_list/components/issuable.vue' do
view 'ee/app/assets/javascripts/issues_list/components/issue_card_time_info.vue' do
element :issuable_weight_content
end
end
......@@ -38,8 +33,8 @@ module QA
end
def filter_by_title(title)
page.within('form.filter-form') do
fill_in class: 'filtered-search', with: title
within_element(:issuable_search_container) do
fill_in class: 'gl-filtered-search-term-input', with: title
end
end
end
......
......@@ -5,9 +5,9 @@ module QA
module Project
module Issue
class Index < Page::Base
view 'app/assets/javascripts/issues_list/components/issuable.vue' do
element :issue_container
element :issue_link
view 'app/assets/javascripts/vue_shared/issuable/list/components/issuable_list_root.vue' do
element :issuable_container
element :issuable_search_container
end
view 'app/assets/javascripts/vue_shared/components/issue/issue_assignees.vue' do
......@@ -25,8 +25,8 @@ module QA
element :import_issues_dropdown
end
view 'app/views/shared/issuable/_nav.html.haml' do
element :closed_issues_link
view 'app/assets/javascripts/vue_shared/issuable/list/components/issuable_tabs.vue' do
element :closed_issuables_tab, ':data-qa-selector="`${tab.name}_issuables_tab`"' # rubocop:disable QA/ElementWithPattern
end
def avatar_counter
......@@ -37,8 +37,8 @@ module QA
click_link(title)
end
def click_closed_issues_link
click_element :closed_issues_link
def click_closed_issues_tab
click_element(:closed_issuables_tab)
end
def click_export_as_csv_button
......@@ -73,11 +73,17 @@ module QA
end
def has_issue?(issue)
has_element? :issue_container, issue_title: issue.title
has_element? :issuable_container, issuable_title: issue.title
end
def has_no_issue?(issue)
has_no_element? :issue_container, issue_title: issue.title
has_no_element? :issuable_container, issuable_title: issue.title
end
def wait_for_vue_issues_list_ff
Support::Retrier.retry_until(max_duration: 60, reload_page: page, retry_on_exception: true, sleep_interval: 5) do
find_element(:closed_issuables_tab)
end
end
end
end
......
# frozen_string_literal: true
module QA
RSpec.describe 'Plan', :smoke do
# TODO: Remove :requires_admin when the `Runtime::Feature.enable` method call is removed
RSpec.describe 'Plan', :smoke, :requires_admin do
describe 'Issue creation' do
let(:closed_issue) { Resource::Issue.fabricate_via_api! }
let(:project) { Resource::Project.fabricate_via_api! }
let(:closed_issue) { Resource::Issue.fabricate_via_api! { |issue| issue.project = project } }
before do
Runtime::Feature.enable(:vue_issues_list, group: project.group)
Flow::Login.sign_in
end
it 'creates an issue', :mobile, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1185' do
issue = Resource::Issue.fabricate_via_browser_ui!
issue = Resource::Issue.fabricate_via_browser_ui! { |issue| issue.project = project }
Page::Project::Menu.perform(&:click_issues)
# TODO: Remove this method when the `Runtime::Feature.enable` method call is removed
Page::Project::Issue::Index.perform(&:wait_for_vue_issues_list_ff)
Page::Project::Issue::Index.perform do |index|
expect(index).to have_issue(issue)
end
......@@ -29,10 +36,14 @@ module QA
end
Page::Project::Menu.perform(&:click_issues)
# TODO: Remove this method when the `Runtime::Feature.enable` method call is removed
Page::Project::Issue::Index.perform(&:wait_for_vue_issues_list_ff)
Page::Project::Issue::Index.perform do |index|
expect(index).not_to have_issue(closed_issue)
index.click_closed_issues_link
index.click_closed_issues_tab
expect(index).to have_issue(closed_issue)
end
......@@ -45,7 +56,7 @@ module QA
end
before do
Resource::Issue.fabricate_via_api!.visit!
Resource::Issue.fabricate_via_api! { |issue| issue.project = project }.visit!
end
# The following example is excluded from running in `review-qa-smoke` job
......
# frozen_string_literal: true
module QA
RSpec.describe 'Geo', :orchestrated, :geo do
# TODO: Remove :requires_admin when the `Runtime::Feature.enable` method call is removed
RSpec.describe 'Geo', :orchestrated, :geo, :requires_admin do
describe 'GitLab Geo attachment replication' do
let(:file_to_attach) { File.absolute_path(File.join('qa', 'fixtures', 'designs', 'banana_sample.gif')) }
......@@ -12,6 +13,8 @@ module QA
project.description = 'project for adding issues'
end
Runtime::Feature.enable(:vue_issues_list, group: @project.group)
@issue = Resource::Issue.fabricate_via_api! do |issue|
issue.title = 'My geo issue'
issue.project = @project
......@@ -44,6 +47,9 @@ module QA
Page::Project::Menu.act { click_issues }
Page::Project::Issue::Index.perform do |index|
# TODO: Remove this method when the `Runtime::Feature.enable` method call is removed
index.wait_for_vue_issues_list_ff
index.wait_for_issue_replication(@issue)
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