Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
af47c716
Commit
af47c716
authored
Aug 15, 2019
by
Desiree Chevalier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GitLab Insights e2e tests
Adds an e2e spec for testing Gitlab Insights
parent
99ad6e19
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
145 additions
and
4 deletions
+145
-4
ee/app/assets/javascripts/insights/components/insights.vue
ee/app/assets/javascripts/insights/components/insights.vue
+1
-0
ee/app/assets/javascripts/insights/components/insights_page.vue
.../assets/javascripts/insights/components/insights_page.vue
+2
-2
ee/app/views/layouts/nav/_group_insights_link.html.haml
ee/app/views/layouts/nav/_group_insights_link.html.haml
+1
-1
ee/app/views/layouts/nav/_project_insights_link.html.haml
ee/app/views/layouts/nav/_project_insights_link.html.haml
+1
-1
qa/qa/ee.rb
qa/qa/ee.rb
+5
-0
qa/qa/ee/page/group/menu.rb
qa/qa/ee/page/group/menu.rb
+10
-0
qa/qa/ee/page/insights/show.rb
qa/qa/ee/page/insights/show.rb
+53
-0
qa/qa/ee/page/project/menu.rb
qa/qa/ee/page/project/menu.rb
+22
-0
qa/qa/specs/features/ee/browser_ui/1_manage/insights/default_insights_spec.rb
.../ee/browser_ui/1_manage/insights/default_insights_spec.rb
+50
-0
No files found.
ee/app/assets/javascripts/insights/components/insights.vue
View file @
af47c716
...
...
@@ -64,6 +64,7 @@ export default {
<div
v-else-if=
"configPresent"
class=
"insights-wrapper"
>
<gl-dropdown
class=
"js-insights-dropdown col-8 col-md-9 gl-pr-0"
data-qa-selector=
"insights_dashboard_dropdown"
menu-class=
"w-100 mw-100"
toggle-class=
"dropdown-menu-toggle w-100 gl-field-error-outline"
:text=
"__('Select Page')"
...
...
ee/app/assets/javascripts/insights/components/insights_page.vue
View file @
af47c716
...
...
@@ -90,10 +90,10 @@ export default {
};
</
script
>
<
template
>
<div
class=
"insights-page"
>
<div
class=
"insights-page"
data-qa-selector=
"insights_page"
>
<div
v-if=
"hasChartsConfigured"
class=
"js-insights-page-container"
>
<h4
class=
"text-center"
>
{{
pageConfig
.
title
}}
</h4>
<div
v-if=
"!pageLoading"
class=
"insights-charts"
>
<div
v-if=
"!pageLoading"
class=
"insights-charts"
data-qa-selector=
"insights_charts"
>
<div
v-for=
"(insights, key, index) in chartData"
:key=
"index"
class=
"insights-chart"
>
<component
:is=
"chartType(insights.type)"
...
...
ee/app/views/layouts/nav/_group_insights_link.html.haml
View file @
af47c716
-
return
unless
group_sidebar_link?
(
:group_insights
)
=
nav_link
(
path:
'groups/insights#show'
)
do
=
link_to
group_insights_path
(
@group
),
title:
_
(
'Insights'
),
class:
'shortcuts-group-insights'
do
=
link_to
group_insights_path
(
@group
),
title:
_
(
'Insights'
),
class:
'shortcuts-group-insights'
,
data:
{
qa_selector:
'group_insights_link'
}
do
%span
=
_
(
'Insights'
)
ee/app/views/layouts/nav/_project_insights_link.html.haml
View file @
af47c716
-
return
unless
project_nav_tab?
(
:project_insights
)
=
nav_link
(
path:
'projects/insights#show'
)
do
=
link_to
project_insights_path
(
@project
),
title:
_
(
'Insights'
),
class:
'shortcuts-project-insights'
do
=
link_to
project_insights_path
(
@project
),
title:
_
(
'Insights'
),
class:
'shortcuts-project-insights'
,
data:
{
qa_selector:
'project_insights_link'
}
do
%span
=
_
(
'Insights'
)
qa/qa/ee.rb
View file @
af47c716
...
...
@@ -64,6 +64,7 @@ module QA
module
Project
autoload
:New
,
'qa/ee/page/project/new'
autoload
:Show
,
'qa/ee/page/project/show'
autoload
:Menu
,
'qa/ee/page/project/menu'
module
SubMenus
autoload
:SecurityCompliance
,
'qa/ee/page/project/sub_menus/security_compliance'
...
...
@@ -119,6 +120,10 @@ module QA
autoload
:Show
,
'qa/ee/page/group/secure/show'
end
end
module
Insights
autoload
:Show
,
'qa/ee/page/insights/show'
end
end
module
Resource
...
...
qa/qa/ee/page/group/menu.rb
View file @
af47c716
...
...
@@ -25,6 +25,10 @@ module QA
element
:security_dashboard_link
end
view
'ee/app/views/layouts/nav/_group_insights_link.html.haml'
do
element
:group_insights_link
end
def
go_to_saml_sso_group_settings
hover_settings
do
within_submenu
do
...
...
@@ -41,6 +45,12 @@ module QA
end
end
def
click_group_insights_link
within_sidebar
do
click_element
(
:group_insights_link
)
end
end
def
click_group_members_item
within_sidebar
do
click_element
(
:group_members_item
)
...
...
qa/qa/ee/page/insights/show.rb
0 → 100644
View file @
af47c716
# frozen_string_literal: true
module
QA
module
EE
module
Page
module
Insights
class
Show
<
QA
::
Page
::
Base
view
'ee/app/assets/javascripts/insights/components/insights.vue'
do
element
:insights_dashboard_dropdown
end
view
'ee/app/assets/javascripts/insights/components/insights_page.vue'
do
element
:insights_charts
element
:insights_page
end
def
wait_for_insight_charts_to_load
wait
(
reload:
false
)
do
has_element?
(
:insights_charts
)
end
end
def
select_insights_dashboard
(
title
)
click_element
:insights_dashboard_dropdown
within_insights_dropdown
do
has_text?
(
title
)
click_on
title
end
wait_for_insight_charts_to_load
end
def
has_insights_dashboard_title?
(
title
)
within_insights_page
do
has_text?
(
title
)
end
end
def
within_insights_dropdown
within_element
:insights_dashboard_dropdown
do
yield
end
end
def
within_insights_page
within_element
:insights_page
do
yield
end
end
end
end
end
end
end
qa/qa/ee/page/project/menu.rb
0 → 100644
View file @
af47c716
# frozen_string_literal: true
module
QA
module
EE
module
Page
module
Project
class
Menu
<
::
QA
::
Page
::
Base
include
QA
::
Page
::
Project
::
SubMenus
::
Common
view
'ee/app/views/layouts/nav/_project_insights_link.html.haml'
do
element
:project_insights_link
end
def
click_project_insights_link
within_sidebar
do
click_element
(
:project_insights_link
)
end
end
end
end
end
end
end
qa/qa/specs/features/ee/browser_ui/1_manage/insights/default_insights_spec.rb
0 → 100644
View file @
af47c716
# frozen_string_literal: true
module
QA
context
'Manage'
do
shared_examples
'default insights page'
do
it
'displays issues and merge requests dashboards'
do
EE
::
Page
::
Insights
::
Show
.
perform
do
|
show
|
show
.
wait_for_insight_charts_to_load
expect
(
show
).
to
have_insights_dashboard_title
(
'Issues Dashboard'
)
show
.
select_insights_dashboard
(
'Merge Requests Dashboard'
)
expect
(
show
).
to
have_insights_dashboard_title
(
'Merge Requests Dashboard'
)
end
end
end
before
(
:all
)
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
end
context
'group insights page'
do
before
do
group
=
Resource
::
Group
.
fabricate_via_api!
group
.
visit!
EE
::
Page
::
Group
::
Menu
.
perform
(
&
:click_group_insights_link
)
end
it_behaves_like
'default insights page'
end
context
'project insights page'
do
before
do
project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'project-insights'
project
.
description
=
'Project Insights'
end
project
.
visit!
EE
::
Page
::
Project
::
Menu
.
perform
(
&
:click_project_insights_link
)
end
it_behaves_like
'default insights page'
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment