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
Jérome Perrin
gitlab-ce
Commits
17dfcf6d
Commit
17dfcf6d
authored
Oct 24, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for showing correct pipeline
parent
5416d0e0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
spec/features/commits_spec.rb
spec/features/commits_spec.rb
+18
-5
No files found.
spec/features/commits_spec.rb
View file @
17dfcf6d
...
...
@@ -12,11 +12,15 @@ describe 'Commits' do
end
let!
(
:pipeline
)
do
FactoryGirl
.
create
:ci_pipeline
,
project:
project
,
sha:
project
.
commit
.
sha
create
(
:ci_pipeline
,
project:
project
,
ref:
project
.
default_branch
,
sha:
project
.
commit
.
sha
,
status: :success
)
end
context
'commit status is Generic Commit Status'
do
let!
(
:status
)
{
FactoryGirl
.
create
:generic_commit_status
,
pipeline:
pipeline
}
let!
(
:status
)
{
create
(
:generic_commit_status
,
pipeline:
pipeline
)
}
before
do
project
.
team
<<
[
@user
,
:reporter
]
...
...
@@ -39,7 +43,7 @@ describe 'Commits' do
end
context
'commit status is Ci Build'
do
let!
(
:build
)
{
FactoryGirl
.
create
:ci_build
,
pipeline:
pipeline
}
let!
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
let
(
:artifacts_file
)
{
fixture_file_upload
(
Rails
.
root
+
'spec/fixtures/banana_sample.gif'
,
'image/gif'
)
}
context
'when logged as developer'
do
...
...
@@ -48,13 +52,22 @@ describe 'Commits' do
end
describe
'Project commits'
do
let!
(
:pipeline_from_other_branch
)
do
create
(
:ci_pipeline
,
project:
project
,
ref:
'fix'
,
sha:
project
.
commit
.
sha
,
status: :failed
)
end
before
do
visit
namespace_project_commits_path
(
project
.
namespace
,
project
,
:master
)
end
it
'shows
build status
'
do
it
'shows
correct build status from default branch
'
do
page
.
within
(
"//li[@id='commit-
#{
pipeline
.
short_sha
}
']"
)
do
expect
(
page
).
to
have_css
(
".ci-status-link"
)
expect
(
page
).
to
have_css
(
'.ci-status-link'
)
expect
(
page
).
to
have_css
(
'.ci-status-icon-success'
)
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