Sha256: 563c7fb1efc70d5ae07c9783f643050c74afb3e4194b763898f04b1361fa912e

Contents?: true

Size: 841 Bytes

Versions: 11

Compression:

Stored size: 841 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
    FactoryBot.create(:in_progress_reindexing_log_entry, exhibit: exhibit, items_reindexed_estimate: 5)
    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.0.0.rc3 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.rc2 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.rc1 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.alpha.10 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.alpha.9 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.alpha.8 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.alpha.7 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.alpha.6 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.alpha.5 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.alpha.4 spec/features/javascript/reindex_monitor_spec.rb
blacklight-spotlight-3.0.0.alpha.3 spec/features/javascript/reindex_monitor_spec.rb