Sha256: 31aae192f9ea1b157a85463a010916105c68d25c162c1b126d71f252fd399380

Contents?: true

Size: 1020 Bytes

Versions: 40

Compression:

Stored size: 1020 Bytes

Contents

# frozen_string_literal: true

describe 'Add tags to an item in an exhibit', type: :feature do
  let(:exhibit) { FactoryBot.create(:exhibit) }
  let(:curator) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) }
  let(:custom_field) { FactoryBot.build_stubbed(:custom_field, exhibit: exhibit) }

  before do
    login_as(curator)
  end

  it 'changes and display the of tags' do
    visit spotlight.exhibit_solr_document_path(exhibit, 'dq287tq6352')

    expect(page).to have_link 'Edit'

    click_on 'Edit'

    fill_in 'Tags', with: 'One, Two and a half, Three'

    click_on 'Save changes'

    visit spotlight.exhibit_solr_document_path(exhibit, 'dq287tq6352')

    within('dd.blacklight-exhibit_tags') do
      expect(page).to have_selector 'a', text: 'One'
      expect(page).to have_selector 'a', text: 'Two and a half'
      expect(page).to have_selector 'a', text: 'Three'
    end

    click_on 'Two and a half'

    expect(page).to have_content 'Remove constraint Exhibit Tags: Two and a half'
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.3.0 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.2.0 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.1.0 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.3 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.2 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.1 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.rc3 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.rc2 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.rc1 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.alpha.10 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.alpha.9 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.alpha.8 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.alpha.7 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.alpha.6 spec/features/exhibits/add_tags_spec.rb
blacklight-spotlight-3.0.0.alpha.5 spec/features/exhibits/add_tags_spec.rb