mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
test: open public workspace (#1736)
This commit is contained in:
@@ -8,14 +8,14 @@ import { createFakeUser, loginUser, openHomePage } from '../../libs/utils';
|
||||
import { createWorkspace } from '../../libs/workspace';
|
||||
|
||||
test.describe('affine public workspace', () => {
|
||||
test('enable public workspace', async ({ page }) => {
|
||||
test('enable public workspace', async ({ page, context }) => {
|
||||
await openHomePage(page);
|
||||
await waitMarkdownImported(page);
|
||||
const [a] = await createFakeUser();
|
||||
await loginUser(page, a);
|
||||
const name = `test-${Date.now()}`;
|
||||
await createWorkspace({ name }, page);
|
||||
await page.waitForTimeout(50);
|
||||
await waitMarkdownImported(page);
|
||||
await clickSideBarSettingButton(page);
|
||||
await page.waitForTimeout(50);
|
||||
await clickPublishPanel(page);
|
||||
@@ -32,5 +32,9 @@ test.describe('affine public workspace', () => {
|
||||
expect(url.startsWith('http://localhost:8080/public-workspace/')).toBe(
|
||||
true
|
||||
);
|
||||
const page2 = await context.newPage();
|
||||
await page2.goto(url);
|
||||
await page2.waitForSelector('thead');
|
||||
await page2.getByText('Welcome to AFFiNE').click();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user