Skip to content

Commit

Permalink
postgresql 12
Browse files Browse the repository at this point in the history
  • Loading branch information
catmando committed May 2, 2023
1 parent c44776f commit af5fabc
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- postgresql

addons:
postgresql: "11"
postgresql: "12.2"
apt:
sources:
- sourceline: 'deb http://dl.yarnpkg.com/debian/ stable main'
Expand All @@ -20,8 +20,8 @@ addons:
- google-chrome-stable
- yarn
- redis-server
- postgresql-11
- postgresql-client-11
- postgresql-12.2
- postgresql-client-12.2


_test_gem_pg: &_test_gem_pg
Expand Down
45 changes: 36 additions & 9 deletions ruby/hyper-spec/lib/hyper-spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,44 @@ def self.on_server?

Capybara.default_max_wait_time = 10

Capybara.register_driver :chrome do |app|
options = {}
options.merge!(
w3c: false,
args: %w[auto-open-devtools-for-tabs]
Capybara.register_driver :chrome_undocked do |app|
opts = Selenium::WebDriver::Chrome::Options.new(args: %w[auto-open-devtools-for-tabs])
opts.add_preference(
'devtools',
'preferences' => {
'currentDockState' => '"undocked"', # Or '"bottom"', '"right"', etc.
'panel-selectedTab' => '"console"'
}
)
options['mobileEmulation'] = { 'deviceName' => ENV['DEVICE'].tr('-', ' ') } if ENV['DEVICE']
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: options, 'goog:loggingPrefs' => { browser: 'ALL' }
caps = Selenium::WebDriver::Remote::Capabilities.chrome
caps["goog:loggingPrefs"] = { browser: 'ALL' }

Capybara::Selenium::Driver.new(app, browser: :chrome, options: opts, desired_capabilities: caps)
end

Capybara.register_driver :chrome_docked do |app|
opts = Selenium::WebDriver::Chrome::Options.new(args: %w[auto-open-devtools-for-tabs])
opts.add_preference(
'devtools',
'preferences' => {
'currentDockState' => '"right"', # Or '"bottom"', '"undocked"', etc.
'panel-selectedTab' => '"console"'
}
)
Capybara::Selenium::Driver.new(app, browser: :chrome)#, capabilities: capabilities)
caps = Selenium::WebDriver::Remote::Capabilities.chrome
caps["goog:loggingPrefs"] = { browser: 'ALL' }

Capybara::Selenium::Driver.new(app, browser: :chrome, options: opts, desired_capabilities: caps)
end

Capybara.register_driver :chrome do |app|
caps = Selenium::WebDriver::Remote::Capabilities.chrome

caps["goog:loggingPrefs"] = { browser: 'ALL' } # if ENV['LOG_JS']

Capybara::Selenium::Driver.new(app, browser: :chrome, desired_capabilities: caps)
end

Capybara.register_driver :firefox do |app|
Capybara::Selenium::Driver.new(app, browser: :firefox)
end
Expand Down Expand Up @@ -242,6 +267,8 @@ def self.on_server?
Capybara.javascript_driver =
case ENV['DRIVER']
when 'beheaded' then :firefox_headless
when 'chrome_undocked' then :chrome_undocked
when 'chrome_docked' then :chrome_docked
when 'chrome' then :chrome
when 'ff' then :selenium_with_firebug
when 'firefox' then :firefox
Expand Down

0 comments on commit af5fabc

Please sign in to comment.