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
4e8a2feb
Commit
4e8a2feb
authored
Aug 10, 2017
by
Mehdi Lahmam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature specs for Cycle Analytics pipeline summary
parent
3254ad4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
spec/features/cycle_analytics_spec.rb
spec/features/cycle_analytics_spec.rb
+24
-0
No files found.
spec/features/cycle_analytics_spec.rb
View file @
4e8a2feb
...
...
@@ -24,6 +24,12 @@ feature 'Cycle Analytics', js: true do
expect
(
page
).
to
have_content
(
'Introducing Cycle Analytics'
)
end
it
'shows pipeline summary'
do
expect
(
new_issues_counter
).
to
have_content
(
'-'
)
expect
(
commits_counter
).
to
have_content
(
'-'
)
expect
(
deploys_counter
).
to
have_content
(
'-'
)
end
it
'shows active stage with empty message'
do
expect
(
page
).
to
have_selector
(
'.stage-nav-item.active'
,
text:
'Issue'
)
expect
(
page
).
to
have_content
(
"We don't have enough data to show this stage."
)
...
...
@@ -42,6 +48,12 @@ feature 'Cycle Analytics', js: true do
visit
project_cycle_analytics_path
(
project
)
end
it
'shows pipeline summary'
do
expect
(
new_issues_counter
).
to
have_content
(
'1'
)
expect
(
commits_counter
).
to
have_content
(
'2'
)
expect
(
deploys_counter
).
to
have_content
(
'1'
)
end
it
'shows data on each stage'
do
expect_issue_to_be_present
...
...
@@ -109,6 +121,18 @@ feature 'Cycle Analytics', js: true do
end
end
def
new_issues_counter
find
(
:xpath
,
"//p[contains(text(),'New Issue')]/preceding-sibling::h3"
)
end
def
commits_counter
find
(
:xpath
,
"//p[contains(text(),'Commits')]/preceding-sibling::h3"
)
end
def
deploys_counter
find
(
:xpath
,
"//p[contains(text(),'Deploy')]/preceding-sibling::h3"
)
end
def
expect_issue_to_be_present
expect
(
find
(
'.stage-events'
)).
to
have_content
(
issue
.
title
)
expect
(
find
(
'.stage-events'
)).
to
have_content
(
issue
.
author
.
name
)
...
...
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