Sha256: a81d412020791719697ff9c0954e52c5e8fd4fe4b6e08d513b2429d2c475ea19

Contents?: true

Size: 672 Bytes

Versions: 5

Compression:

Stored size: 672 Bytes

Contents

require 'spec_helper'

describe 'Featured Pages Blocks', type: :feature do
  let(:exhibit) { FactoryGirl.create(:default_exhibit) }
  let!(:feature_page) do
    FactoryGirl.create(
      :feature_page,
      title: 'xyz',
      exhibit: exhibit
    )
  end

  let(:exhibit_curator) { FactoryGirl.create(:exhibit_curator, exhibit: exhibit) }

  before do
    login_as exhibit_curator
  end

  it 'saves the selected exhibits', js: true do
    visit spotlight.exhibit_home_page_path(exhibit, exhibit.home_page)

    click_link('Edit')

    add_widget 'featured_pages'

    fill_in_typeahead_field with: 'xyz'

    save_page

    expect(page).to have_content 'xyz'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blacklight-spotlight-0.7.2 spec/features/javascript/blocks/featured_pages_block_spec.rb
blacklight-spotlight-0.7.1 spec/features/javascript/blocks/featured_pages_block_spec.rb
blacklight-spotlight-0.7.0 spec/features/javascript/blocks/featured_pages_block_spec.rb
blacklight-spotlight-0.6.0 spec/features/javascript/blocks/featured_pages_block_spec.rb
blacklight-spotlight-0.5.0 spec/features/javascript/blocks/featured_pages_block_spec.rb