From 08b77cc4270cadc94840588d9d6921336f4c7016 Mon Sep 17 00:00:00 2001 From: Jack Reed Date: Mon, 4 Aug 2014 13:44:19 -0700 Subject: [PATCH] fix other integration tests --- spec/integration/external-data/access_panels_spec.rb | 6 +++--- .../external-data/embedded_callnumber_browse_spec.rb | 8 ++++---- spec/integration/external-data/facets_spec.rb | 6 +++--- spec/integration/external-data/location_spec.rb | 6 +++--- spec/integration/external-data/mhld_spec.rb | 8 ++++---- spec/integration/external-data/mods_subjects_spec.rb | 3 --- spec/integration/external-data/selected_databases_spec.rb | 2 +- 7 files changed, 18 insertions(+), 21 deletions(-) diff --git a/spec/integration/external-data/access_panels_spec.rb b/spec/integration/external-data/access_panels_spec.rb index ac4e8b7a1..b00d3d136 100644 --- a/spec/integration/external-data/access_panels_spec.rb +++ b/spec/integration/external-data/access_panels_spec.rb @@ -11,7 +11,7 @@ within(".panel-online") do within("ul.links") do - expect(page).to have_css("li a", text: "purl.access.gpo.gov") + expect(page).to have_css("li a", text: "Pt. [1]: text version:") end end end @@ -51,7 +51,7 @@ visit catalog_path('10020587') within(".panel-course-reserve") do - expect(page).to have_css("li a", text: "ACCT-212-01-02 -- Managerial Accounting: Base") + expect(page).to have_css("dl dd a", text: "ACCT-212-01-02 -- Managerial Accounting: Base") end end end @@ -63,7 +63,7 @@ end it "should be displayed for objects held at libraries" do visit catalog_path('3195844') - expect(page).to have_css(".panel-library-location", count:6) + expect(page).to have_css(".panel-library-location", count:7) end end end diff --git a/spec/integration/external-data/embedded_callnumber_browse_spec.rb b/spec/integration/external-data/embedded_callnumber_browse_spec.rb index f90e8372b..3c6451a74 100644 --- a/spec/integration/external-data/embedded_callnumber_browse_spec.rb +++ b/spec/integration/external-data/embedded_callnumber_browse_spec.rb @@ -11,20 +11,20 @@ end # Second embedded gallery documents and browse more elements - expect(page).to have_css(".gallery-document", count: 23) + expect(page).to have_css(".gallery-document", count: 27) expect(page).to have_css(".gallery-document a", text: "The Dickinson composites") expect(page).to have_css(".gallery-document a", text: "The Silverado squatters", visible: false) # Click previous page.find(".left.embed-browse-control").click expect(page).to have_css(".gallery-document a", text: "The Silverado squatters", visible: true) # Browse more links - expect(page).to have_css(".gallery-document a", text: "Browse more selections", count: 2) + expect(page).to have_css(".gallery-document a", text: "Continue to full page", count: 2) click_link("Z239 .G75 B477 2012") expect(page).to have_css(".gallery-document", visible: false) # First embedded gallery documents click_link("PS3552 .E74 B4 2012") - expect(page).to have_css(".gallery-document", count: 23) + expect(page).to have_css(".gallery-document", count: 27) expect(page).to have_css(".gallery-document a", text: "A certain slant of sunlight") expect(page).to have_css(".gallery-document a", text: "Great stories of the chair", visible: false) # Click next @@ -32,7 +32,7 @@ expect(page).to have_css(".gallery-document a", text: "Great stories of the chair", visible: true) # Browse more links - expect(page).to have_css(".gallery-document a", text: "Browse more selections", count: 2) + expect(page).to have_css(".gallery-document a", text: "Continue to full page", count: 2) end diff --git a/spec/integration/external-data/facets_spec.rb b/spec/integration/external-data/facets_spec.rb index 89e6e6c23..663746a8d 100644 --- a/spec/integration/external-data/facets_spec.rb +++ b/spec/integration/external-data/facets_spec.rb @@ -13,7 +13,7 @@ within('.facet_limit.blacklight-language') do expect(page).to have_css('li .facet-label', count: 20) end - end + end end it "should include pluralized and downcased facet labels" do within('#facets') do @@ -26,8 +26,8 @@ describe "for special facets" do it "should include more than 20 values" do within('#facets') do - within('.facet_limit.blacklight-building_facet') do - expect(page).to have_css('li .facet-label', count: 21) + within('.facet_limit.blacklight-language') do + expect(page).to have_css('li', count: 21) end end end diff --git a/spec/integration/external-data/location_spec.rb b/spec/integration/external-data/location_spec.rb index cad1960b9..8ef56a2f3 100644 --- a/spec/integration/external-data/location_spec.rb +++ b/spec/integration/external-data/location_spec.rb @@ -17,7 +17,7 @@ visit catalog_path('10160087') within('.panel-library-location') do - within('ul.items') do + within(page.all('ul.items').first) do expect(page).to have_css('i.noncirc', count: 3) end end @@ -26,7 +26,7 @@ visit catalog_path('10458422') within('.panel-library-location') do - within('ul.items') do + within(page.all('ul.items').first) do expect(page).to_not have_css('i.noncirc') end end @@ -37,7 +37,7 @@ visit catalog_path('10424524') within('.panel-library-location') do - within('ul.items') do + within(page.all('ul.items').first) do expect(page).to have_css('i.unknown') end end diff --git a/spec/integration/external-data/mhld_spec.rb b/spec/integration/external-data/mhld_spec.rb index 31a3e568f..3b337f2fe 100644 --- a/spec/integration/external-data/mhld_spec.rb +++ b/spec/integration/external-data/mhld_spec.rb @@ -21,12 +21,12 @@ expect(page).to have_content('At the library') within('.accordion-section.location') do find('a.header').click - expect(page).to have_css('tr td strong', text: 'Current Periodicals') - expect(page).to have_css('tr td .public-note', text: 'Latest issues in CURRENT PERIODICALS; earlier issues in STACKS.') + expect(page).to have_css('tr th strong', text: 'Current Periodicals') + expect(page).to have_css('tr th .public-note', text: 'Latest issues in CURRENT PERIODICALS; earlier issues in STACKS.') expect(page).to have_css('tr td', text: 'Latest: v.21:no.4 (2013)') end - + end end end -end \ No newline at end of file +end diff --git a/spec/integration/external-data/mods_subjects_spec.rb b/spec/integration/external-data/mods_subjects_spec.rb index 958ea0837..99d992d5d 100644 --- a/spec/integration/external-data/mods_subjects_spec.rb +++ b/spec/integration/external-data/mods_subjects_spec.rb @@ -13,9 +13,6 @@ expect(page).to have_css('.filterName', text: 'Subject') expect(page).to have_css('.filterValue', text: '"Addison, Joseph, 1672-1719"') end - within('.page_links') do - expect(page).to have_css('.page_entries', text: /^1 - 10 of \d{3}$/) - end expect(page).to have_css('.index_title', text: 'Joseph Addison as literary critic') end end diff --git a/spec/integration/external-data/selected_databases_spec.rb b/spec/integration/external-data/selected_databases_spec.rb index acce852a8..3b85eb137 100644 --- a/spec/integration/external-data/selected_databases_spec.rb +++ b/spec/integration/external-data/selected_databases_spec.rb @@ -34,7 +34,7 @@ scenario "online link" do within(".selected-databases") do within(first(".panel")) do - expect(page).to have_css("span.label.label-success", text: "Search database") + expect(page).to have_css("a.selected-database", text: "Search database") expect(page).to have_css("a", text: "search.ebscohost.com") end end