axe-core-api 4.6.0 → 4.6.1.pre.6f8a176
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/axe/api/results.rb +1 -1
- data/lib/axe/api/run.rb +22 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ef9de09fae5aec72fa0c8f79872ecd52050970a252eadefefc84b78c317021f
|
4
|
+
data.tar.gz: 81a782d3c1fcc0b7f68f79131fc8e690bda6402519daf940bbb6bb5b4789ce75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e490513bcc8a2ce813382722082df2e0e95bafb2aeadad0d5fe2dfc9b1cdd4c7845f29f8a42ed70c1c9c15eb1596831df2fe6dc6cb7548f2354032ff9a54e1c3
|
7
|
+
data.tar.gz: 7aef9ae6141c20ec169b92d0b162f5d7aab6551a382a823c3c2479e7a2cd14d515e30d151a2637e5334af3bd9bdc4fa28a678d5117d89f1efeb1613e829f4331
|
data/lib/axe/api/results.rb
CHANGED
data/lib/axe/api/run.rb
CHANGED
@@ -36,9 +36,19 @@ module Axe
|
|
36
36
|
partial_results = run_partial_recursive(page, @context, lib, true)
|
37
37
|
throw partial_results if partial_results.respond_to?("key?") and partial_results.key?("errorMessage")
|
38
38
|
results = within_about_blank_context(page) { |page|
|
39
|
+
partial_res_str = partial_results.to_json
|
40
|
+
size_limit = 20_000_000
|
41
|
+
while not partial_res_str.empty? do
|
42
|
+
chunk_size = size_limit
|
43
|
+
chunk_size = partial_res_str.length if chunk_size > partial_res_str.length
|
44
|
+
chunk = partial_res_str[0..chunk_size-1]
|
45
|
+
partial_res_str = partial_res_str[chunk_size..-1]
|
46
|
+
store_chunk page, chunk
|
47
|
+
end
|
48
|
+
|
39
49
|
Common::Loader.new(page, lib).load_top_level Axe::Configuration.instance.jslib
|
40
50
|
begin
|
41
|
-
axe_finish_run page
|
51
|
+
axe_finish_run page
|
42
52
|
rescue
|
43
53
|
raise StandardError.new "axe.finishRun failed. Please check out https://github.com/dequelabs/axe-core-gems/blob/develop/error-handling.md"
|
44
54
|
end
|
@@ -138,12 +148,20 @@ module Axe
|
|
138
148
|
return results
|
139
149
|
end
|
140
150
|
|
141
|
-
def
|
151
|
+
def store_chunk(page, chunk)
|
152
|
+
script = <<-JS
|
153
|
+
const chunk = arguments[0];
|
154
|
+
window.partialResults ??= '';
|
155
|
+
window.partialResults += chunk;
|
156
|
+
JS
|
157
|
+
page.execute_script_fixed script, chunk
|
158
|
+
end
|
159
|
+
def axe_finish_run(page)
|
142
160
|
script = <<-JS
|
143
|
-
const partialResults =
|
161
|
+
const partialResults = JSON.parse(window.partialResults || '[]');
|
144
162
|
return axe.finishRun(partialResults);
|
145
163
|
JS
|
146
|
-
page.execute_script_fixed script
|
164
|
+
page.execute_script_fixed script
|
147
165
|
end
|
148
166
|
|
149
167
|
def axe_shadow_select(page, frame_selector)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: axe-core-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.6.
|
4
|
+
version: 4.6.1.pre.6f8a176
|
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-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dumb_delegator
|
@@ -189,9 +189,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
189
189
|
version: 2.3.0
|
190
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- - "
|
192
|
+
- - ">"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
194
|
+
version: 1.3.1
|
195
195
|
requirements: []
|
196
196
|
rubygems_version: 3.2.32
|
197
197
|
signing_key:
|