diff options
| author | Aurélien Warnon <awa@odoo.com> | 2020-10-30 08:19:46 +0000 |
|---|---|---|
| committer | Aurélien Warnon <awa@odoo.com> | 2020-11-16 09:34:32 +0000 |
| commit | 06d2b067e56ef7fde5e5ad21e99d868ea5914adb (patch) | |
| tree | 20bb46a2e1548495c7da7c452ba4cf204c224e07 /addons/web/static/tests | |
| parent | f7795f85ed66fcebaf8a96bf4e550b069fcf1e83 (diff) | |
[FIX] web: improve the hit box of the kanban quick_create
When the user clicks outside of the kanban quick create element, it's closing
itself automatically.
However, the "hit box" of this behavior is not entirely accurate and clicking
on the very edge of the box would also close the element.
This commit fixes the click behavior and allows clicking anywhere inside the
quick create element.
Task 2373095
closes odoo/odoo#61761
X-original-commit: 72ed82489daa2b82628dfdefeb06262e17e6548e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/tests')
| -rw-r--r-- | addons/web/static/tests/views/kanban_tests.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/addons/web/static/tests/views/kanban_tests.js b/addons/web/static/tests/views/kanban_tests.js index 70e63d34eda..d483bdc8418 100644 --- a/addons/web/static/tests/views/kanban_tests.js +++ b/addons/web/static/tests/views/kanban_tests.js @@ -1405,7 +1405,7 @@ QUnit.module('Views', { }); QUnit.test('quick create record: cancel when not dirty', async function (assert) { - assert.expect(9); + assert.expect(11); var kanban = await createView({ View: KanbanView, @@ -1464,6 +1464,17 @@ QUnit.module('Views', { assert.containsOnce(kanban, '.o_kanban_group:first .o_kanban_record', "first column should still contain one record"); + // click to reopen the quick create + await testUtils.dom.click(kanban.$('.o_kanban_header .o_kanban_quick_add i').first()); + assert.containsOnce(kanban, '.o_kanban_quick_create', + "should have open the quick create widget"); + + // clicking on the quick create itself should keep it open + await testUtils.dom.click(kanban.$('.o_kanban_quick_create')); + assert.containsOnce(kanban, '.o_kanban_quick_create', + "the quick create should not have been destroyed when clicked on itself"); + + kanban.destroy(); }); |
