Commit af852707 authored by Walmyr's avatar Walmyr

Merge branch 'qa/roadmap-e2e-test' into 'master'

End-to-end test for Roadmap Ultimate feature

Closes gitlab-org/quality/testcases#81

See merge request gitlab-org/gitlab-ee!15060
parents ff83e599 f7d9904d
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
</script> </script>
<template> <template>
<span class="epic-details-cell"> <span class="epic-details-cell" data-qa-selector="epic_details_cell">
<div class="epic-title"> <div class="epic-title">
<a v-tooltip :href="epic.webUrl" :title="epic.title" data-container="body" class="epic-url"> <a v-tooltip :href="epic.webUrl" :title="epic.title" data-container="body" class="epic-url">
{{ epic.title }} {{ epic.title }}
......
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
</script> </script>
<template> <template>
<span :style="itemStyles" class="epic-timeline-cell"> <span :style="itemStyles" class="epic-timeline-cell" data-qa-selector="epic_timeline_cell">
<div class="timeline-bar-wrapper"> <div class="timeline-bar-wrapper">
<a <a
v-if="showTimelineBar" v-if="showTimelineBar"
......
...@@ -128,6 +128,7 @@ export default { ...@@ -128,6 +128,7 @@ export default {
:class="{ 'prevent-vertical-scroll': noScroll }" :class="{ 'prevent-vertical-scroll': noScroll }"
:style="containerStyles" :style="containerStyles"
class="roadmap-shell" class="roadmap-shell"
data-qa-selector="roadmap_shell"
@scroll="handleScroll" @scroll="handleScroll"
> >
<roadmap-timeline-section <roadmap-timeline-section
......
...@@ -103,6 +103,7 @@ module QA ...@@ -103,6 +103,7 @@ module QA
module Group module Group
autoload :IssuesAnalytics, 'qa/ee/page/group/issues_analytics' autoload :IssuesAnalytics, 'qa/ee/page/group/issues_analytics'
autoload :Roadmap, 'qa/ee/page/group/roadmap'
module Epic module Epic
autoload :Index, 'qa/ee/page/group/epic/index' autoload :Index, 'qa/ee/page/group/epic/index'
......
# frozen_string_literal: true
module QA
module EE
module Page
module Group
class Roadmap < QA::Page::Base
view 'ee/app/assets/javascripts/roadmap/components/epic_item_details.vue' do
element :epic_details_cell
end
view 'ee/app/assets/javascripts/roadmap/components/epic_item_timeline.vue' do
element :epic_timeline_cell
end
view 'ee/app/assets/javascripts/roadmap/components/roadmap_shell.vue' do
element :roadmap_shell
end
def epic_present?(epic)
uri = URI(epic.group.web_url)
group_relative_url = uri.path
epic_href_selector = "a[href='#{group_relative_url}/-/epics/#{epic.iid}']"
find_element(:roadmap_shell).find("#{epic_details_cell} #{epic_href_selector}") &&
find_element(:roadmap_shell).find("#{epic_timeline_cell} #{epic_href_selector}")
end
end
end
end
end
end
...@@ -12,6 +12,17 @@ module QA ...@@ -12,6 +12,17 @@ module QA
attribute :id attribute :id
attribute :iid attribute :iid
attribute :start_date_is_fixed
attribute :start_date_fixed
attribute :due_date_is_fixed
attribute :due_date_fixed
def initialize
@start_date_is_fixed = false
@start_date_fixed = nil
@due_date_is_fixed = false
@due_date_fixed = nil
end
def fabricate! def fabricate!
group.visit! group.visit!
...@@ -44,7 +55,11 @@ module QA ...@@ -44,7 +55,11 @@ module QA
def api_post_body def api_post_body
{ {
title: title title: title,
start_date_is_fixed: @start_date_is_fixed,
start_date_fixed: @start_date_fixed,
due_date_is_fixed: @due_date_is_fixed,
due_date_fixed: @due_date_fixed
} }
end end
end end
......
# frozen_string_literal: true
module QA
# https://gitlab.com/gitlab-org/gitlab-ee/issues/13360
context 'Plan', :quarantine do
describe 'Epics roadmap' do
let(:epic) do
EE::Resource::Epic.fabricate_via_api! do |epic|
current_date = DateTime.now
current_date_yyyy_mm_dd = current_date.strftime("%Y/%m/%d")
next_month_date_yyyy_mm_dd = current_date.next_month.strftime("%Y/%m/%d")
epic.title = 'Epic created via API to test roadmap'
epic.start_date_is_fixed = true
epic.start_date_fixed = current_date_yyyy_mm_dd
epic.due_date_is_fixed = true
epic.due_date_fixed = next_month_date_yyyy_mm_dd
end
end
before do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
end
it 'presents epic on roadmap' do
page.visit("#{epic.group.web_url}/-/roadmap")
EE::Page::Group::Roadmap.perform do |roadmap|
expect(roadmap.epic_present?(epic)).to be_truthy
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