Sha256: c24a0739dd6a7e817b6dda0d925ffcc001c37f08c4948ac4da6169ef6ff88560

Contents?: true

Size: 1.2 KB

Versions: 8

Compression:

Stored size: 1.2 KB

Contents

# frozen_string_literal: true

describe 'Block controls' do
  let(:exhibit) { FactoryBot.create(:exhibit) }
  let(:exhibit_curator) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) }

  before { login_as exhibit_curator }

  it 'is split into separate sections', js: true do
    # create page
    visit spotlight.exhibit_dashboard_path(exhibit)

    click_link 'Feature pages'

    add_new_page_via_button('My New Feature Page')

    expect(page).to have_css('h3', text: 'My New Feature Page')

    expect(page).to have_content('The feature page was created.')
    within('li.dd-item') do
      click_link 'Edit'
    end
    # fill in title
    fill_in 'feature_page_title', with: 'Exhibit Title'
    # click to add widget
    click_add_widget

    within('.spotlight-block-controls') do
      expect(page).to have_css('.st-controls-group', count: 2)
      within(first('.st-controls-group')) do
        expect(page).to have_content 'Standard widgets'
        expect(page).to have_css('.st-block-controls__button')
      end
      within(all('.st-controls-group').last) do
        expect(page).to have_content 'Exhibit item widgets'
        expect(page).to have_css('.st-block-controls__button')
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.alpha.10 spec/features/javascript/block_controls_spec.rb
blacklight-spotlight-3.0.0.alpha.9 spec/features/javascript/block_controls_spec.rb
blacklight-spotlight-3.0.0.alpha.8 spec/features/javascript/block_controls_spec.rb
blacklight-spotlight-3.0.0.alpha.7 spec/features/javascript/block_controls_spec.rb
blacklight-spotlight-3.0.0.alpha.6 spec/features/javascript/block_controls_spec.rb
blacklight-spotlight-3.0.0.alpha.5 spec/features/javascript/block_controls_spec.rb
blacklight-spotlight-3.0.0.alpha.4 spec/features/javascript/block_controls_spec.rb
blacklight-spotlight-3.0.0.alpha.3 spec/features/javascript/block_controls_spec.rb