Sha256: a6d371fa45f343b19fedca453788260de2be3139ee41ec388541c4ac45461a72

Contents?: true

Size: 972 Bytes

Versions: 11

Compression:

Stored size: 972 Bytes

Contents

# frozen_string_literal: true

RSpec.describe 'Accessibility testing', :js, api: false do
  it 'validates the home page' do
    visit root_path
    expect(page).to be_accessible
  end

  it 'validates the catalog page' do
    visit root_path
    fill_in "q", with: 'history'
    click_on 'search'

    expect(page).to be_accessible

    within '.card.blacklight-language_ssim' do
      click_on 'Language'
      click_on "Tibetan"
    end

    expect(page).to be_accessible
  end

  it 'validates the advanced search form' do
    visit advanced_search_catalog_path
    expect(page).to be_accessible
  end

  it 'validates the single results page' do
    visit solr_document_path('2007020969')
    expect(page).to be_accessible
  end

  def be_accessible(skipping: [])
    # typeahead does funny things with the search bar
    be_axe_clean.excluding('.tt-hint').skipping(skipping + [('color-contrast' if defined?(Bootstrap) && Bootstrap::VERSION < '5')].compact)
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
blacklight-8.8.2 spec/features/axe_spec.rb
blacklight-8.8.1 spec/features/axe_spec.rb
blacklight-8.8.0 spec/features/axe_spec.rb
blacklight-8.7.0 spec/features/axe_spec.rb
blacklight-8.6.1 spec/features/axe_spec.rb
blacklight-8.6.0 spec/features/axe_spec.rb
blacklight-8.5.1 spec/features/axe_spec.rb
blacklight-8.5.0 spec/features/axe_spec.rb
blacklight-8.4.0 spec/features/axe_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/spec/features/axe_spec.rb
blacklight-8.3.0 spec/features/axe_spec.rb