Sha256: e1643011037d82ecd253083f688e1263a1e604dd86a255eeb3e7260045d80ca1

Contents?: true

Size: 842 Bytes

Versions: 4

Compression:

Stored size: 842 Bytes

Contents

require 'spec_helper'

describe "Browse Category Administration", type: :feature, js: true do
  let(:exhibit) { FactoryGirl.create(:exhibit) }
  let(:admin)   { FactoryGirl.create(:exhibit_admin, exhibit: exhibit) }
  before { login_as admin }
  describe "Featured Image" do
    it "should be selectable by choosing a featured item" do
      visit spotlight.edit_exhibit_search_path exhibit, exhibit.searches.first
      autocomplete_field = find("input#featured-item-title")
      fill_in_typeahead_field "search[featured_item_id]", with: "gt736xf9712"
      click_button "Save changes"
      expect(page).to have_content "The search was successfully updated."
      within(".pic.thumbnail") do
        expect(page).to have_css('img[src="https://stacks.stanford.edu/image/gt736xf9712/gt736xf9712_05_0001_thumb"]')
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
blacklight-spotlight-0.3.1 spec/features/javascript/browse_category_admin_spec.rb
blacklight-spotlight-0.3.0 spec/features/javascript/browse_category_admin_spec.rb
blacklight-spotlight-0.2.0 spec/features/javascript/browse_category_admin_spec.rb
blacklight-spotlight-0.1.0 spec/features/javascript/browse_category_admin_spec.rb