Skip to content

Commit a4b57d2

Browse files
jum-odookmagusiak
authored andcommitted
[FIX] *: fix ignored failed tests
Due to a commit in the same PR restoring error catching in Hoot, this commit fixes tests that have been ignored by the CI. closes odoo#229241 X-original-commit: 6ebb1b7 Related: odoo/enterprise#95882 Signed-off-by: Michaël Mattiello (mcm) <[email protected]> Signed-off-by: Julien Mougenot (jum) <[email protected]>
1 parent 3d75dac commit a4b57d2

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

addons/crm_livechat/__manifest__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@
3333
"im_livechat.assets_livechat_support_tours": [
3434
"crm_livechat/static/tests/tours/support/*",
3535
],
36+
'im_livechat.embed_assets_unit_tests_setup': [
37+
('remove', 'crm_livechat/static/src/core/web/**/*'),
38+
],
3639
},
3740
}

addons/website/static/tests/builder/options/spacing_option.test.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { expect, test } from "@odoo/hoot";
2-
import { Deferred, edit, queryFirst } from "@odoo/hoot-dom";
2+
import { edit, manuallyDispatchProgrammaticEvent, queryOne } from "@odoo/hoot-dom";
33
import { contains, onRpc } from "@web/../tests/web_test_helpers";
4-
import { defineWebsiteModels, setupWebsiteBuilderWithSnippet } from "@website/../tests/builder/website_helpers";
4+
import {
5+
defineWebsiteModels,
6+
setupWebsiteBuilderWithSnippet,
7+
} from "@website/../tests/builder/website_helpers";
58

69
defineWebsiteModels();
710

@@ -25,12 +28,16 @@ test("Using the 'Spacing (Y, X)' option should display a grid preview", async ()
2528
await contains(":iframe .s_banner").click();
2629
await contains("[data-label='Spacing (Y, X)'] input").click();
2730
await edit(20);
28-
const def = new Deferred();
2931
expect(":iframe .o_we_grid_preview").toHaveCount(1);
30-
queryFirst(":iframe .o_we_grid_preview").addEventListener("animationend", () => {
31-
def.resolve();
32+
33+
const cell = queryOne(":iframe .o_we_grid_preview .o_we_cell");
34+
expect(cell).toHaveStyle({
35+
"animation-name": "gridPreview",
3236
});
33-
await def;
37+
// 'animationend' event is manually dispatched to speed up the test since the
38+
// actual animation takes 2 seconds.
39+
await manuallyDispatchProgrammaticEvent(cell, "animationend");
40+
3441
expect(":iframe .o_we_grid_preview").toHaveCount(0);
3542
});
3643

0 commit comments

Comments
 (0)