Commit b6b485f9 authored by Walmyr's avatar Walmyr

Merge branch 'qa/issues_analytics_e2e-test' into 'master'

End-to-end test for Issues Analytics Premium feature

Closes gitlab-org/quality/testcases#82

See merge request gitlab-org/gitlab-ee!15084
parents 227d53e6 9c63f54f
...@@ -183,7 +183,7 @@ export default { ...@@ -183,7 +183,7 @@ export default {
<div class="chart-legend d-none d-sm-block bold align-self-center"> <div class="chart-legend d-none d-sm-block bold align-self-center">
{{ s__('IssuesAnalytics|Issues Created') }} {{ s__('IssuesAnalytics|Issues Created') }}
</div> </div>
<div class="chart-canvas-wrapper"> <div class="chart-canvas-wrapper" data-qa-selector="issues_analytics_graph">
<canvas ref="issuesChart" height="300" class="append-bottom-15"></canvas> <canvas ref="issuesChart" height="300" class="append-bottom-15"></canvas>
</div> </div>
</div> </div>
......
...@@ -102,6 +102,8 @@ module QA ...@@ -102,6 +102,8 @@ module QA
end end
module Group module Group
autoload :IssuesAnalytics, 'qa/ee/page/group/issues_analytics'
module Epic module Epic
autoload :Index, 'qa/ee/page/group/epic/index' autoload :Index, 'qa/ee/page/group/epic/index'
autoload :Show, 'qa/ee/page/group/epic/show' autoload :Show, 'qa/ee/page/group/epic/show'
......
# frozen_string_literal: true
module QA
module EE
module Page
module Group
class IssuesAnalytics < QA::Page::Base
view 'ee/app/assets/javascripts/issues_analytics/components/issues_analytics.vue' do
element :issues_analytics_graph
end
def graph
find_element(:issues_analytics_graph)
end
end
end
end
end
end
# frozen_string_literal: true
module QA
context 'Plan' do
describe 'Issues analytics' do
let(:issue) do
Resource::Issue.fabricate_via_api! do |issue|
issue.title = 'Issue to test Issues Analytics'
end
end
before do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
end
it 'displays a graph' do
page.visit("#{issue.project.group.web_url}/-/issues_analytics")
EE::Page::Group::IssuesAnalytics.perform do |issues_analytics|
expect(issues_analytics.graph).to be_visible
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