The clickbot click default timeout was increased in #98495, but missed the fact that the default was overridden for the "Settings" menu to a lower value. With this commit, the "Settings" exception is completely removed as the default timeout is higher. Also, checking that the text contains "Settings" was a bit weak. While at it, the timeout for the global testing of an app is also increased to 10 minutes instead of 5 as this limit is reached by the Field Service app. closes odoo/odoo#98617 X-original-commit: 0247e6f4abef4121b451c1373ae3c1ce184451c0 Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
44 lines
2.1 KiB
Python
44 lines
2.1 KiB
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
import logging
|
|
import odoo.tests
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
|
|
@odoo.tests.tagged('click_all', 'post_install', '-at_install', '-standard')
|
|
class TestMenusAdmin(odoo.tests.HttpCase):
|
|
allow_end_on_form = True
|
|
def test_01_click_everywhere_as_admin(self):
|
|
menus = self.env['ir.ui.menu'].load_menus(False)
|
|
for app_id in menus['root']['children']:
|
|
with self.subTest(app=menus[app_id]['name']):
|
|
_logger.runbot('Testing %s', menus[app_id]['name'])
|
|
self.browser_js("/web", "odoo.__DEBUG__.services['web.clickEverywhere']('%s');" % menus[app_id]['xmlid'], "odoo.isReady === true", login="admin", timeout=600)
|
|
self.terminate_browser()
|
|
|
|
|
|
@odoo.tests.tagged('click_all', 'post_install', '-at_install', '-standard')
|
|
class TestMenusDemo(odoo.tests.HttpCase):
|
|
allow_end_on_form = True
|
|
def test_01_click_everywhere_as_demo(self):
|
|
user_demo = self.env.ref("base.user_demo")
|
|
menus = self.env['ir.ui.menu'].with_user(user_demo.id).load_menus(False)
|
|
for app_id in menus['root']['children']:
|
|
with self.subTest(app=menus[app_id]['name']):
|
|
_logger.runbot('Testing %s', menus[app_id]['name'])
|
|
self.browser_js("/web", "odoo.__DEBUG__.services['web.clickEverywhere']('%s');" % menus[app_id]['xmlid'], "odoo.isReady === true", login="demo", timeout=600)
|
|
self.terminate_browser()
|
|
|
|
@odoo.tests.tagged('post_install', '-at_install')
|
|
class TestMenusAdminLight(odoo.tests.HttpCase):
|
|
allow_end_on_form = True
|
|
def test_01_click_apps_menus_as_admin(self):
|
|
self.browser_js("/web", "odoo.__DEBUG__.services['web.clickEverywhere'](undefined, true);", "odoo.isReady === true", login="admin", timeout=120)
|
|
|
|
@odoo.tests.tagged('post_install', '-at_install',)
|
|
class TestMenusDemoLight(odoo.tests.HttpCase):
|
|
allow_end_on_form = True
|
|
def test_01_click_apps_menus_as_demo(self):
|
|
self.browser_js("/web", "odoo.__DEBUG__.services['web.clickEverywhere'](undefined, true);", "odoo.isReady === true", login="demo", timeout=120)
|