govuk_test 0.5.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +7 -0
- data/govuk_test.gemspec +1 -1
- data/lib/govuk_test/version.rb +1 -1
- data/lib/govuk_test.rb +7 -19
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8276e6e82a7ad5a58b4ce9d56708764ddbae8d2da8fbd5ffc884ce38fa7d01dd
|
4
|
+
data.tar.gz: f2b427a36610b2fd4893214cbcafa9f110e80029c87d60e1a5e4270ffa180f3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c587caff573491202172b1a267a272fe5469d7fdbe3d3b787716ca99815a7e177a4cb0d8d9d3a8c6f51fb063a3fff6a8649453f2c4c7d05b2353164f338c4bfd
|
7
|
+
data.tar.gz: 30c61e499af46fc0823f379e58cdbe5ebd39c9b4ea799dfd18e4d3419de5b6ee505cb7fe755d9908c8019bdc25a82cc09229ea6bc5369e855d74903d429a5f5b
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.3
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,13 @@
|
|
7
7
|
useful summary for people upgrading their application, not a replication
|
8
8
|
of the commit log.
|
9
9
|
|
10
|
+
## 1.0.0
|
11
|
+
|
12
|
+
* BREAKING: `.configure` accepts a `chrome_options` argument of an instance of
|
13
|
+
`Selenium::Webdriver::Chrome::Options` rather than a hash. The `window_size`
|
14
|
+
argument is dropped and can be done by configuring the `chrome_options`
|
15
|
+
instance, [example](https://github.com/alphagov/govuk_test/blob/dfd1a82e0114dbf1c668957fbea19cea04fd0d90/spec/govuk_test_spec.rb#L12-L22).
|
16
|
+
|
10
17
|
## 0.5.0
|
11
18
|
|
12
19
|
* No changes: new release for semantic versioning purposes (0.4.4 should have been 0.5.0)
|
data/govuk_test.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency "capybara"
|
26
26
|
spec.add_dependency "webdrivers"
|
27
27
|
spec.add_dependency "puma"
|
28
|
-
spec.add_dependency "selenium-webdriver"
|
28
|
+
spec.add_dependency "selenium-webdriver", ">= 3.142"
|
29
29
|
|
30
30
|
spec.add_development_dependency "bundler", "~> 1.16"
|
31
31
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/govuk_test/version.rb
CHANGED
data/lib/govuk_test.rb
CHANGED
@@ -4,33 +4,21 @@ require "capybara"
|
|
4
4
|
require "puma"
|
5
5
|
require "selenium-webdriver"
|
6
6
|
|
7
|
-
unless ENV[
|
8
|
-
require
|
7
|
+
unless ENV["GOVUK_TEST_USE_SYSTEM_CHROMEDRIVER"]
|
8
|
+
require "webdrivers"
|
9
9
|
|
10
10
|
# This stop webdrivers doing a lazy check for new versions
|
11
11
|
# of chromedriver, which interferes with WebMock.disable_net_connect
|
12
|
-
|
13
|
-
Selenium::WebDriver::Chrome::Service.driver_path = Webdrivers::Chromedriver.update
|
14
|
-
else
|
15
|
-
Selenium::WebDriver::Chrome.driver_path = Webdrivers::Chromedriver.update
|
16
|
-
end
|
12
|
+
Selenium::WebDriver::Chrome::Service.driver_path = Webdrivers::Chromedriver.update
|
17
13
|
end
|
18
14
|
|
19
15
|
module GovukTest
|
20
|
-
def self.configure(
|
21
|
-
chrome_options
|
22
|
-
chrome_options
|
16
|
+
def self.configure(chrome_options: nil)
|
17
|
+
chrome_options ||= Selenium::WebDriver::Chrome::Options.new
|
18
|
+
chrome_options.headless!
|
23
19
|
|
24
20
|
Capybara.register_driver :headless_chrome do |app|
|
25
|
-
|
26
|
-
chromeOptions: { args: chrome_options }.merge(options.fetch(:chrome_options, {}))
|
27
|
-
)
|
28
|
-
|
29
|
-
Capybara::Selenium::Driver.new(
|
30
|
-
app,
|
31
|
-
browser: :chrome,
|
32
|
-
desired_capabilities: capabilities
|
33
|
-
)
|
21
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome, options: chrome_options)
|
34
22
|
end
|
35
23
|
|
36
24
|
Capybara.javascript_driver = :headless_chrome
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.142'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3.142'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|