mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 09:36:17 +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
|
||||
await page.mouse.move((box?.x ?? 0) + 5, (box?.y ?? 0) + 5);
|
||||
|
||||
const edgelessButton = page.locator(
|
||||
'[data-testid=editor-mode-switcher] [title=Edgeless]'
|
||||
);
|
||||
await page.waitForTimeout(500);
|
||||
const edgelessButton = page
|
||||
.getByTestId('editor-mode-switcher')
|
||||
.locator('div')
|
||||
.filter({ hasText: 'Edgeless' })
|
||||
.first(); // page.getByText('Edgeless').click()
|
||||
await edgelessButton.click();
|
||||
|
||||
// // mouse move to edgeless button
|
||||
|
||||
Reference in New Issue
Block a user