test: add workspace ref in e2e (#3217)

This commit is contained in:
Alex Yang
2023-07-13 20:41:46 +08:00
committed by GitHub
parent 64cf297399
commit d18df12951
18 changed files with 140 additions and 101 deletions

View File

@@ -5,10 +5,9 @@ import {
newPage,
waitEditorLoad,
} from '@affine-test/kit/utils/page-logic';
import { assertCurrentWorkspaceFlavour } from '@affine-test/kit/utils/workspace';
import { expect } from '@playwright/test';
test('click btn bew page and open in tab', async ({ page }) => {
test('click btn bew page and open in tab', async ({ page, workspace }) => {
await openHomePage(page);
await waitEditorLoad(page);
await newPage(page);
@@ -30,5 +29,7 @@ test('click btn bew page and open in tab', async ({ page }) => {
]);
expect(newTabPage.url()).toBe(newPageUrl);
await assertCurrentWorkspaceFlavour('local', page);
const currentWorkspace = await workspace.current();
expect(currentWorkspace.flavour).toContain('local');
});