[PATCH] Upstream patch - 17062022

This commit is contained in:
Parthiv Patel committed 2022-06-17 08:34:44 +00:00
1 parent 8ce51106dc
commit 1e956479f7
36 files changed
+389 -71

No files matched your search

@@ -79,3 +79,8 @@
}
}
}
.o_graph_measures_list {
max-height: calc(100vh - #{$o-navbar-height} - 100px);
overflow-y: auto;
}
@@ -102,3 +102,8 @@
cursor: default;
}
}
.o_pivot_measures_list {
max-height: calc(100vh - #{$o-navbar-height} - 100px);
overflow-y: auto;
}
@@ -27,6 +27,30 @@ flectra.define('web.test_utils', async function (require) {
const testUtilsPivot = require('web.test_utils_pivot');
const tools = require('web.tools');
QUnit.begin(() => {
// alt attribute causes issues with scroll tests. Indeed, alt is
// displayed between the time we scroll to the bottom of a thread
// and the time we assert for the scroll position. The src
// attribute is removed as well to make sure images won't
// trigger a GET request on the server.
function replaceAttr(attrName, prefix, element) {
const attrKey = `${prefix}${attrName}`;
const attrValue = element.getAttribute(attrKey);
element.removeAttribute(attrKey);
element.setAttribute(`${prefix}data-${attrName}`, attrValue);
}
const attrsToRemove = ['alt', 'src'];
const attrPrefixes = ['', 't-att-', 't-attf-'];
const templates = new DOMParser().parseFromString(session.owlTemplates, "text/xml");
for (const attrName of attrsToRemove) {
for (const prefix of attrPrefixes) {
for (const element of templates.querySelectorAll(`*[${prefix}${attrName}]`)) {
replaceAttr(attrName, prefix, element);
}
}
}
session.owlTemplates = templates.documentElement.outerHTML;
});
function deprecated(fn, type) {
const msg = `Helper 'testUtils.${fn.name}' is deprecated. ` +