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
bece18aa
Commit
bece18aa
authored
Jun 16, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Capybara::Screenshot work with headless Chrome
parent
ddbb8801
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
features/support/capybara.rb
features/support/capybara.rb
+4
-0
spec/support/capybara.rb
spec/support/capybara.rb
+4
-0
No files found.
features/support/capybara.rb
View file @
bece18aa
...
@@ -20,6 +20,10 @@ Capybara.ignore_hidden_elements = false
...
@@ -20,6 +20,10 @@ Capybara.ignore_hidden_elements = false
# Keep only the screenshots generated from the last failing test suite
# Keep only the screenshots generated from the last failing test suite
Capybara
::
Screenshot
.
prune_strategy
=
:keep_last_run
Capybara
::
Screenshot
.
prune_strategy
=
:keep_last_run
# From https://github.com/mattheworiordan/capybara-screenshot/issues/84#issuecomment-41219326
Capybara
::
Screenshot
.
register_driver
(
:chrome
)
do
|
driver
,
path
|
driver
.
browser
.
save_screenshot
(
path
)
end
Spinach
.
hooks
.
before_run
do
Spinach
.
hooks
.
before_run
do
TestEnv
.
eager_load_driver_server
TestEnv
.
eager_load_driver_server
...
...
spec/support/capybara.rb
View file @
bece18aa
...
@@ -24,6 +24,10 @@ Capybara.ignore_hidden_elements = true
...
@@ -24,6 +24,10 @@ Capybara.ignore_hidden_elements = true
# Keep only the screenshots generated from the last failing test suite
# Keep only the screenshots generated from the last failing test suite
Capybara
::
Screenshot
.
prune_strategy
=
:keep_last_run
Capybara
::
Screenshot
.
prune_strategy
=
:keep_last_run
# From https://github.com/mattheworiordan/capybara-screenshot/issues/84#issuecomment-41219326
Capybara
::
Screenshot
.
register_driver
(
:chrome
)
do
|
driver
,
path
|
driver
.
browser
.
save_screenshot
(
path
)
end
RSpec
.
configure
do
|
config
|
RSpec
.
configure
do
|
config
|
config
.
before
(
:context
,
:js
)
do
config
.
before
(
:context
,
:js
)
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