disables js fx in specs via poltergeist config
This commit is contained in:
committed by
Juanjo Bazán
parent
2a4adc2e60
commit
4a888e95c2
@@ -16,11 +16,6 @@
|
|||||||
<%= content_for :social_media_meta_tags %>
|
<%= content_for :social_media_meta_tags %>
|
||||||
|
|
||||||
<%= setting['per_page_code'].try(:html_safe) %>
|
<%= setting['per_page_code'].try(:html_safe) %>
|
||||||
|
|
||||||
<% if Rails.env.test? %>
|
|
||||||
<%= javascript_tag "$.fx.off = true;" %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ Capybara.register_driver :poltergeist do |app|
|
|||||||
Capybara::Poltergeist::Driver.new(app,
|
Capybara::Poltergeist::Driver.new(app,
|
||||||
inspector: true, # allows remote debugging by executing page.driver.debug
|
inspector: true, # allows remote debugging by executing page.driver.debug
|
||||||
phantomjs_logger: File.open(File::NULL, "w"), # don't print console.log calls in console
|
phantomjs_logger: File.open(File::NULL, "w"), # don't print console.log calls in console
|
||||||
phantomjs_options: ['--load-images=no', '--disk-cache=false']
|
phantomjs_options: ['--load-images=no', '--disk-cache=false'],
|
||||||
|
extensions: [File.expand_path("../support/phantomjs_ext/disable_js_fx.js", __FILE__)] # disable js effects
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
3
spec/support/phantomjs_ext/disable_js_fx.js
Normal file
3
spec/support/phantomjs_ext/disable_js_fx.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
$.fx.off = true;
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user