Sha256: ce8c11923c49a843a4da887a26baa7199ad68e869b023c68cfca8abe21caf954

Contents?: true

Size: 1.77 KB

Versions: 37

Compression:

Stored size: 1.77 KB

Contents

# -*- encoding : utf-8 -*-
require 'spec_helper'

describe "Record View" do
  it "should display a normal record" do
    visit catalog_path('2007020969')
    expect(page).to have_content "Title:" 
    expect(page).to have_content "Strong Medicine speaks" 
    expect(page).to have_content "Subtitle:" 
    expect(page).to have_content "a Native American elder has her say : an oral history" 
    expect(page).to have_content "Author:" 
    expect(page).to have_content "Hearth, Amy Hill, 1958-"
    expect(page).to have_content "Format:" 
    expect(page).to have_content "Book" 
    expect(page).to have_content "Call number:"
    expect(page).to have_content "E99.D2 H437 2008"
    tmp_value = Capybara.ignore_hidden_elements
    Capybara.ignore_hidden_elements = false
    expect(page).to have_selector("link[rel=alternate]")
    Capybara.ignore_hidden_elements = tmp_value
    
  end

  it "should not display blank titles" do
    visit catalog_path('2008305903')
    expect(page).not_to have_content "More Information:" 
  end

  it "should not display vernacular records" do
    visit catalog_path('2009373513')
    expect(page).to have_content "次按驟變" 
    expect(page).to have_content "林行止" 
    expect(page).to have_content "臺北縣板橋市" 
  end
  it "should not display 404" do
    visit catalog_path('this_id_does_not_exist')
    expect(page.driver.status_code).to eq 404
    expect(page).to have_content "The page you were looking for doesn't exist." 
  end
  
  describe "Tools" do
    it "should have a refworks link" do
      visit catalog_path('2008305903')
      expect(page).to have_link "Export to Refworks"
      link = find_link("Export to Refworks")
      expect(link['href']).to include CGI.escape(catalog_path('2008305903', format: :refworks_marc_txt))
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
blacklight-5.19.2 spec/features/record_view_spec.rb
blacklight-5.19.1 spec/features/record_view_spec.rb
blacklight-5.19.0 spec/features/record_view_spec.rb
blacklight-5.18.0 spec/features/record_view_spec.rb
blacklight-5.17.2 spec/features/record_view_spec.rb
blacklight-5.17.1 spec/features/record_view_spec.rb
blacklight-5.17.0 spec/features/record_view_spec.rb
blacklight-5.16.4 spec/features/record_view_spec.rb
blacklight-5.16.3 spec/features/record_view_spec.rb
blacklight-5.16.2 spec/features/record_view_spec.rb
blacklight-5.16.1 spec/features/record_view_spec.rb
blacklight-5.16.0 spec/features/record_view_spec.rb
blacklight-5.15.0 spec/features/record_view_spec.rb
blacklight-5.14.0 spec/features/record_view_spec.rb
blacklight-5.13.1 spec/features/record_view_spec.rb
blacklight-5.13.0 spec/features/record_view_spec.rb
blacklight-5.11.3 spec/features/record_view_spec.rb
blacklight-5.12.1 spec/features/record_view_spec.rb
blacklight-5.12.0 spec/features/record_view_spec.rb
blacklight-5.10.3 spec/features/record_view_spec.rb