Sha256: d1919c9b780647d528ab689c12feb3cc6686063ba3fd422af607e6445ed8e018
Contents?: true
Size: 1.25 KB
Versions: 11
Compression:
Stored size: 1.25 KB
Contents
feature 'Editing the Home Page', js: true do let(:exhibit) { FactoryGirl.create(:exhibit) } let(:admin) { FactoryGirl.create(:exhibit_admin, exhibit: exhibit) } before { login_as admin } it 'does not have a search results widget' do visit spotlight.edit_exhibit_home_page_path(exhibit) click_add_widget expect(page).to have_css("[data-type='solr_documents']", visible: true) expect(page).not_to have_css("[data-type='search_results']", visible: true) end it 'correctly saves a list widget' do visit spotlight.edit_exhibit_home_page_path(exhibit) click_add_widget expect(page).to have_css('button.st-block-controls__button') find("button[data-type='list']").click expect(page).to have_css('ul.st-list-block__list') expect(page).to have_css('li.st-list-block__item') expect(page).to have_css('*[contenteditable=true]') expect(page).to have_css('div.st-list-block__editor[contenteditable=true]', count: 1) first_element = page.all('div.st-list-block__editor[contenteditable=true]').first first_element.set('one') click_button 'Save changes' expect(page).to have_css('div.st__content-block--list ul li', count: 1) expect(page).to have_css('div.st__content-block--list ul li', text: 'on') end end
Version data entries
11 entries across 11 versions & 1 rubygems