summaryrefslogtreecommitdiff
path: root/addons/website/static/tests
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2020-03-05 11:44:00 +0000
committerqsm-odoo <qsm@odoo.com>2020-03-07 12:16:12 +0000
commit8066001ee4e1e38805f4b3564fcfae411e4856ea (patch)
tree9e73f7f22e44f6e03fd7c5e9d9e71a1177cd4126 /addons/website/static/tests
parent05d17089c4a604cb49f1a263b68f39aeffecccda (diff)
[FIX] website: add test for 5ac269d722f
5ac269d722f fixed 7e2b0ebe799 that prevented the website menu to actually be visible, since the JS in charge of displaying the menu was 'crashing'. A test was missing to avoid that issue to appear ever again, since it is quite a critical problem. Note that it might look strange that breaking such a mechanism does not make the runbot red, but since the menus are actually considered visible, the tests are able to 'see' it in DOM and click on it. They are actually hidden through an opacity 0 & height 0 while the JS process them. task-2093679 closes odoo/odoo#47138 X-original-commit: 0dc00a252dfe7fee658579a60dc7b1b1ca71a661 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/tests')
-rw-r--r--addons/website/static/tests/tours/website_navbar_menu.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/addons/website/static/tests/tours/website_navbar_menu.js b/addons/website/static/tests/tours/website_navbar_menu.js
new file mode 100644
index 00000000000..e3523f69076
--- /dev/null
+++ b/addons/website/static/tests/tours/website_navbar_menu.js
@@ -0,0 +1,20 @@
+odoo.define("website.tour.website_navbar_menu", function (require) {
+"use strict";
+
+var tour = require("web_tour.tour");
+
+tour.register("website_navbar_menu", {
+ test: true,
+ url: "/",
+}, [
+ {
+ content: "Ensure menus are in DOM",
+ trigger: '#top_menu .nav-item a:contains("Test Tour Menu")',
+ run: function () {}, // it's a check
+ }, {
+ content: "Ensure menus loading is done (so they are actually visible)",
+ trigger: 'body:not(:has(.o_menu_loading))',
+ run: function () {}, // it's a check
+ }
+]);
+});