test: add hover behavior before cancel favorite

This commit is contained in:
tzhangchi
2022-12-27 15:17:19 +08:00
parent 8933ad45e2
commit 3ae0d1a6e0
+8
View File
@@ -103,7 +103,15 @@ test.describe('Local first favorite page', () => {
).not.toBeUndefined();
// cancel favorite
await page.getByRole('link', { name: 'All pages' }).click();
const box = await page
.getByRole('cell', { name: 'this is a new page to favorite' })
.boundingBox();
//hover table record
await page.mouse.move((box?.x ?? 0) + 10, (box?.y ?? 0) + 10);
await page.getByTestId('favourited-icon').click();
// expect it not in favorite list