Skip to content

Commit

Permalink
Set window size to make test setup more predictable
Browse files Browse the repository at this point in the history
  • Loading branch information
corylown committed Jul 1, 2024
1 parent 61fbc25 commit 79b2ce1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion spec/features/exhibits/translation_editing_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@

visit spotlight.search_exhibit_catalog_path(exhibit, q: '*', locale: 'fr')

find('button[aria-label="plus »"]').click # Hamburger icon
expect(page).to have_css('h3.facet-field-heading', text: 'Géographique')
end
end
Expand Down
7 changes: 7 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
require 'selenium-webdriver'
require 'webmock/rspec'

Capybara.register_driver :selenium_chrome_headless do |app|
browser_options = Selenium::WebDriver::Chrome::Options.new
browser_options.add_argument('--window-size=1920,1080')
browser_options.add_argument('--headless')
Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options)
end

Capybara.javascript_driver = :selenium_chrome_headless

allowed_sites = ['chromedriver.storage.googleapis.com']
Expand Down

0 comments on commit 79b2ce1

Please sign in to comment.