axe-core-capybara 4.6.1.pre.c43ee49 → 4.6.1.pre.efd9226
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -3
- data/lib/axe-capybara.rb +10 -4
- 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: 8524eacfe534cfe075fc2d31b5b4517bd1d65c0fbbcd164f44d1f904a95f6082
|
4
|
+
data.tar.gz: 9524c72ab4fb4a0b062de417101724af8d5c88be1db3e8deeb2a1ef0e16588e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 405f68b238b7c9fd9e8059893d39115cc1837b00a59fd1c28adec9a12b38d90ebd200cd3108a93674212e26753c15e57eadc515853b0be9ba8fddc8c9ab622d8
|
7
|
+
data.tar.gz: 5950e7c0568f26244f2612e1dfc2fbd936141f10276c560cb7a3bcf8535937e654db9d7a972c16c32c53482c240cbc487c00cacbe376d36d2f67f46951b1774f
|
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
|
-
|
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.
|
28
|
-
|
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.
|
4
|
+
version: 4.6.1.pre.efd9226
|
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-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dumb_delegator
|