Skip to content

Commit

Permalink
Add a spec for #3539
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed Jul 17, 2022
1 parent db4da78 commit 183e93b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/integration/fields/ck_editor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,19 @@
expect { visit new_path(model_name: 'draft') }.not_to raise_error
is_expected.to have_selector('#cke_draft_notes')
end

it 'supports focusing on sub-modals', js: true do
RailsAdmin.config Comment do
edit do
field :content, :ck_editor
end
end
visit new_path(model_name: 'player')
find_link('Add a new Comment').trigger 'click'
expect(page).to have_text 'New Comment'
find('.cke_button__link').click
expect(page).to have_css '.cke_dialog_ui_input_text'
first(:css, '.cke_dialog_ui_input_text').click
expect(page).to have_css '.cke_dialog_ui_input_text:focus'
end
end

0 comments on commit 183e93b

Please sign in to comment.