axe-core-capybara 4.6.1.pre.311e4da → 4.7.0.pre.5cb81f7

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 +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ec1ee0a0b1c5191ddba7440f0d1611c6419d9f40b24c86407539f2f46f72d64
4
- data.tar.gz: c5f854192e1c139c8274ecdf82e5362f31c1e9206a13f53e12ea88308c2b5c51
3
+ metadata.gz: fad35410e7bad9f439f53847735c09f44a48baf61e8ae5737ae98428e071f15d
4
+ data.tar.gz: 18febdce0619bb64b5b07560f3f6489827ed102045de9f38adc46ab23e5ad947
5
5
  SHA512:
6
- metadata.gz: 0a3f644ed35888fe81842cf377599bf4efa53bb4a69f35fbb16cefd93eed36750007c6a0a9b01091d85150ddecd1bf4f750e88394c149a198b81d03c2f6e1c8b
7
- data.tar.gz: 8b0dc7c535d7a4b792768f6dbdb28a45d2c2b6fa5f87643a29603a2cd9814baeaab6310f05d7c58209dc68dd6719f2d5b9ef2d80d657384d99ad20e3ceb998c4
6
+ metadata.gz: bbede9b8aac5576109012ac0f9f52677e8f6577ef11b633054e437ea7cbe61ed6c1beb45d2fb8e1b4cb448f93043216a96eb9f8096c0788af69cfbc953a21c1f
7
+ data.tar.gz: 5cf06cf448ea05dd386345e3d2e4d36b59d48ab442fd44527c06b17e54f008d997c66d6524bf9c6ce723ffdfe50ab9ad394a99eb4b90f5928197850748003900
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(nil, browser: 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.311e4da
4
+ version: 4.7.0.pre.5cb81f7
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-24 00:00:00.000000000 Z
11
+ date: 2023-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dumb_delegator