axe-core-api 4.4.0.pre.f5e246c → 4.4.0.pre.f437c8e

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 449e4fcea2dd893dd0503e7951d609825ae463e6b13fd334e2dc125b498065be
4
- data.tar.gz: 3e82af730b765f1bb5fba01a994b88d95c38e9023ec534a0a24a484dd9c0d27c
3
+ metadata.gz: 65bdbe2cbe9019fcc7fcfc6fdafba9feea853e1de9a485e95c328bbf5e61f637
4
+ data.tar.gz: d4492b7b04f8fa87657b17530a2d9ac79a18b30f575770bf1ff11cf4d44c3507
5
5
  SHA512:
6
- metadata.gz: 428d6218915cbf17dc582b9c7f31b13f1dbc73473d06111dba8df5023d699f72d2322560f68652989b1c24c29f750c5fc92e257f7caa0d6a4c035d790aeb0131
7
- data.tar.gz: f7bda46ff4129ad7195e65f129a4fefea201956782f5950deaf7985e46f00b5a091a88791c46196991bd672b3893173627da8342398be5b2e470b708291abf55
6
+ metadata.gz: 98a4942e38ca0707680da9123f303c4be5827a9f2da117a16652120065a18ea190d32227f36b6c91e88676cf666dd261e04aa61fefbd9b98c322f2f7bb047a76
7
+ data.tar.gz: 80d48c852f7b396d90a527b7614683f6e73511831c98274dab528e6bfaf07ab92aac062a4593414c905e5214ece7e0e19a7085a0150ce5fdf718c28975546bf1
@@ -3,7 +3,7 @@ require 'virtus'
3
3
  module Axe
4
4
  module API
5
5
  class ValueObject
6
- include ::Virtus.value_object mass_assignment: false, nullify_blank: false
6
+ include ::Virtus.value_object mass_assignment: false, nullify_blank: true
7
7
  end
8
8
  end
9
9
  end
data/lib/axe/core.rb CHANGED
@@ -25,16 +25,10 @@ module Axe
25
25
  callable.call @page
26
26
  end
27
27
 
28
- def self.has_run_partial?(page)
29
- page.evaluate_script <<-JS
30
- typeof window.axe.runPartial === 'function'
31
- JS
32
- end
33
-
34
28
  private
35
29
 
36
30
  def use_run_partial
37
- Core.has_run_partial?(@page) and not Axe::Configuration.instance.legacy_mode
31
+ has_run_partial? and not Axe::Configuration.instance.legacy_mode
38
32
  end
39
33
 
40
34
  def load_axe_core(source)
@@ -46,6 +40,12 @@ module Axe
46
40
  loader.call source
47
41
  end
48
42
 
43
+ def has_run_partial?
44
+ @page.evaluate_script <<-JS
45
+ typeof window.axe.runPartial === 'function'
46
+ JS
47
+ end
48
+
49
49
  def already_loaded?
50
50
  @page.evaluate_script <<-JS
51
51
  window.#{JS_NAME} &&
data/lib/loader.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require_relative "./axe/configuration"
2
- require_relative "./axe/core"
3
2
  require_relative "./hooks"
4
3
 
5
4
  module Common
@@ -26,8 +25,8 @@ module Common
26
25
  private
27
26
 
28
27
  def set_allowed_origins
29
- allowed_origins = "<same_origin>"
30
- allowed_origins = "<unsafe_all_origins>" if !Axe::Configuration.instance.legacy_mode && !Axe::Core::has_run_partial?(@page)
28
+ allowed_origins = "<unsafe_all_origins>"
29
+ allowed_origins = "<same_origin>" if Axe::Configuration.instance.legacy_mode
31
30
  @page.execute_script "axe.configure({ allowedOrigins: ['#{allowed_origins}'] });"
32
31
  end
33
32