Sha256: a61f09d2dafe0013f10a1bf2a6a00ff8ed4af0a3ffb0118b1bdc9c77ea3ec950

Contents?: true

Size: 527 Bytes

Versions: 5

Compression:

Stored size: 527 Bytes

Contents

# frozen_string_literal: true

shared_examples_for "accessible page" do
  it "passes accessibility tests" do
    expect(page).to be_axe_clean.excluding(
      'a[title="Find out more about cookies"]'
    )
  end

  it "passes HTML validation" do
    # Capybara is stripping the doctype out of the HTML which is required for
    # the validation. If it doesn't exist, add it there.
    html = page.source
    html = "<!DOCTYPE html>\n#{html}" unless html.strip.match?(/^<!DOCTYPE/i)

    expect(html).to be_valid_html
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decidim-dev-0.26.10 lib/decidim/dev/test/rspec_support/accessibility_examples.rb
decidim-dev-0.26.9 lib/decidim/dev/test/rspec_support/accessibility_examples.rb
decidim-dev-0.26.8 lib/decidim/dev/test/rspec_support/accessibility_examples.rb
decidim-dev-0.26.7 lib/decidim/dev/test/rspec_support/accessibility_examples.rb
decidim-dev-0.26.5 lib/decidim/dev/test/rspec_support/accessibility_examples.rb