Sha256: bdaf8565671d7bda1403a7575b7dde1376a1ffae51bf9d95372e20d6f8a6ee3a

Contents?: true

Size: 996 Bytes

Versions: 10

Compression:

Stored size: 996 Bytes

Contents

# frozen_string_literal: true

RSpec.describe 'Accessibility testing', api: false, js: true 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_button 'search'

    expect(page).to be_accessible

    within '.card.blacklight-language_ssim' do
      click_button 'Language'
      click_link "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.excluding('.search-query-form')
  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 Bootstrap::VERSION < '5')].compact)
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
blacklight-7.40.0 spec/features/axe_spec.rb
blacklight-7.39.0 spec/features/axe_spec.rb
blacklight-7.38.0 spec/features/axe_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/spec/features/axe_spec.rb
blacklight-7.37.0 spec/features/axe_spec.rb
blacklight-7.36.2 spec/features/axe_spec.rb
blacklight-7.36.1 spec/features/axe_spec.rb
blacklight-7.36.0 spec/features/axe_spec.rb
blacklight-7.35.0 spec/features/axe_spec.rb
blacklight-7.34.0 spec/features/axe_spec.rb