diff options
| author | Julien Mougenot <jum@odoo.com> | 2020-06-09 15:35:11 +0000 |
|---|---|---|
| committer | Julien Mougenot <jum@odoo.com> | 2020-06-10 13:08:33 +0000 |
| commit | a392da16015c69161814e83f1cde5ddf40782505 (patch) | |
| tree | 26696078cdce166aa8d619db83d9ea06eb8032e5 /addons/web/static/tests/helpers/test_utils.js | |
| parent | a425c58d99d4c03aeddb53ea38a8304968336379 (diff) | |
[IMP] web: add 'Create and edit' test helper
Accessing the "Create and edit" option can be bothersome when testing:
- you must click on the m2o dropdown to open it
- input a value
- click on the "Create and edit" m2o item
Now, a helper exists to compile all these tasks into a single helper:
the many2one 'createAndEdit' function.
Usage:
`await testUtils.fields.many2one.createAndEdit('m2o_field', "ABC");`
Diffstat (limited to 'addons/web/static/tests/helpers/test_utils.js')
| -rw-r--r-- | addons/web/static/tests/helpers/test_utils.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/tests/helpers/test_utils.js b/addons/web/static/tests/helpers/test_utils.js index 8789ea53adc..f6114b84fcd 100644 --- a/addons/web/static/tests/helpers/test_utils.js +++ b/addons/web/static/tests/helpers/test_utils.js @@ -212,6 +212,7 @@ odoo.define('web.test_utils', async function (require) { }, fields: { many2one: { + createAndEdit: testUtilsFields.clickM2OCreateAndEdit, clickOpenDropdown: testUtilsFields.clickOpenM2ODropdown, clickHighlightedItem: testUtilsFields.clickM2OHighlightedItem, clickItem: testUtilsFields.clickM2OItem, |
