Skip to content

Commit

Permalink
fix other integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mejackreed committed Aug 4, 2014
1 parent 62cb7cb commit 08b77cc
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 21 deletions.
6 changes: 3 additions & 3 deletions spec/integration/external-data/access_panels_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@
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
page.find(".right.embed-browse-control").click
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
Expand Down
6 changes: 3 additions & 3 deletions spec/integration/external-data/facets_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions spec/integration/external-data/location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions spec/integration/external-data/mhld_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
end
3 changes: 0 additions & 3 deletions spec/integration/external-data/mods_subjects_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/external-data/selected_databases_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 08b77cc

Please sign in to comment.