[FIX] website_form: verify that both input and textarea select form
When Jabberwock was introduced in [1], forms were not selected anymore by clicking on the form fields. That behavior got fixed when Jabberwock was removed in [2] but this commit introducing a test about it was not attached to a task - and did not get merged at the time. Before this commit there was no test to verify if the form became selected when clicking on one of its input field or textarea. After this commit there is a test that makes sure that the form is selected when the user clicks on either an input field or a textarea. Also added the renaming of a field label followed by a blur to ensure it triggers all UI events. [1] https://github.com/odoo/odoo/commit/347f4413d1b1a2b1a6a9ecd6d9c20cf7f3ec5ff3 [2] https://github.com/odoo/odoo/commit/e5572c317a7775a58675ed73efc89b5c9f6c0c39 task-2729643 closes odoo/odoo#83379 X-original-commit: fe4000cd521b5e1426b9093f7671fa457ef45eb8 Signed-off-by: Romain Derie (rde) <rde@odoo.com> Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
This commit is contained in:
committed by
Romain Derie
parent
e0913197ac
commit
c313c100d5
@@ -98,7 +98,37 @@ odoo.define('website.tour.form_editor', function (require) {
|
||||
trigger: '#oe_snippets .oe_snippet:has(.s_website_form) .oe_snippet_thumbnail',
|
||||
run: 'drag_and_drop #wrap',
|
||||
}, {
|
||||
content: "Check dropped snippet and select it",
|
||||
content: "Select form by clicking on an input field",
|
||||
extra_trigger: '.s_website_form_field',
|
||||
trigger: 'section.s_website_form input',
|
||||
}, {
|
||||
content: "Verify that the form editor appeared",
|
||||
trigger: '.o_we_customize_panel .snippet-option-WebsiteFormEditor',
|
||||
run: () => null,
|
||||
}, {
|
||||
content: "Go back to blocks to unselect form",
|
||||
trigger: '.o_we_add_snippet_btn',
|
||||
}, {
|
||||
content: "Select form by clicking on a text area",
|
||||
extra_trigger: '.s_website_form_field',
|
||||
trigger: 'section.s_website_form textarea',
|
||||
}, {
|
||||
content: "Verify that the form editor appeared",
|
||||
trigger: '.o_we_customize_panel .snippet-option-WebsiteFormEditor',
|
||||
run: () => null,
|
||||
}, {
|
||||
content: "Rename the field label",
|
||||
trigger: 'we-input[data-set-label-text] input',
|
||||
run: "text Renamed",
|
||||
}, {
|
||||
content: "Leave the rename options",
|
||||
trigger: 'we-input[data-set-label-text] input',
|
||||
run: "text_blur",
|
||||
}, {
|
||||
content: "Go back to blocks to unselect form",
|
||||
trigger: '.o_we_add_snippet_btn',
|
||||
}, {
|
||||
content: "Select form itself (not a specific field)",
|
||||
extra_trigger: '.s_website_form_field',
|
||||
trigger: 'section.s_website_form',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user