test: improve offset x and y

This commit is contained in:
tzhangchi
2022-12-24 23:17:13 +08:00
parent 45e28d3dad
commit 1824c69197
+1 -1
View File
@@ -19,7 +19,7 @@ test.describe('Open contact us', () => {
const faqIcon = page.locator('[data-testid=faq-icon]');
const box = await faqIcon.boundingBox();
await expect(box?.x).not.toBeUndefined();
await page.mouse.move((box?.x ?? 0) + 5, (box?.y ?? 0) + 5);
await page.mouse.move((box?.x ?? 0) + 10, (box?.y ?? 0) + 10);
const rightBottomContactUs = page.locator(
'[data-testid=right-bottom-contact-us-icon]'