spec/features/home_page_spec.rb in blacklight-spotlight-3.0.0.alpha.2 vs spec/features/home_page_spec.rb in blacklight-spotlight-3.0.0.alpha.3

- old
+ new

@@ -1,16 +1,17 @@ # frozen_string_literal: true describe 'Home page', type: :feature, versioning: true do let(:exhibit) { FactoryBot.create(:exhibit) } let(:exhibit_curator) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) } + before { login_as exhibit_curator } it 'exists by default on exhibits' do visit spotlight.exhibit_dashboard_path(exhibit) click_link 'Feature pages' - expect(page).to have_selector 'h3', text: 'Homepage' + expect(page).to have_selector 'h2', text: 'Homepage' expect(page).to have_selector 'h3.card-title', text: 'Exhibit Home' end it 'allows users to edit the home page title' do visit spotlight.exhibit_dashboard_path(exhibit) @@ -60,9 +61,10 @@ end describe 'page options on edit form' do describe 'show title' do let(:home_page) { FactoryBot.create(:home_page, display_title: false, exhibit: exhibit) } + it 'is updatable from the edit page' do expect(home_page.display_title).to be_falsey visit spotlight.edit_exhibit_home_page_path(home_page.exhibit, home_page) expect(find('#home_page_display_title')).not_to be_checked