Sha256: 5a05aa7b1e3b95aade11946808077d8af4edfffea6d36c175d41053ab49f6f2f

Contents?: true

Size: 1.22 KB

Versions: 9

Compression:

Stored size: 1.22 KB

Contents

require 'spec_helper'

# Spot checking a few pages to ensure that the stylesheet is rendered correctly in browser.
describe 'HTML page rendering', js: true do
  it "root page" do
    visit '/catalog/oai'
    expect(page).to have_content 'not a legal OAI-PMH verb'
  end

  it "identify page" do
    visit '/catalog/oai?verb=Identify'
    expect(page).to have_xpath('//td[text()="Earliest Datestamp"]/parent::*/td[@class="value"]', text: '2014-02-03T18:42:53Z')
  end

  it "lists records" do
    visit '/catalog/oai?verb=ListRecords&metadataPrefix=oai_dc'
    expect(page).to have_content('OAI Record: oai:test:00282214')
  end

  it "document page" do
    visit '/catalog/oai?verb=GetRecord&identifier=oai:test:00282214&metadataPrefix=oai_dc'
    expect(page).to have_xpath('//td[text()="Title"]/parent::*/td[@class="value"]', text: 'Fikr-i Ayāz')
  end

  it "lists verb on page" do
    visit '/catalog/oai?verb=Identify'
    expect(page).to have_content('Request was of type Identify.')
  end

  it "lists metadata formats for record" do
    visit '/catalog/oai?verb=ListMetadataFormats&identifier=oai:test:00282214'
    expect(page).to have_content('This is a list of metadata formats available for the record "oai:test:00282214"')
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blacklight_oai_provider-7.0.2 spec/features/html_rendering_spec.rb
blacklight_oai_provider-6.1.1 spec/features/html_rendering_spec.rb
blacklight_oai_provider-6.1.0 spec/features/html_rendering_spec.rb
blacklight_oai_provider-6.0.0 spec/features/html_rendering_spec.rb
blacklight_oai_provider-6.0.0.pre2 spec/features/html_rendering_spec.rb
blacklight_oai_provider-6.0.0.pre1 spec/features/html_rendering_spec.rb
blacklight_oai_provider-5.1.0 spec/features/html_rendering_spec.rb
blacklight_oai_provider-5.0.0 spec/features/html_rendering_spec.rb
blacklight_oai_provider-5.0.0.pre1 spec/features/html_rendering_spec.rb