Skip to content
Snippets Groups Projects
Commit 8776ee08 authored by Christophe Monniez's avatar Christophe Monniez
Browse files

[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#49827

Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
parent 7dca239a
No related branches found
No related tags found
No related merge requests found
......@@ -120,7 +120,8 @@
*/
function testMenuItem(element){
if (testedMenus.indexOf(element.dataset.menuXmlid) >= 0) return $.Deferred().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);
var startActionCount = clientActionCount;
element.click();
......@@ -143,7 +144,7 @@
return testViews();
}
}).fail(function() {
console.error("Error while testing", element);
console.error("Error while testing", menuDescription);
});
};
......@@ -246,7 +247,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 15 seconds to load');
def.reject();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment