ndr_dev_support 7.2.3 → 7.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/ndr_dev_support/capistrano/ndr_model.rb +3 -0
- data/lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb +1 -1
- data/lib/ndr_dev_support/integration_testing/drivers/chrome_headless_old.rb +28 -0
- data/lib/ndr_dev_support/integration_testing.rb +1 -0
- data/lib/ndr_dev_support/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e5760933886f19bcab8185f70ff16ff54d49b86ad1f71a877d96c76e04525ed
|
4
|
+
data.tar.gz: c323d25d9fed68097242f6e3888c8eb1637bde1b6ec59e0c118667f88b33430e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 494704abc8b128a67f258695a8e2364de7700f98757eb351c2d68cde3543348eeb20d8defcc05f67d865b0fcb39c828f49a0cdb825e5f958a871d8618fbbda71
|
7
|
+
data.tar.gz: 0defdea96cdd6ba105a5527bd403847ff7ab9196543aac1ea4ed6279928b7c8527c164ee18fd4b8e287926490e75fb9e2e816d50b8e42995d8b9f584e9c95ae9
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
*no unreleased changes*
|
3
3
|
|
4
|
+
## 7.2.4 / 2024-05-01
|
5
|
+
## Changed
|
6
|
+
* Change default browser for integration tests to new headless Chrome
|
7
|
+
* Support old chrome headless driver
|
8
|
+
* Reduce the number of releases kept on application servers
|
9
|
+
|
4
10
|
## 7.2.3 / 2023-12-08
|
5
11
|
### Fixed
|
6
12
|
* use default rubocop line limit (120)
|
data/README.md
CHANGED
@@ -105,7 +105,7 @@ require 'ndr_dev_support/integration_testing'
|
|
105
105
|
|
106
106
|
#### Other drivers
|
107
107
|
|
108
|
-
Other drivers are also supported; `chrome` / `chrome_headless` / `firefox` are all powered by selenium, and can either be explicitly used with:
|
108
|
+
Other drivers are also supported; `chrome` / `chrome_headless` / `chrome_headless_old` / `firefox` are all powered by selenium, and can either be explicitly used with:
|
109
109
|
|
110
110
|
```ruby
|
111
111
|
Capybara.default_driver = :chrome_headless
|
@@ -116,6 +116,9 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
116
116
|
# Where we'll be deploying to:
|
117
117
|
set :deploy_to, File.join(application_home, fetch(:application))
|
118
118
|
|
119
|
+
# Reduce the number of releases we keep on the webapp servers
|
120
|
+
set :keep_releases, 3 unless exists?(:keep_releases) || fetch(:daemon_deployment)
|
121
|
+
|
119
122
|
# Use the application user's ruby:
|
120
123
|
set(:default_environment) do
|
121
124
|
{
|
@@ -4,7 +4,7 @@ require 'show_me_the_cookies'
|
|
4
4
|
Capybara.register_driver :chrome_headless do |app|
|
5
5
|
Capybara::Selenium::Driver.load_selenium
|
6
6
|
browser_options = ::Selenium::WebDriver::Chrome::Options.new.tap do |opts|
|
7
|
-
opts.args << '--headless'
|
7
|
+
opts.args << '--headless=new'
|
8
8
|
opts.args << '--disable-gpu' if Gem.win_platform?
|
9
9
|
opts.args << '--no-sandbox'
|
10
10
|
# Workaround https://bugs.chromium.org/p/chromedriver/issues/detail?id=2650&q=load&sort=-id&colspec=ID%20Status%20Pri%20Owner%20Summary
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'selenium-webdriver'
|
2
|
+
require 'show_me_the_cookies'
|
3
|
+
|
4
|
+
# Use the old chrome headless driver
|
5
|
+
Capybara.register_driver :chrome_headless_old do |app|
|
6
|
+
Capybara::Selenium::Driver.load_selenium
|
7
|
+
browser_options = Selenium::WebDriver::Chrome::Options.new.tap do |opts|
|
8
|
+
opts.args << '--headless'
|
9
|
+
opts.args << '--disable-gpu' if Gem.win_platform?
|
10
|
+
opts.args << '--no-sandbox'
|
11
|
+
# Workaround https://bugs.chromium.org/p/chromedriver/issues/detail?id=2650&q=load&sort=-id&colspec=ID%20Status%20Pri%20Owner%20Summary
|
12
|
+
opts.args << '--disable-site-isolation-trials'
|
13
|
+
opts.args << '--window-size=1920,1080'
|
14
|
+
opts.args << '--enable-features=NetworkService,NetworkServiceInProcess'
|
15
|
+
end
|
16
|
+
# Hide messages such as the following:
|
17
|
+
# WARN Selenium [:logger_info] Details on how to use and modify Selenium logger:
|
18
|
+
# https://selenium.dev/documentation/webdriver/troubleshooting/logging#ruby
|
19
|
+
Selenium::WebDriver.logger.ignore([:logger_info])
|
20
|
+
|
21
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options)
|
22
|
+
end
|
23
|
+
|
24
|
+
Capybara::Screenshot.register_driver(:chrome_headless_old) do |driver, path|
|
25
|
+
driver.browser.save_screenshot(path)
|
26
|
+
end
|
27
|
+
|
28
|
+
ShowMeTheCookies.register_adapter(:chrome_headless_old, ShowMeTheCookies::SeleniumChrome)
|
@@ -24,6 +24,7 @@ require 'ndr_dev_support/integration_testing/flakey_tests'
|
|
24
24
|
# These are all the drivers we have capybara / screenshot support for:
|
25
25
|
require 'ndr_dev_support/integration_testing/drivers/chrome'
|
26
26
|
require 'ndr_dev_support/integration_testing/drivers/chrome_headless'
|
27
|
+
require 'ndr_dev_support/integration_testing/drivers/chrome_headless_old'
|
27
28
|
require 'ndr_dev_support/integration_testing/drivers/firefox'
|
28
29
|
require 'ndr_dev_support/integration_testing/drivers/switchable'
|
29
30
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ndr_dev_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.2.
|
4
|
+
version: 7.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NCRS Development Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -408,6 +408,7 @@ files:
|
|
408
408
|
- lib/ndr_dev_support/integration_testing.rb
|
409
409
|
- lib/ndr_dev_support/integration_testing/drivers/chrome.rb
|
410
410
|
- lib/ndr_dev_support/integration_testing/drivers/chrome_headless.rb
|
411
|
+
- lib/ndr_dev_support/integration_testing/drivers/chrome_headless_old.rb
|
411
412
|
- lib/ndr_dev_support/integration_testing/drivers/firefox.rb
|
412
413
|
- lib/ndr_dev_support/integration_testing/drivers/switchable.rb
|
413
414
|
- lib/ndr_dev_support/integration_testing/dsl.rb
|