axe-core-capybara 4.6.1 → 4.7.0.pre.3fef592

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -3
  3. data/lib/axe-capybara.rb +10 -4
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b2253cc5b923168d1739439e36319b4c38f7403ac61ed60d626377904b2d899
4
- data.tar.gz: ee13521af2185128cb073e4f07201a91b60c2f15202dfe4e1bf639ce53b075dc
3
+ metadata.gz: 4520ab1f34e0d7078dd060db5e5eb8898f71ffe5a3cbea38e188ebc494c3e5d9
4
+ data.tar.gz: 1d22c413092413afb1f67f0ef3b53ab253341113baae47d6632c7658ed76291b
5
5
  SHA512:
6
- metadata.gz: 9bdffe99e32ebcfa6e29d585cc64d688ff75b4bd229e8c59eba09a12eecc7ce76a0446eddf7b508a4159b263307568eec80f1171ff1998cf322946195d610ff2
7
- data.tar.gz: 3da4dd3d7a07dfd759565180188de6716ce83bbb946e526d6e1d703296feb74a84a12260af6ce719ce3c5ce654ba1c88726d9202f3f92cf30c656a53effcd405
6
+ metadata.gz: d5e2f70934c981e7f48424a2cc9a692ae66f214b45f3269baf7abda17da3d8e5553391adc9d34af4f26806cd0f9d2636a8bb4d4b1427233f72d6ce2366ef900b
7
+ data.tar.gz: a61621b4d8c2af29686fb048072a69e0ac688c752f7f9277c48de091d92668d34c0deb408f3d464424e1717742feffe693db1cf93e2b353e03f4e19edc0161d0
data/README.md CHANGED
@@ -35,8 +35,7 @@ The configure method takes 1 optional argument as a [symbol][] and a configurat
35
35
 
36
36
  The optional argument is a browser name for `capybara`. The valid browser names are:
37
37
  - `:firefox` (default)
38
- - `:chrome`
39
- - `:safari`
38
+ - `:chrome`
40
39
 
41
40
  > Note: Please ensure respective drivers (eg: [`geckodriver`][]) are installed in your machine.
42
41
 
@@ -66,4 +65,4 @@ bundle exec rspec
66
65
  [axe API]: https://github.com/dequelabs/axe-core/blob/develop/doc/API.md
67
66
  [Capybara Webdriver]: https://github.com/teamcapybara/capybara/
68
67
  [`geckodriver`]: https://github.com/mozilla/geckodriver/releases
69
- [symbol]: https://ruby-doc.org/core-2.5.0/Symbol.html
68
+ [symbol]: https://ruby-doc.org/core-2.5.0/Symbol.html
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
4
+ version: 4.7.0.pre.3fef592
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-11 00:00:00.000000000 Z
11
+ date: 2023-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dumb_delegator
@@ -149,9 +149,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
149
  version: 2.3.0
150
150
  required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  requirements:
152
- - - ">="
152
+ - - ">"
153
153
  - !ruby/object:Gem::Version
154
- version: '0'
154
+ version: 1.3.1
155
155
  requirements: []
156
156
  rubygems_version: 3.2.32
157
157
  signing_key: