Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,22 @@
Capybara::Selenium::Driver.new(app, browser: :chrome)
end
Capybara.javascript_driver = :selenium_chrome

Capybara::Screenshot.register_driver(:selenium_chrome) do |driver, path|
driver.browser.save_screenshot(path)
end
else
Capybara.register_driver :selenium_firefox do |app|
Capybara::Selenium::Driver.new(app, browser: :firefox)
end
Capybara.javascript_driver = :selenium_firefox

Capybara::Screenshot.register_driver(:selenium_firefox) do |driver, path|
driver.browser.save_screenshot(path)
end
end

Capybara.default_wait_time = 15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it need a bit more wait time to have CI pass?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samnang this was recommended by travis-ci for failed tests with capybara element not found.
under their common build errors documents. However, this was not why the test were failing. That was later solved by the update dependencies branch. Some updated npm modules had broken the app and the builds during fresh installs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

puts "Capybara using driver: #{Capybara.javascript_driver}"

Capybara::Screenshot.prune_strategy = { keep: 10 }
Expand Down