Sha256: b85da71cbcffd9003bc7400e4bb3c397bbb991c03a502b06bc7cb4074a073a62
Contents?: true
Size: 589 Bytes
Versions: 1
Compression:
Stored size: 589 Bytes
Contents
# frozen_string_literal: true shared_examples_for "accessible page" do it "passes accessibility tests" do expect(page).to be_axe_clean 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) # This would cause a validation error (added by Foundation JS). html = html.gsub(/<meta class="foundation-mq">/, "") expect(html).to be_valid_html end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
decidim-dev-0.25.0.rc1 | lib/decidim/dev/test/rspec_support/accessibility_examples.rb |