Skip to content

Commit 8846789

Browse files
committed
Add a spec for #3539
1 parent 0f5bfa3 commit 8846789

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

spec/integration/fields/ck_editor_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,19 @@
1414
expect { visit new_path(model_name: 'draft') }.not_to raise_error
1515
is_expected.to have_selector('#cke_draft_notes')
1616
end
17+
18+
it 'supports focusing on sub-modals', js: true do
19+
RailsAdmin.config Comment do
20+
edit do
21+
field :content, :ck_editor
22+
end
23+
end
24+
visit new_path(model_name: 'player')
25+
find_link('Add a new Comment').trigger 'click'
26+
expect(page).to have_text 'New Comment'
27+
find('.cke_button__link').click
28+
expect(page).to have_css '.cke_dialog_ui_input_text'
29+
first(:css, '.cke_dialog_ui_input_text').click
30+
expect(page).to have_css '.cke_dialog_ui_input_text:focus'
31+
end
1732
end

0 commit comments

Comments
 (0)