Sha256: cf55b13d4ca1e27890a43f063d8dc4e3b9534e720495b84702c4a87e6e5d84f2

Contents?: true

Size: 852 Bytes

Versions: 11

Compression:

Stored size: 852 Bytes

Contents

# frozen_string_literal: true

describe 'Reindex Monitor', js: true, default_max_wait_time: 10 do
  let(:resources) do
    [FactoryBot.create(:resource)]
  end
  let(:exhibit) { FactoryBot.create(:exhibit, resources: resources) }
  let(:exhibit_curator) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) }

  before do
    exhibit.job_trackers.create(resource: exhibit, status: 'completed', job_class: 'Spotlight::ReindexExhibitJob')
    login_as exhibit_curator
    visit spotlight.admin_exhibit_catalog_path(exhibit)
  end

  it 'is rendered on the item admin page' do
    expect(page).to have_css('.card.index-status', visible: true)
    within('.card.index-status') do
      expect(page).to have_css('p', text: /Began reindexing a total of \d+ items/)
      expect(page).to have_css('p', text: /Reindexed \d+ of \d+ items/)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.3.0 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.2.0 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.1.0 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.3 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.2 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.1 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/features/javascript/reindex_monitor_spec.rb