axe-core-capybara 4.6.1.pre.efd9226 → 4.6.1.pre.311e4da
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/lib/axe-capybara.rb +4 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ec1ee0a0b1c5191ddba7440f0d1611c6419d9f40b24c86407539f2f46f72d64
|
4
|
+
data.tar.gz: c5f854192e1c139c8274ecdf82e5362f31c1e9206a13f53e12ea88308c2b5c51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a3f644ed35888fe81842cf377599bf4efa53bb4a69f35fbb16cefd93eed36750007c6a0a9b01091d85150ddecd1bf4f750e88394c149a198b81d03c2f6e1c8b
|
7
|
+
data.tar.gz: 8b0dc7c535d7a4b792768f6dbdb28a45d2c2b6fa5f87643a29603a2cd9814baeaab6310f05d7c58209dc68dd6719f2d5b9ef2d80d657384d99ad20e3ceb998c4
|
data/README.md
CHANGED
@@ -35,7 +35,8 @@ 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`
|
38
|
+
- `:chrome`
|
39
|
+
- `:safari`
|
39
40
|
|
40
41
|
> Note: Please ensure respective drivers (eg: [`geckodriver`][]) are installed in your machine.
|
41
42
|
|
@@ -65,4 +66,4 @@ bundle exec rspec
|
|
65
66
|
[axe API]: https://github.com/dequelabs/axe-core/blob/develop/doc/API.md
|
66
67
|
[Capybara Webdriver]: https://github.com/teamcapybara/capybara/
|
67
68
|
[`geckodriver`]: https://github.com/mozilla/geckodriver/releases
|
68
|
-
[symbol]: https://ruby-doc.org/core-2.5.0/Symbol.html
|
69
|
+
[symbol]: https://ruby-doc.org/core-2.5.0/Symbol.html
|
data/lib/axe-capybara.rb
CHANGED
@@ -14,7 +14,8 @@ module AxeCapybara
|
|
14
14
|
|
15
15
|
config = Axe::Configuration.instance
|
16
16
|
|
17
|
-
|
17
|
+
# provide a capybara webdriver page object
|
18
|
+
config.page = get_driver(browser)
|
18
19
|
|
19
20
|
# await and return
|
20
21
|
yield config
|
@@ -23,14 +24,7 @@ module AxeCapybara
|
|
23
24
|
|
24
25
|
private
|
25
26
|
|
26
|
-
def self.
|
27
|
-
|
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)
|
27
|
+
def self.get_driver(browserSymbol)
|
28
|
+
Capybara::Selenium::Driver.new(nil, browser: browserSymbol)
|
35
29
|
end
|
36
30
|
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.
|
4
|
+
version: 4.6.1.pre.311e4da
|
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
|
+
date: 2023-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dumb_delegator
|