Sha256: 2f32104cb085e21419cbe5af7b866615144aba6d91c1508cd33f24309e2d4a75

Contents?: true

Size: 979 Bytes

Versions: 32

Compression:

Stored size: 979 Bytes

Contents

require 'rails_helper'
feature "Richtext embed", js: true do
  background do
    # preload ActsAsNode classes
    Rails.application.eager_load!
    auth_as_user
  end

  scenario "Add embed to richtext" do
    visit new_admin_node_path(content_type: 'HomePage')
    fill_in("Name", with: "Embed test")
    select('en', from: 'Locale')

    status_script = 'CKEDITOR.instances["resource_content_attributes_intro_text_html"].status=="ready"'
    expect { page.evaluate_script(status_script) }.to become_true

    find(".cke_toolbox a[title='Embed Media']").click
    expect(page).to have_css(".cke_dialog_title", text: "Embed Media")

    fill_in "Paste Embed Code Here", with: '<iframe src="500.html" />'
    click_link "OK"

    expect(page).to have_css(".cke_editor_resource_content_attributes_intro_text_html") # wait focus switch finished
    save_and_check_response "Create succeeded"

    visit "/embed-test"
    expect(page).to have_css("iframe[src='500.html']")
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
releaf-core-2.0.0 spec/features/richtext_embed_spec.rb
releaf-core-1.1.22 spec/features/richtext_embed_spec.rb
releaf-core-1.1.21 spec/features/richtext_embed_spec.rb
releaf-core-1.1.20 spec/features/richtext_embed_spec.rb
releaf-core-1.1.19 spec/features/richtext_embed_spec.rb
releaf-core-1.1.18 spec/features/richtext_embed_spec.rb
releaf-core-1.1.17 spec/features/richtext_embed_spec.rb
releaf-core-1.1.16 spec/features/richtext_embed_spec.rb
releaf-core-1.1.15 spec/features/richtext_embed_spec.rb
releaf-core-1.1.14 spec/features/richtext_embed_spec.rb
releaf-core-1.1.13 spec/features/richtext_embed_spec.rb
releaf-core-1.1.12 spec/features/richtext_embed_spec.rb
releaf-core-1.1.11 spec/features/richtext_embed_spec.rb
releaf-core-1.1.10 spec/features/richtext_embed_spec.rb
releaf-core-1.1.9 spec/features/richtext_embed_spec.rb
releaf-core-1.1.8 spec/features/richtext_embed_spec.rb
releaf-core-1.1.7 spec/features/richtext_embed_spec.rb
releaf-core-1.1.6 spec/features/richtext_embed_spec.rb
releaf-core-1.1.5 spec/features/richtext_embed_spec.rb
releaf-core-1.1.4 spec/features/richtext_embed_spec.rb