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
b8a54fc0
Commit
b8a54fc0
authored
Mar 14, 2017
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rs-capybara-screenshot-artifacts' into 'master'
Store capybara screenshots as build artifacts Closes #13971 See merge request !7985
parents
bdc1a55e
a61c1977
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
14 deletions
+12
-14
.gitlab-ci.yml
.gitlab-ci.yml
+6
-2
capybara.rb
features/support/capybara.rb
+3
-6
capybara.rb
spec/support/capybara.rb
+3
-6
No files found.
.gitlab-ci.yml
View file @
b8a54fc0
...
...
@@ -67,9 +67,11 @@ stages:
-
knapsack rspec "--color --format documentation"
artifacts
:
expire_in
:
31d
when
:
always
paths
:
-
knapsack/
-
coverage/
-
knapsack/
-
tmp/capybara/
.spinach-knapsack
:
&spinach-knapsack
stage
:
test
...
...
@@ -85,9 +87,11 @@ stages:
-
knapsack spinach "-r rerun" || retry '[[ -e tmp/spinach-rerun.txt ]] && bundle exec spinach -r rerun $(cat tmp/spinach-rerun.txt)'
artifacts
:
expire_in
:
31d
when
:
always
paths
:
-
knapsack/
-
coverage/
-
knapsack/
-
tmp/capybara/
# Prepare and merge knapsack tests
...
...
features/support/capybara.rb
View file @
b8a54fc0
require
'spinach/capybara'
require
'capybara/poltergeist'
require
'capybara-screenshot/spinach'
# Give CI some extra time
timeout
=
(
ENV
[
'CI'
]
||
ENV
[
'CI_SERVER'
])
?
30
:
10
...
...
@@ -20,12 +21,8 @@ end
Capybara
.
default_max_wait_time
=
timeout
Capybara
.
ignore_hidden_elements
=
false
unless
ENV
[
'CI'
]
||
ENV
[
'CI_SERVER'
]
require
'capybara-screenshot/spinach'
# Keep only the screenshots generated from the last failing test suite
Capybara
::
Screenshot
.
prune_strategy
=
:keep_last_run
end
# Keep only the screenshots generated from the last failing test suite
Capybara
::
Screenshot
.
prune_strategy
=
:keep_last_run
Spinach
.
hooks
.
before_run
do
TestEnv
.
warm_asset_cache
unless
ENV
[
'CI'
]
||
ENV
[
'CI_SERVER'
]
...
...
spec/support/capybara.rb
View file @
b8a54fc0
require
'capybara/rails'
require
'capybara/rspec'
require
'capybara/poltergeist'
require
'capybara-screenshot/rspec'
# Give CI some extra time
timeout
=
(
ENV
[
'CI'
]
||
ENV
[
'CI_SERVER'
])
?
30
:
10
...
...
@@ -21,12 +22,8 @@ end
Capybara
.
default_max_wait_time
=
timeout
Capybara
.
ignore_hidden_elements
=
true
unless
ENV
[
'CI'
]
||
ENV
[
'CI_SERVER'
]
require
'capybara-screenshot/rspec'
# Keep only the screenshots generated from the last failing test suite
Capybara
::
Screenshot
.
prune_strategy
=
:keep_last_run
end
# Keep only the screenshots generated from the last failing test suite
Capybara
::
Screenshot
.
prune_strategy
=
:keep_last_run
RSpec
.
configure
do
|
config
|
config
.
before
(
:suite
)
do
...
...
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