import { describe, expect, test } from "@odoo/hoot"; import { animationFrame, click, queryOne } from "@odoo/hoot-dom"; import { defineStyle } from "@web/../tests/web_test_helpers"; import { setupInteractionWhiteList, startInteractions } from "@web/../tests/public/helpers"; setupInteractionWhiteList(["website_sale.carousel_product"]); describe.current.tags("interaction_dev"); test("scroll miniatures", async () => { defineStyle(/* css */`li { min-width: 64px !important; }`); const { core } = await startInteractions(`
`); expect(core.interactions).toHaveLength(1); const olEl = queryOne(".carousel-indicators"); expect(olEl.style.transform).toBe(""); await click(`[data-bs-slide-to="15"]`); await animationFrame(); expect(olEl.style.transform).toMatch(/translate3d(.*px, 0px, 0px)/); });