Sha256: 84f91c2ac462d0647156e282ce91097f49d1e6aebc7bc403a1e110ca2098a73e

Contents?: true

Size: 1021 Bytes

Versions: 5

Compression:

Stored size: 1021 Bytes

Contents

require 'spec_helper'

describe 'Dashboard', type: :feature do
  let(:exhibit) { FactoryGirl.create(:default_exhibit) }
  let(:admin) { FactoryGirl.create(:exhibit_admin, exhibit: exhibit) }
  before do
    login_as(admin)
  end

  let!(:parent_feature_page) do
    FactoryGirl.create(:feature_page, title: 'Parent Page', exhibit: exhibit)
  end
  let!(:child_feature_page) do
    FactoryGirl.create(
      :feature_page,
      title: 'Child Page',
      parent_page: parent_feature_page,
      exhibit: exhibit
    )
  end

  it 'includes a list of recently edited feature pages' do
    visit spotlight.exhibit_dashboard_path(exhibit)
    expect(page).to have_content 'Recent Site Building Activity'
    expect(page).to have_content 'Parent Page'
    expect(page).to have_content 'Child Page'
  end

  it 'includes a list of recently indexed items' do
    visit spotlight.exhibit_dashboard_path(exhibit)
    expect(page).to have_content 'Recently Updated Items'
    expect(page).to have_selector('#documents')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blacklight-spotlight-0.7.2 spec/features/dashboard_spec.rb
blacklight-spotlight-0.7.1 spec/features/dashboard_spec.rb
blacklight-spotlight-0.7.0 spec/features/dashboard_spec.rb
blacklight-spotlight-0.6.0 spec/features/dashboard_spec.rb
blacklight-spotlight-0.5.0 spec/features/dashboard_spec.rb