Module: AxeMatchers

Defined in:
lib/decidim/dev/test/rspec_support/accessibility_examples.rb

Defined Under Namespace

Classes: BeAxeClean, ResultFormatter

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.axe_mainline_versionObject



11
12
13
# File 'lib/decidim/dev/test/rspec_support/accessibility_examples.rb', line 11

def self.axe_mainline_version
  @axe_mainline_version ||= axe_version.split(".")[0..1].join(".")
end

.axe_versionObject



4
5
6
7
8
9
# File 'lib/decidim/dev/test/rspec_support/accessibility_examples.rb', line 4

def self.axe_version
  @axe_version ||= begin
    package = JSON.load_file(Rails.root.join("node_modules/axe-core/package.json"))
    package["version"]
  end
end

Instance Method Details

#be_axe_cleanObject



112
113
114
# File 'lib/decidim/dev/test/rspec_support/accessibility_examples.rb', line 112

def be_axe_clean
  BeAxeClean.new
end