Sha256: fada9952d897df7f6ce5b51fad4df7c0eaa035aeb1a045d019dc2cf4e12c5868

Contents?: true

Size: 1.71 KB

Versions: 25

Compression:

Stored size: 1.71 KB

Contents

require 'spec_helper'

describe "Bookmarks" do
  describe "navigating from the homepage" do
    it "should have a link to the history page" do
      sign_in 'user1'
      visit root_path
      click_link 'Bookmarks'
      expect(page).to have_content 'You have no bookmarks'
    end
  end

  it "should clear bookmarks" do
    visit catalog_path('2007020969')
    click_button 'Bookmark'
    click_link 'Bookmarks'
    click_link 'Clear Bookmarks'
    expect(page).to have_content 'Cleared your bookmarks.'
    expect(page).to have_content 'You have no bookmarks'
  end
  it "add and remove bookmarks from search results" do
    sign_in 'user1'
    visit root_path
    fill_in "q", with: 'book'
    click_button 'search'
    click_button 'Bookmark'
    expect(page).to have_content 'Successfully added bookmark.'
    fill_in "q", with: 'book'
    click_button 'search'
    click_button 'Remove bookmark'
    expect(page).to have_content 'Successfully removed bookmark.'
  end
        
  it "should add and delete bookmarks from the show page" do
    sign_in 'user1'
    visit catalog_path('2007020969')
    click_button 'Bookmark'
    click_button 'Remove bookmark'
    expect(page).to have_content 'Successfully removed bookmark.'
  end
      
  it "should add bookmarks after a user logs in" do
    visit catalog_path('2007020969')
    click_button 'Bookmark'
    sign_in 'user1'
    visit bookmarks_path
    expect(page).to have_button("Remove bookmark")
    expect(page).to have_content("Strong Medicine speaks")
  end

  it "should cite items in bookmarks" do
    visit catalog_path('2007020969')
    click_button 'Bookmark'
    click_link 'Bookmarks'
    click_link 'Cite'
    expect(page).to have_content 'Strong Medicine speaks'
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
blacklight-4.9.0 spec/features/bookmarks_spec.rb
blacklight-4.8.0 spec/features/bookmarks_spec.rb
blacklight-5.3.0 spec/features/bookmarks_spec.rb
blacklight-5.0.3 spec/features/bookmarks_spec.rb
blacklight-5.1.1 spec/features/bookmarks_spec.rb
blacklight-5.2.0 spec/features/bookmarks_spec.rb
blacklight-5.1.0 spec/features/bookmarks_spec.rb
blacklight-5.0.2 spec/features/bookmarks_spec.rb
blacklight-5.0.1 spec/features/bookmarks_spec.rb
blacklight-5.0.0 spec/features/bookmarks_spec.rb
blacklight-4.7.0 spec/features/bookmarks_spec.rb
blacklight-4.7.0.pre1 spec/features/bookmarks_spec.rb
blacklight-5.0.0.pre4 spec/features/bookmarks_spec.rb
blacklight-4.6.3 spec/features/bookmarks_spec.rb
blacklight-5.0.0.pre3 spec/features/bookmarks_spec.rb
blacklight-4.6.2 spec/features/bookmarks_spec.rb
blacklight-5.0.0.pre2 spec/features/bookmarks_spec.rb
blacklight-4.6.1 spec/features/bookmarks_spec.rb
blacklight-5.0.0.pre1 spec/features/bookmarks_spec.rb
blacklight-4.6.0 spec/features/bookmarks_spec.rb