summaryrefslogtreecommitdiff
path: root/addons/web/tests
diff options
context:
space:
mode:
authorChristophe Monniez <moc@odoo.com>2018-07-04 16:32:05 +0200
committerChristophe Monniez <moc@odoo.com>2018-08-29 16:57:27 +0200
commit3f0ebca1924afb538c6f7960a42aba725654c643 (patch)
tree1bcdb20706658bdde4487c38abad1d4b5204c5bc /addons/web/tests
parent19cc218d03c9e2eb32ce354db96668b4c5280854 (diff)
[IMP] web: New test to test Odoo menus
This commit adds a new js test in web that enters each app and click on each view switcher, each menu and each search filter. This test is tagged '-standard' and 'click_all' as it could last a long time, that way it's not executed by default. It could also be started from the browser console with 'clickEverywhere();'.
Diffstat (limited to 'addons/web/tests')
-rw-r--r--addons/web/tests/__init__.py1
-rw-r--r--addons/web/tests/test_click_everywhere.py17
2 files changed, 18 insertions, 0 deletions
diff --git a/addons/web/tests/__init__.py b/addons/web/tests/__init__.py
index 582c61fcaef..ffa03b739d9 100644
--- a/addons/web/tests/__init__.py
+++ b/addons/web/tests/__init__.py
@@ -4,3 +4,4 @@
from . import test_js
from . import test_menu
from . import test_serving_base
+from . import test_click_everywhere
diff --git a/addons/web/tests/test_click_everywhere.py b/addons/web/tests/test_click_everywhere.py
new file mode 100644
index 00000000000..1e79104c30f
--- /dev/null
+++ b/addons/web/tests/test_click_everywhere.py
@@ -0,0 +1,17 @@
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+import odoo.tests
+
+
+@odoo.tests.tagged('click_all', 'post_install', '-at_install', '-standard')
+class TestMenusAdmin(odoo.tests.HttpCase):
+
+ def test_01_click_everywhere_as_admin(self):
+ self.browser_js("/web", "odoo.__DEBUG__.services['web.clickEverywhere']();", "'web.clickEverywhere' in odoo.__DEBUG__.services", login="admin", timeout=1800)
+
+
+@odoo.tests.tagged('click_all', 'post_install', '-at_install', '-standard')
+class TestMenusDemo(odoo.tests.HttpCase):
+
+ def test_01_click_everywhere_as_demo(self):
+ self.browser_js("/web", "odoo.__DEBUG__.services['web.clickEverywhere']();", "'web.clickEverywhere' in odoo.__DEBUG__.services", login="demo", timeout=1800)