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.
- 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: fad35410e7bad9f439f53847735c09f44a48baf61e8ae5737ae98428e071f15d
|
4
|
+
data.tar.gz: 18febdce0619bb64b5b07560f3f6489827ed102045de9f38adc46ab23e5ad947
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2023-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dumb_delegator
|