summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorChristophe Monniez <moc@odoo.com>2020-04-21 08:00:18 +0000
committerChristophe Monniez <moc@odoo.com>2020-04-22 06:45:42 +0000
commitcc871698fada79c63c5c90293fed00b819ee0269 (patch)
tree8644b142789840ca34d50f8a89904307426cfeda /addons/web/static/src
parent5a4a779faf58f1a733e30a9c2c07d2112ec680f5 (diff)
[FIX] web: improve click_everywhere timeout message
When an element is clicked during the test and a tiemout occurs, message that appears in Odoo logs is not really clear. closes odoo/odoo#49907 X-original-commit: 0e1545c52fdca6d311a18533d3d4efed984df329 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/tools/test_menus.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/web/static/src/js/tools/test_menus.js b/addons/web/static/src/js/tools/test_menus.js
index b5ffdf0967d..c9c88449ff5 100644
--- a/addons/web/static/src/js/tools/test_menus.js
+++ b/addons/web/static/src/js/tools/test_menus.js
@@ -126,7 +126,8 @@
*/
async function testMenuItem(element){
if (testedMenus.indexOf(element.dataset.menuXmlid) >= 0) return Promise.resolve(); // Avoid infinite loop
- console.log("Testing menu", element.innerText.trim(), " ", element.dataset.menuXmlid);
+ var menuDescription = element.innerText.trim() + " " + element.dataset.menuXmlid;
+ console.log("Testing menu", menuDescription);
testedMenus.push(element.dataset.menuXmlid);
if (blackListedMenus.includes(element.dataset.menuXmlid)) return Promise.resolve(); // Skip black listed menus
var startActionCount = clientActionCount;
@@ -154,7 +155,7 @@
return testViews();
}
}).catch(function (err) {
- console.error("Error while testing", element);
+ console.error("Error while testing", menuDescription);
return Promise.reject(err);
});
};
@@ -242,7 +243,7 @@
// recursive call until the resolve or the timeout
setTimeout(checkCondition, interval);
} else {
- console.error("Timeout exceeded", stopCondition);
+ console.error('Timeout, the clicked element took more than 5 seconds to load');
reject();
}
}