Sha256: 8f1861f6eef02b927958dae12c9dd2d6615067b4c2a3c24b57ef54c6d3ab8ba9

Contents?: true

Size: 1.26 KB

Versions: 1

Compression:

Stored size: 1.26 KB

Contents

require "spec_helper"

describe "Mutli-Up Item Grid", js: true do
  let(:exhibit_curator) { FactoryGirl.create(:exhibit_curator) }
  let!(:exhibit) { Spotlight::Exhibit.default }
  let!(:feature_page) { FactoryGirl.create(:feature_page, exhibit: exhibit) }
  before { login_as exhibit_curator }
  it "should display items that are configured to display (and hide items that are not)" do
    visit '/'
    click_link exhibit_curator.email
    within '.dropdown-menu' do
      click_link 'Dashboard'
    end
    click_link "Feature pages"

    within("[data-id='#{feature_page.id}']") do
      click_link "Edit"
    end

    find("[data-icon='add']").click

    find("a[data-type='multi-up-item-grid']").click

    fill_in("item-grid-id_0", with: "dq287tq6352")
    check("item-grid-display_0")
    fill_in("item-grid-id_1", with: "jp266yb7109")
    check("item-grid-display_1")
    fill_in("item-grid-id_2", with: "zv316zr9542")

    click_button "Save changes"
    expect(page).to have_content("Page was successfully updated.")

    within("[data-id='#{feature_page.id}']") do
      click_link "View"
    end
    expect(page).to have_css("[data-id='dq287tq6352']")
    expect(page).to have_css("[data-id='jp266yb7109']")
    expect(page).not_to have_css("[data-id='zv316zr9542']")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blacklight-spotlight-0.0.3 spec/features/javascript/multi_up_item_grid_spec.rb