capybara-accessible 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -1,7 +0,0 @@
1
- :tddium:
2
- :ruby_version: "ruby-2.0.0-p195"
3
- :test_pattern:
4
- - spec/**_spec.rb
5
- :firefox: "10.0.5esr"
6
- :hooks:
7
- :pre: /bin/true
data/travis.yml DELETED
@@ -1,7 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 1.9.3
5
- - 2.0.0
6
-
7
- script: "bundle exec rake"