mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-24 13:17:10 +08:00
test: make the test of change-page-mode more stable
This commit is contained in:
@@ -11,10 +11,12 @@ test.describe('Change page mode(Paper or Edgeless)', () => {
|
|||||||
|
|
||||||
// mouse hover trigger animation for showing full switcher
|
// mouse hover trigger animation for showing full switcher
|
||||||
await page.mouse.move((box?.x ?? 0) + 5, (box?.y ?? 0) + 5);
|
await page.mouse.move((box?.x ?? 0) + 5, (box?.y ?? 0) + 5);
|
||||||
|
await page.waitForTimeout(500);
|
||||||
const edgelessButton = page.locator(
|
const edgelessButton = page
|
||||||
'[data-testid=editor-mode-switcher] [title=Edgeless]'
|
.getByTestId('editor-mode-switcher')
|
||||||
);
|
.locator('div')
|
||||||
|
.filter({ hasText: 'Edgeless' })
|
||||||
|
.first(); // page.getByText('Edgeless').click()
|
||||||
await edgelessButton.click();
|
await edgelessButton.click();
|
||||||
|
|
||||||
// // mouse move to edgeless button
|
// // mouse move to edgeless button
|
||||||
|
|||||||
Reference in New Issue
Block a user