mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 00:01:40 +03:00
33 lines
907 B
TypeScript
33 lines
907 B
TypeScript
import { resolve } from 'node:path';
|
|
|
|
import { test } from '@affine-test/kit/playwright';
|
|
import {
|
|
clickNewPageButton,
|
|
waitForEditorLoad,
|
|
} from '@affine-test/kit/utils/page-logic';
|
|
import {
|
|
check8080Available,
|
|
setupProxyServer,
|
|
} from '@affine-test/kit/utils/proxy';
|
|
import { expect } from '@playwright/test';
|
|
|
|
const { switchToNext } = setupProxyServer(
|
|
test,
|
|
resolve(__dirname, '..', 'static')
|
|
);
|
|
|
|
test('init page', async ({ page, context }) => {
|
|
await check8080Available(context);
|
|
await page.goto('http://localhost:8081/');
|
|
await waitForEditorLoad(page);
|
|
await clickNewPageButton(page);
|
|
const locator = page.locator('v-line').nth(0);
|
|
await locator.fill('hello');
|
|
|
|
await switchToNext();
|
|
await page.waitForTimeout(1000);
|
|
await page.goto('http://localhost:8081/');
|
|
await waitForEditorLoad(page);
|
|
expect(await page.locator('v-line').nth(0).textContent()).toBe('hello');
|
|
});
|