init: sudah ganti logo, hilangin setting, dan investigational use dialog

This commit is contained in:
one
2025-03-06 11:32:45 +07:00
commit 8f31d4ed41
2857 changed files with 355646 additions and 0 deletions

25
tests/utils/mouseUtils.ts Normal file
View File

@@ -0,0 +1,25 @@
import { Page } from "@playwright/test";
interface WindowWithMousePosition extends Window {
mouseX: number;
mouseY: number;
}
export const initilizeMousePositionTracker = async (page: Page) => {
const window = await page.evaluateHandle("window") as any;
await page.evaluate((window: WindowWithMousePosition) => {
window.mouseX = 0;
window.mouseY = 0;
window.addEventListener("mousemove", (event) => {
window.mouseX = event.clientX;
window.mouseY = event.clientY;
});
}, window);
}
export const getMousePosition = async (page: Page) => {
const window = await page.evaluateHandle("window") as any;
return await page.evaluate((window: WindowWithMousePosition) => {
return { x: window.mouseX, y: window.mouseY };
}, window);
}