Sha256: 674e5912c8d923858b0eaa9a6a8d143718fb6bad5b9c407f2a771505930e5bb9

Contents?: true

Size: 862 Bytes

Versions: 10

Compression:

Stored size: 862 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 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

10 entries across 10 versions & 1 rubygems

Version Path
blacklight-8.0.1 spec/features/axe_spec.rb
blacklight-8.0.0 spec/features/axe_spec.rb
blacklight-8.0.0.beta8 spec/features/axe_spec.rb
blacklight-8.0.0.beta7 spec/features/axe_spec.rb
blacklight-8.0.0.beta6 spec/features/axe_spec.rb
blacklight-8.0.0.beta5 spec/features/axe_spec.rb
blacklight-8.0.0.beta4 spec/features/axe_spec.rb
blacklight-8.0.0.beta3 spec/features/axe_spec.rb
blacklight-8.0.0.beta2 spec/features/axe_spec.rb
blacklight-8.0.0.beta1 spec/features/axe_spec.rb