Sha256: d44e3a2cfd93a090bb20e5544c569ff0fc4c0cda9ba09b51ad397c3f2a4fa6b4

Contents?: true

Size: 676 Bytes

Versions: 1

Compression:

Stored size: 676 Bytes

Contents

require "spec_helper"

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

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

  before do
    login_as exhibit_curator
  end

  it 'should save 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

1 entries across 1 versions & 1 rubygems

Version Path
blacklight-spotlight-0.4.1 spec/features/javascript/blocks/featured_pages_block_spec.rb