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
Léo-Paul Géneau
gitlab-ce
Commits
258cdd14
Commit
258cdd14
authored
May 31, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update jobs_spec for changes from builds_spec
parent
6c72d8a2
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
496 deletions
+18
-496
spec/features/projects/builds_spec.rb
spec/features/projects/builds_spec.rb
+0
-478
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+18
-18
No files found.
spec/features/projects/builds_spec.rb
deleted
100644 → 0
View file @
6c72d8a2
This diff is collapsed.
Click to expand it.
spec/features/projects/jobs_spec.rb
View file @
258cdd14
...
@@ -219,7 +219,7 @@ feature 'Jobs', :feature do
...
@@ -219,7 +219,7 @@ feature 'Jobs', :feature do
end
end
it
do
it
do
expect
(
page
).
to
have_
link
'Raw'
expect
(
page
).
to
have_
css
(
'.js-raw-link'
)
end
end
end
end
...
@@ -282,7 +282,7 @@ feature 'Jobs', :feature do
...
@@ -282,7 +282,7 @@ feature 'Jobs', :feature do
end
end
end
end
context
'job is complete and not successful
l
'
do
context
'job is complete and not successful'
do
let
(
:build
)
{
create
(
:ci_build
,
:failed
,
environment:
environment
.
name
,
pipeline:
pipeline
)
}
let
(
:build
)
{
create
(
:ci_build
,
:failed
,
environment:
environment
.
name
,
pipeline:
pipeline
)
}
it
'shows a link for the job'
do
it
'shows a link for the job'
do
...
@@ -305,7 +305,7 @@ feature 'Jobs', :feature do
...
@@ -305,7 +305,7 @@ feature 'Jobs', :feature do
end
end
end
end
describe
"POST /:project/
build
s/:id/cancel"
do
describe
"POST /:project/
job
s/:id/cancel"
do
context
"Job from project"
do
context
"Job from project"
do
before
do
before
do
build
.
run!
build
.
run!
...
@@ -331,7 +331,7 @@ feature 'Jobs', :feature do
...
@@ -331,7 +331,7 @@ feature 'Jobs', :feature do
end
end
end
end
describe
"POST /:project/
build
s/:id/retry"
do
describe
"POST /:project/
job
s/:id/retry"
do
context
"Job from project"
do
context
"Job from project"
do
before
do
before
do
build
.
run!
build
.
run!
...
@@ -381,7 +381,7 @@ feature 'Jobs', :feature do
...
@@ -381,7 +381,7 @@ feature 'Jobs', :feature do
end
end
end
end
describe
"GET /:project/
build
s/:id/download"
do
describe
"GET /:project/
job
s/:id/download"
do
before
do
before
do
build
.
update_attributes
(
artifacts_file:
artifacts_file
)
build
.
update_attributes
(
artifacts_file:
artifacts_file
)
visit
namespace_project_job_path
(
project
.
namespace
,
project
,
build
)
visit
namespace_project_job_path
(
project
.
namespace
,
project
,
build
)
...
@@ -398,14 +398,14 @@ feature 'Jobs', :feature do
...
@@ -398,14 +398,14 @@ feature 'Jobs', :feature do
end
end
end
end
describe
'GET /:project/
builds/:id/raw'
do
describe
'GET /:project/
jobs/:id/raw'
,
:js
do
context
'access source'
do
context
'access source'
do
context
'build from project'
do
context
'build from project'
do
before
do
before
do
Capybara
.
current_session
.
driver
.
header
(
'X-Sendfile-Type'
,
'X-Sendfile'
)
Capybara
.
current_session
.
driver
.
header
s
=
{
'X-Sendfile-Type'
=>
'X-Sendfile'
}
build
.
run!
build
.
run!
visit
namespace_project_job_path
(
project
.
namespace
,
project
,
build
)
visit
namespace_project_job_path
(
project
.
namespace
,
project
,
build
)
page
.
within
(
'.js-build-sidebar'
)
{
click_link
'Raw'
}
find
(
'.js-raw-link-controller'
).
click
()
end
end
it
'sends the right headers'
do
it
'sends the right headers'
do
...
@@ -415,9 +415,9 @@ feature 'Jobs', :feature do
...
@@ -415,9 +415,9 @@ feature 'Jobs', :feature do
end
end
end
end
context
'
build
from other project'
do
context
'
job
from other project'
do
before
do
before
do
Capybara
.
current_session
.
driver
.
header
(
'X-Sendfile-Type'
,
'X-Sendfile'
)
Capybara
.
current_session
.
driver
.
header
s
=
{
'X-Sendfile-Type'
=>
'X-Sendfile'
}
build2
.
run!
build2
.
run!
visit
raw_namespace_project_job_path
(
project
.
namespace
,
project
,
build2
)
visit
raw_namespace_project_job_path
(
project
.
namespace
,
project
,
build2
)
end
end
...
@@ -432,7 +432,7 @@ feature 'Jobs', :feature do
...
@@ -432,7 +432,7 @@ feature 'Jobs', :feature do
let
(
:existing_file
)
{
Tempfile
.
new
(
'existing-trace-file'
).
path
}
let
(
:existing_file
)
{
Tempfile
.
new
(
'existing-trace-file'
).
path
}
before
do
before
do
Capybara
.
current_session
.
driver
.
header
(
'X-Sendfile-Type'
,
'X-Sendfile'
)
Capybara
.
current_session
.
driver
.
header
s
=
{
'X-Sendfile-Type'
=>
'X-Sendfile'
}
build
.
run!
build
.
run!
...
@@ -442,13 +442,13 @@ feature 'Jobs', :feature do
...
@@ -442,13 +442,13 @@ feature 'Jobs', :feature do
visit
namespace_project_job_path
(
project
.
namespace
,
project
,
build
)
visit
namespace_project_job_path
(
project
.
namespace
,
project
,
build
)
end
end
context
'when build has trace in file'
do
context
'when build has trace in file'
,
:js
do
let
(
:paths
)
do
let
(
:paths
)
do
[
existing_file
]
[
existing_file
]
end
end
before
do
before
do
page
.
within
(
'.js-build-sidebar'
)
{
click_link
'Raw'
}
find
(
'.js-raw-link-controller'
).
click
()
end
end
it
'sends the right headers'
do
it
'sends the right headers'
do
...
@@ -462,7 +462,7 @@ feature 'Jobs', :feature do
...
@@ -462,7 +462,7 @@ feature 'Jobs', :feature do
let
(
:paths
)
{
[]
}
let
(
:paths
)
{
[]
}
it
'sends the right headers'
do
it
'sends the right headers'
do
expect
(
page
.
status_code
).
not_to
have_
link
(
'Raw
'
)
expect
(
page
.
status_code
).
not_to
have_
selector
(
'.js-raw-link-controller
'
)
end
end
end
end
end
end
...
@@ -483,7 +483,7 @@ feature 'Jobs', :feature do
...
@@ -483,7 +483,7 @@ feature 'Jobs', :feature do
end
end
describe
"GET /:project/jobs/:id/trace.json"
do
describe
"GET /:project/jobs/:id/trace.json"
do
context
"
Job
from project"
do
context
"
Build
from project"
do
before
do
before
do
visit
trace_namespace_project_job_path
(
project
.
namespace
,
project
,
build
,
format: :json
)
visit
trace_namespace_project_job_path
(
project
.
namespace
,
project
,
build
,
format: :json
)
end
end
...
@@ -491,7 +491,7 @@ feature 'Jobs', :feature do
...
@@ -491,7 +491,7 @@ feature 'Jobs', :feature do
it
{
expect
(
page
.
status_code
).
to
eq
(
200
)
}
it
{
expect
(
page
.
status_code
).
to
eq
(
200
)
}
end
end
context
"
Job
from other project"
do
context
"
Build
from other project"
do
before
do
before
do
visit
trace_namespace_project_job_path
(
project
.
namespace
,
project
,
build2
,
format: :json
)
visit
trace_namespace_project_job_path
(
project
.
namespace
,
project
,
build2
,
format: :json
)
end
end
...
@@ -501,7 +501,7 @@ feature 'Jobs', :feature do
...
@@ -501,7 +501,7 @@ feature 'Jobs', :feature do
end
end
describe
"GET /:project/jobs/:id/status"
do
describe
"GET /:project/jobs/:id/status"
do
context
"
Job
from project"
do
context
"
Build
from project"
do
before
do
before
do
visit
status_namespace_project_job_path
(
project
.
namespace
,
project
,
build
)
visit
status_namespace_project_job_path
(
project
.
namespace
,
project
,
build
)
end
end
...
@@ -509,7 +509,7 @@ feature 'Jobs', :feature do
...
@@ -509,7 +509,7 @@ feature 'Jobs', :feature do
it
{
expect
(
page
.
status_code
).
to
eq
(
200
)
}
it
{
expect
(
page
.
status_code
).
to
eq
(
200
)
}
end
end
context
"
Job
from other project"
do
context
"
Build
from other project"
do
before
do
before
do
visit
status_namespace_project_job_path
(
project
.
namespace
,
project
,
build2
)
visit
status_namespace_project_job_path
(
project
.
namespace
,
project
,
build2
)
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