BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
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