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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
d8ba09fc
Commit
d8ba09fc
authored
Sep 14, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add view specs for pipelines graph
parent
b964c6c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
spec/views/projects/pipelines/show.html.haml_spec.rb
spec/views/projects/pipelines/show.html.haml_spec.rb
+51
-0
No files found.
spec/views/projects/pipelines/show.html.haml_spec.rb
0 → 100644
View file @
d8ba09fc
require
'spec_helper'
describe
'projects/pipelines/show'
do
include
Devise
::
TestHelpers
let
(
:project
)
{
create
(
:project
)
}
let
(
:pipeline
)
do
create
(
:ci_empty_pipeline
,
project:
project
,
sha:
project
.
commit
.
id
)
end
before
do
create_build
(
'build'
,
0
,
'build'
)
create_build
(
'test'
,
1
,
'rspec 0 2'
)
create_build
(
'test'
,
1
,
'rspec 1 2'
)
create_build
(
'test'
,
1
,
'audit'
)
create_build
(
'deploy'
,
2
,
'production'
)
create
(
:generic_commit_status
,
pipeline:
pipeline
,
stage:
'external'
,
name:
'jenkins'
,
stage_idx:
3
)
assign
(
:project
,
project
)
assign
(
:pipeline
,
pipeline
)
allow
(
view
).
to
receive
(
:can?
).
and_return
(
true
)
end
it
'shows a graph with grouped stages'
do
render
expect
(
rendered
).
to
have_css
(
'.pipeline-graph'
)
expect
(
rendered
).
to
have_css
(
'.grouped-pipeline-dropdown'
)
# stages
expect
(
rendered
).
to
have_text
(
'Build'
)
expect
(
rendered
).
to
have_text
(
'Test'
)
expect
(
rendered
).
to
have_text
(
'Deploy'
)
expect
(
rendered
).
to
have_text
(
'External'
)
# builds
expect
(
rendered
).
to
have_text
(
'rspec'
)
expect
(
rendered
).
to
have_text
(
'rspec 0:1'
)
expect
(
rendered
).
to
have_text
(
'production'
)
expect
(
rendered
).
to
have_text
(
'jenkins'
)
end
private
def
create_build
(
stage
,
stage_idx
,
name
)
create
(
:ci_build
,
pipeline:
pipeline
,
stage:
stage
,
stage_idx:
stage_idx
,
name:
name
)
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