capybara-accessible 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,4 +16,8 @@ class AccessibleApp < TestApp
16
16
  get '/alert' do
17
17
  '<a href="#" onclick="alert(\'whoa!\')">Alert!</a>'
18
18
  end
19
+
20
+ get '/severe' do
21
+ '<img src="" />'
22
+ end
19
23
  end
@@ -36,6 +36,10 @@ describe Capybara::Accessible::Driver do
36
36
  Capybara::Accessible::Auditor.log_level = :warn
37
37
  end
38
38
 
39
+ after do
40
+ Capybara::Accessible::Auditor.log_level = :error
41
+ end
42
+
39
43
  it 'puts to stdout and does not raise an error' do
40
44
  $stdout.should_receive(:puts)
41
45
  expect { @session.visit('/inaccessible') }.to_not raise_error
@@ -48,5 +52,19 @@ describe Capybara::Accessible::Driver do
48
52
  expect { @session.click_link('Alert!') }.to_not raise_error
49
53
  end
50
54
  end
55
+
56
+ context 'with severity set to severe' do
57
+ before do
58
+ Capybara::Accessible::Auditor.severe_rules = ['AX_TEXT_02']
59
+ end
60
+
61
+ after do
62
+ Capybara::Accessible::Auditor.severe_rules = []
63
+ end
64
+
65
+ it 'raises an exception on the image without alt text' do
66
+ expect { @session.visit('/severe') }.to raise_error(Capybara::Accessible::InaccessibleError)
67
+ end
68
+ end
51
69
  end
52
70
  end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-accessible
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Case Commons
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-16 00:00:00.000000000 Z
11
+ date: 2017-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: selenium-webdriver
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: tddium
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sinatra
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: Capybara extension and webdriver for automated accessibility testing
@@ -115,8 +115,7 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - .gitignore
119
- - .rspec
118
+ - ".gitignore"
120
119
  - Gemfile
121
120
  - LICENSE.txt
122
121
  - README.md
@@ -126,6 +125,8 @@ files:
126
125
  - lib/capybara/accessible/auditor.rb
127
126
  - lib/capybara/accessible/driver.rb
128
127
  - lib/capybara/accessible/element.rb
128
+ - lib/capybara/accessible/railtie.rb
129
+ - lib/capybara/accessible/tasks.rb
129
130
  - lib/capybara/accessible/version.rb
130
131
  - lib/vendor/google/accessibility-developer-tools/axs_testing.js
131
132
  - spec/accessible_app.rb
@@ -143,17 +144,17 @@ require_paths:
143
144
  - lib
144
145
  required_ruby_version: !ruby/object:Gem::Requirement
145
146
  requirements:
146
- - - '>='
147
+ - - ">="
147
148
  - !ruby/object:Gem::Version
148
149
  version: '0'
149
150
  required_rubygems_version: !ruby/object:Gem::Requirement
150
151
  requirements:
151
- - - '>='
152
+ - - ">="
152
153
  - !ruby/object:Gem::Version
153
154
  version: '0'
154
155
  requirements: []
155
156
  rubyforge_project:
156
- rubygems_version: 2.0.3
157
+ rubygems_version: 2.6.12
157
158
  signing_key:
158
159
  specification_version: 4
159
160
  summary: A Selenium based webdriver and Capybara extension that runs Google Accessibility
@@ -162,4 +163,3 @@ test_files:
162
163
  - spec/accessible_app.rb
163
164
  - spec/driver_spec.rb
164
165
  - spec/spec_helper.rb
165
- has_rdoc:
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color