Sha256: 68c5cfabb376a711b4266844941028a503816ba7b5b4203c0da85f34ecc8f94e
Contents?: true
Size: 1.12 KB
Versions: 29
Compression:
Stored size: 1.12 KB
Contents
require 'rails_helper' feature "Richtext editing", js: true do background do auth_as_user end scenario "Image toolbar available when controller support attachments" do visit new_admin_node_path(content_type: 'TextPage') wait_for_all_richtexts fill_in_richtext 'Text', with: "some text" expect(page).to have_css("a.cke_button__image") end scenario "Image toolbar unavailable when controller doesn't support attachments" do allow_any_instance_of(Admin::BooksController).to receive(:releaf_richtext_attachment_upload_url).and_return("") visit new_admin_book_path wait_for_all_richtexts fill_in_richtext "Summary", with: "some text" expect(page).to_not have_css("a.cke_button__image") end scenario "Test helper fills in correct value" do visit new_admin_node_path(content_type: 'TextPage') html = %Q[ <p class="xxx" id='yyy'> "HTML" 'content' </p> ] wait_for_all_richtexts fill_in_richtext 'Text', with: html content = evaluate_script('CKEDITOR.instances["resource_content_attributes_text_html"].getData();') expect(content).to match_html html end end
Version data entries
29 entries across 29 versions & 1 rubygems