Sha256: 3a666033ae4be79f7f4ae3095dfac63ac0f44d79a69c601a833bd216b2f8d476

Contents?: true

Size: 1.15 KB

Versions: 4

Compression:

Stored size: 1.15 KB

Contents

require "spec_helper"

feature "Facets Administration", js:  true do
  let(:exhibit) { FactoryGirl.create(:exhibit) }
  let(:exhibit_curator) { FactoryGirl.create(:exhibit_curator, exhibit: exhibit) }
  before { login_as exhibit_curator }
  it "should allow us to update the label with edit-in-place" do
    skip("Passing locally but Travis is throwing intermittent errors") if ENV["CI"]

    input_id = "blacklight_configuration_facet_fields_genre_ssim_label"
    visit spotlight.exhibit_home_page_path(exhibit, exhibit.home_page)
    click_link exhibit_curator.email

    within '#user-util-collapse .dropdown' do
      click_link 'Dashboard'
    end

    click_link "Search facets"

    facet = find(".edit-in-place", text: "Genre")
    expect(page).not_to have_content("Topic")
    expect(page).to have_css("input##{input_id}", visible: false)

    facet.click

    expect(page).to have_css("input##{input_id}", visible: true)

    fill_in(input_id, with: "Topic")

    click_button "Save changes"

    expect(page).to have_content("The exhibit was successfully updated.")

    expect(page).not_to have_content("Genre")
    expect(page).to have_content("Topic")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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