Sha256: 41c7390ff65377e37a319467be46d06dac8e2d89640f1b13b0aebd51524b5300

Contents?: true

Size: 1.03 KB

Versions: 25

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

require 'e2e/spec_helper'

RSpec.describe 'CKEditor5 Context Integration', type: :feature, js: true do
  before { visit 'context' }

  it 'initializes context with multiple editors' do
    expect(page).to have_css('.ck-editor__editable', count: 2, wait: 10)
  end

  it 'initializes the magic context plugin' do
    eventually do
      plugin_exists = page.evaluate_script('window.MagicContextPlugin !== undefined')
      expect(plugin_exists).to be true
    end
  end

  it 'allows editing content in context editors' do
    editors = all('.ck-editor__editable')

    # Test first editor
    editors[0].click
    editors[0].send_keys([[:control, 'a'], :backspace])
    editors[0].send_keys('Modified Context Item 1')

    # Test second editor
    editors[1].click
    editors[1].send_keys([[:control, 'a'], :backspace])
    editors[1].send_keys('Modified Context Item 2')

    # Verify content
    expect(editors[0].text).to eq('Modified Context Item 1')
    expect(editors[1].text).to eq('Modified Context Item 2')
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
ckeditor5-1.23.5 spec/e2e/features/context_spec.rb
ckeditor5-1.23.4 spec/e2e/features/context_spec.rb
ckeditor5-1.23.3 spec/e2e/features/context_spec.rb
ckeditor5-1.23.2 spec/e2e/features/context_spec.rb
ckeditor5-1.23.1 spec/e2e/features/context_spec.rb
ckeditor5-1.23.0 spec/e2e/features/context_spec.rb
ckeditor5-1.22.0 spec/e2e/features/context_spec.rb
ckeditor5-1.21.0 spec/e2e/features/context_spec.rb
ckeditor5-1.20.1 spec/e2e/features/context_spec.rb
ckeditor5-1.20.0 spec/e2e/features/context_spec.rb
ckeditor5-1.19.5 spec/e2e/features/context_spec.rb
ckeditor5-1.19.4 spec/e2e/features/context_spec.rb
ckeditor5-1.19.3 spec/e2e/features/context_spec.rb
ckeditor5-1.19.2 spec/e2e/features/context_spec.rb
ckeditor5-1.19.1 spec/e2e/features/context_spec.rb
ckeditor5-1.19.0 spec/e2e/features/context_spec.rb
ckeditor5-1.18.3 spec/e2e/features/context_spec.rb
ckeditor5-1.18.1 spec/e2e/features/context_spec.rb
ckeditor5-1.18.0 spec/e2e/features/context_spec.rb
ckeditor5-1.17.4 spec/e2e/features/context_spec.rb