summaryrefslogtreecommitdiff
path: root/addons/web/tests
diff options
context:
space:
mode:
authorJulien Mougenot <jum@odoo.com>2020-03-18 11:21:27 +0000
committerJulien Mougenot <jum@odoo.com>2020-03-18 12:33:02 +0000
commit71af8ee4f831afc08910f459548fd6a95a81ed73 (patch)
treece028030c4787d86b3dfcacc21a1785086cb94ce /addons/web/tests
parentad986ee0db30922a9c74ad5f874686cca701bbb5 (diff)
[FIX] web: update clickAll test helpers
Before this commit and following the refactoring of the home menu and the control panel to the Owl framework, some of the helpers of the 'clickEverywhere' test have not been properly updated to the new classes/behaviours. Now the selectors target the right elements and some actions that were previously synchronous are now properly awaited (home menu toggling, filter menu interactions, etc.). Also slightly changed the behaviour of the clickAll functions: - requesting a click on a null element will make the test crash (added some conditions to avoid this in a standard flow). - any error crashing the test at a deeper level will be displayed in the console - an animation frame is awaited after clicking on an element. This is to comply with the Owl rendering system. closes odoo/odoo#47762 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/tests')
-rw-r--r--addons/web/tests/test_click_everywhere.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/tests/test_click_everywhere.py b/addons/web/tests/test_click_everywhere.py
index 18c7431339e..92b2ad3c92d 100644
--- a/addons/web/tests/test_click_everywhere.py
+++ b/addons/web/tests/test_click_everywhere.py
@@ -14,7 +14,7 @@ class TestMenusAdmin(odoo.tests.HttpCase):
for app in menus['children']:
with self.subTest(app=app['name']):
_logger.runbot('Testing %s', app['name'])
- self.browser_js("/web", "odoo.__DEBUG__.services['web.clickEverywhere'](%d);" % app['id'], "odoo.isReady === true", login="admin", timeout=300)
+ self.browser_js("/web", "odoo.__DEBUG__.services['web.clickEverywhere']('%s');" % app['xmlid'], "odoo.isReady === true", login="admin", timeout=300)
self.terminate_browser()
@@ -26,7 +26,7 @@ class TestMenusDemo(odoo.tests.HttpCase):
for app in menus['children']:
with self.subTest(app=app['name']):
_logger.runbot('Testing %s', app['name'])
- self.browser_js("/web", "odoo.__DEBUG__.services['web.clickEverywhere'](%d);" % app['id'], "odoo.isReady === true", login="demo", timeout=300)
+ self.browser_js("/web", "odoo.__DEBUG__.services['web.clickEverywhere']('%s');" % app['xmlid'], "odoo.isReady === true", login="demo", timeout=300)
self.terminate_browser()
@odoo.tests.tagged('post_install', '-at_install')