mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
build: unify build flags (#2891)
This commit is contained in:
@@ -4,7 +4,9 @@ import { test } from '@playwright/test';
|
||||
|
||||
test('init page', async ({ page }) => {
|
||||
await page.goto('http://localhost:8081/');
|
||||
await page.waitForSelector('v-line');
|
||||
await page.waitForSelector('v-line', {
|
||||
timeout: 10000,
|
||||
});
|
||||
|
||||
const currentWorkspaceId: string = await page.evaluate(
|
||||
() => (globalThis.currentWorkspace as any).id
|
||||
|
||||
@@ -15,9 +15,11 @@ test('drag a page from "All pages" list onto the "Trash" folder in the sidebar t
|
||||
await page.getByText('All Pages').click();
|
||||
}
|
||||
|
||||
const title = 'AFFiNE - not just a note taking app';
|
||||
|
||||
// Drag-and-drop
|
||||
// Ref: https://playwright.dev/docs/input#dragging-manually
|
||||
await page.getByText('Untitled').hover();
|
||||
await page.getByText(title).hover();
|
||||
await page.mouse.down();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText('Trash').hover();
|
||||
@@ -29,7 +31,7 @@ test('drag a page from "All pages" list onto the "Trash" folder in the sidebar t
|
||||
).toBeVisible();
|
||||
|
||||
await expect(
|
||||
page.getByText('Untitled'),
|
||||
page.getByText(title),
|
||||
'The deleted post is no longer on the All Page list'
|
||||
).toHaveCount(0);
|
||||
|
||||
@@ -37,7 +39,7 @@ test('drag a page from "All pages" list onto the "Trash" folder in the sidebar t
|
||||
// Visit trash page via url
|
||||
await page.getByText('Trash', { exact: true }).click();
|
||||
await expect(
|
||||
page.getByText('Untitled'),
|
||||
page.getByText(title),
|
||||
'The deleted post exists in the Trash list'
|
||||
).toHaveCount(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user