capybara-accessible 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitignore +3 -2
- data/.travis.yml +26 -0
- data/Gemfile +0 -1
- data/LICENSE +19 -0
- data/README.md +33 -40
- data/Rakefile +3 -8
- data/capybara-accessible.gemspec +16 -22
- data/lib/capybara/accessible.rb +34 -85
- data/lib/capybara/accessible/adapters/poltergeist.rb +18 -0
- data/lib/capybara/accessible/adapters/selenium.rb +20 -0
- data/lib/capybara/accessible/auditor.rb +27 -54
- data/lib/capybara/accessible/driver.rb +16 -0
- data/lib/capybara/accessible/extensions/driver.rb +28 -0
- data/lib/capybara/accessible/extensions/element.rb +19 -0
- data/lib/capybara/accessible/tasks.rb +0 -1
- data/lib/capybara/accessible/version.rb +1 -1
- data/lib/vendor/google/accessibility-developer-tools/axs_testing.js +2548 -1555
- data/spec/accessible_app.rb +2 -0
- data/spec/capybara_accessible_spec.rb +81 -0
- data/spec/spec_helper.rb +5 -10
- metadata +21 -66
- data/LICENSE.txt +0 -22
- data/lib/capybara/accessible/driver_extensions.rb +0 -6
- data/lib/capybara/accessible/element.rb +0 -10
- data/spec/poltergeist_driver_spec.rb +0 -56
- data/spec/selenium_driver_spec.rb +0 -70
- data/spec/webkit_driver_spec.rb +0 -71
- data/tddium.yml +0 -7
- data/travis.yml +0 -7
data/spec/webkit_driver_spec.rb
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe "Using webkit driver" do
|
4
|
-
require "capybara-webkit"
|
5
|
-
before do
|
6
|
-
@session = Capybara::Session.new(:accessible_webkit, AccessibleApp)
|
7
|
-
end
|
8
|
-
|
9
|
-
context 'a page without accessibility errors' do
|
10
|
-
it 'does not raise an exception on audit failures' do
|
11
|
-
expect { @session.visit('/accessible') }.to_not raise_error
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
context 'a page with inaccessible elements' do
|
16
|
-
it 'raises an exception on visiting the page' do
|
17
|
-
expect { @session.visit('/inaccessible') }.to raise_error(Capybara::Accessible::InaccessibleError)
|
18
|
-
end
|
19
|
-
|
20
|
-
it 'raises an exception when visiting the page via a link' do
|
21
|
-
@session.visit('/accessible')
|
22
|
-
expect { @session.click_link('inaccessible') }.to raise_error(Capybara::Accessible::InaccessibleError)
|
23
|
-
end
|
24
|
-
|
25
|
-
context 'with configuration that excludes rules' do
|
26
|
-
before do
|
27
|
-
Capybara::Accessible::Auditor.exclusions = ['AX_TEXT_01']
|
28
|
-
end
|
29
|
-
|
30
|
-
it 'does not raise an error on an excluded rule' do
|
31
|
-
expect { @session.visit('/excluded') }.to_not raise_error
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
context 'with log level set to warn' do
|
36
|
-
before do
|
37
|
-
Capybara::Accessible::Auditor.log_level = :warn
|
38
|
-
end
|
39
|
-
|
40
|
-
after do
|
41
|
-
Capybara::Accessible::Auditor.log_level = :error
|
42
|
-
end
|
43
|
-
|
44
|
-
it 'puts to stdout and does not raise an error' do
|
45
|
-
$stdout.should_receive(:puts)
|
46
|
-
expect { @session.visit('/inaccessible') }.to_not raise_error
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
context 'a page with a javascript popup' do
|
51
|
-
it 'does not raise an exception' do
|
52
|
-
@session.visit('/alert')
|
53
|
-
expect { @session.click_link('Alert!') }.to_not raise_error
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
context 'with severity set to severe' do
|
58
|
-
before do
|
59
|
-
Capybara::Accessible::Auditor.severe_rules = ['AX_TEXT_02']
|
60
|
-
end
|
61
|
-
|
62
|
-
after do
|
63
|
-
Capybara::Accessible::Auditor.severe_rules = []
|
64
|
-
end
|
65
|
-
|
66
|
-
it 'raises an exception on the image without alt text' do
|
67
|
-
expect { @session.visit('/severe') }.to raise_error(Capybara::Accessible::InaccessibleError)
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
data/tddium.yml
DELETED