Sha256: ae77ebb2c59760130b0d4a738cf480e0a6e66052a63f574d713fb0ee3e240654

Contents?: true

Size: 852 Bytes

Versions: 1

Compression:

Stored size: 852 Bytes

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=00282214&metadataPrefix=oai_dc'
    expect(page).to have_xpath('//td[text()="Title"]/parent::*/td[@class="value"]', text: 'Fikr-i Ayāz')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blacklight_oai_provider-4.1.0 spec/features/html_rendering_spec.rb