File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 3838 end
3939
4040 form do |f |
41+ toolbar = %w[ bold italic underline link ]
4142 f . inputs 'Post' do
4243 f . input :author
4344 f . input :title
44- f . input :description , as : :quill_editor
45+ f . input :description , as : :quill_editor , input_html : { data : { options : { modules : { toolbar : toolbar } } } }
4546 f . input :category
4647 f . input :dt
4748 f . input :position
Original file line number Diff line number Diff line change 1717 it 'updates some HTML content' do
1818 visit "/admin/posts/#{ post . id } /edit"
1919
20+ %w[ bold italic underline link ] . each do |button |
21+ expect ( page ) . to have_css ( ".ql-toolbar button.ql-#{ button } " )
22+ end
23+ expect ( page ) . to have_css ( '#post_description[data-aa-quill-editor]' )
2024 expect ( page ) . to have_css ( '#post_description_input .ql-editor' , text : 'Some content...' )
2125 find ( '#post_description_input .ql-editor' ) . click
2226 find ( '#post_description_input .ql-editor' ) . base . send_keys ( 'more text' )
You can’t perform that action at this time.
0 commit comments