This commit refactors discuss code to use OWL components and new tools and services in web/. Functionally, Discuss app should work relatively the same as before this commit. closes https://github.com/odoo/odoo/pull/110188 Related: https://github.com/odoo/enterprise/pull/38058 https://github.com/odoo/upgrade/pull/4423 closes odoo/odoo#110188 Related: odoo/upgrade#4423 Related: odoo/enterprise#38058 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Co-authored-by: Alexandre (aku) <aku@odoo.com> Co-authored-by: Didier (did) <did@odoo.com> Co-authored-by: Géry (ged) <ged@odoo.com> Co-authored-by: Louis (wil) <wil@odoo.com> Co-authored-by: Maël (mapa) <mapa@odoo.com> Co-authored-by: Maryam (maki) <maki@odoo.com> Co-authored-by: Sébastien (seb) <seb@odoo.com> Co-authored-by: Thanh (tso) <tso@odoo.com> Co-authored-by: Matthieu (tsm) <tsm@odoo.com> Co-authored-by: Zelong (zel) <zel@odoo.com>
34 lines
1.4 KiB
JavaScript
34 lines
1.4 KiB
JavaScript
/** @odoo-module **/
|
|
|
|
import { start } from "@mail/../tests/helpers/test_utils";
|
|
|
|
QUnit.module("activity");
|
|
|
|
QUnit.test(
|
|
"horizontal scroll applies only to the content, not to the whole controller",
|
|
async (assert) => {
|
|
const { openView } = await start();
|
|
await openView({
|
|
res_model: "mail.test.activity",
|
|
views: [[false, "activity"]],
|
|
});
|
|
const o_view_controller = document.querySelector(".o_view_controller");
|
|
const o_content = o_view_controller.querySelector(".o_content");
|
|
const o_cp_item = o_view_controller.querySelector(
|
|
".o_control_panel .breadcrumb-item.active"
|
|
);
|
|
const initialXCpItem = o_cp_item.getBoundingClientRect().x;
|
|
const o_header_cell = o_content.querySelector(".o_activity_type_cell");
|
|
const initialXHeaderCell = o_header_cell.getBoundingClientRect().x;
|
|
assert.hasClass(o_view_controller, "o_action_delegate_scroll");
|
|
assert.strictEqual(window.getComputedStyle(o_view_controller).overflow, "hidden");
|
|
assert.strictEqual(window.getComputedStyle(o_content).overflow, "auto");
|
|
assert.strictEqual(o_content.scrollLeft, 0);
|
|
|
|
o_content.scrollLeft = 100;
|
|
assert.strictEqual(o_content.scrollLeft, 100);
|
|
assert.ok(o_header_cell.getBoundingClientRect().x < initialXHeaderCell);
|
|
assert.strictEqual(o_cp_item.getBoundingClientRect().x, initialXCpItem);
|
|
}
|
|
);
|