axe-core-capybara 4.6.1.pre.81ca285 → 4.6.1.pre.bb0471d

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/axe-capybara.rb +10 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 334c1c8371280c2d8ed1d3a2ec7bfd467508ecda798b1c3763ca437800796cc2
4
- data.tar.gz: 2fe39e86778265a5279a0d6066d8885754b9b4dd86f0b14f4029368abd4e05bb
3
+ metadata.gz: 9cf3266cb2c9e8bca3d53a793d053bf9e4d6b732d0800d81162659cce0715885
4
+ data.tar.gz: 673f34369189cc8e71281c29437d4d5727dc944feaeec92061f9a40bc5ba4104
5
5
  SHA512:
6
- metadata.gz: 37f290f19b89627cbd6475f3fe915b463ea8362e13699fd717f6fdb03290bf65a0369624d1c6f3d847929897bfbd959ec91fd5f0a23de67f15d11824664dfb80
7
- data.tar.gz: 7797d0e1bde1d88fc47dfa98dd8d0e8c5804be1220aa6a787c3d8e1defb5b8eb138b82d6aefc03fe44078e530af47ca2f4543f6021f4101d6364cc39c7476b58
6
+ metadata.gz: e48f0ab0a529b2746b9405d4321c39c4f49fcbc808f5474dd3f07e74b05ed40cda8ccd48fe89c77aa6638517923c714d7d4115e253d9a69dedf49c6793657796
7
+ data.tar.gz: 88e294d1d7fab9e0cf837c58f30a03bfc004dd0271f2d7a6ec9901afbca61aab02d3ae08ef31adaee5d8b6ac154f6e3b361b25fb0d4d82269745e86adaf8a6e5
data/lib/axe-capybara.rb CHANGED
@@ -14,8 +14,7 @@ module AxeCapybara
14
14
 
15
15
  config = Axe::Configuration.instance
16
16
 
17
- # provide a capybara webdriver page object
18
- config.page = get_driver(browser)
17
+ config.page = set_driver(browser)
19
18
 
20
19
  # await and return
21
20
  yield config
@@ -24,7 +23,14 @@ module AxeCapybara
24
23
 
25
24
  private
26
25
 
27
- def self.get_driver(browserSymbol)
28
- Capybara::Selenium::Driver.new(browserSymbol)
26
+ def self.set_driver(browserSymbol)
27
+ if browserSymbol == :chrome
28
+ Capybara.default_driver = :selenium_chrome
29
+ Capybara.javascript_driver = :selenium_chrome
30
+ else
31
+ Capybara.default_driver = :selenium
32
+ Capybara.javascript_driver = :selenium
33
+ end
34
+ Capybara::Selenium::Driver.new(nil, :browser => browserSymbol)
29
35
  end
30
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axe-core-capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.1.pre.81ca285
4
+ version: 4.6.1.pre.bb0471d
5
5
  platform: ruby
6
6
  authors:
7
7
  - Deque Systems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-18 00:00:00.000000000 Z
11
+ date: 2023-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dumb_delegator