Files
odoo_source/addons/website/static/tests/tours/website_navbar_menu.js
T
Romain Derie 8066001ee4 [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>
2020-03-07 12:16:12 +00:00

21 lines
560 B
JavaScript

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
}
]);
});