mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-28 15:55:19 +08:00
test: assert current workspace flavour (#1664)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import userA from '../fixtures/userA.json';
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const userA = require('../fixtures/userA.json');
|
||||
import { test } from '../libs/playwright';
|
||||
import { clickCollaborationPanel } from '../libs/setting';
|
||||
import {
|
||||
@@ -10,7 +11,10 @@ import {
|
||||
clickSideBarSettingButton,
|
||||
} from '../libs/sidebar';
|
||||
import { createFakeUser, loginUser, openHomePage } from '../libs/utils';
|
||||
import { createWorkspace } from '../libs/workspace-logic';
|
||||
import {
|
||||
assertCurrentWorkspaceFlavour,
|
||||
createWorkspace,
|
||||
} from '../libs/workspace';
|
||||
|
||||
test.describe('affine workspace', () => {
|
||||
test('should login with user A', async ({ page }) => {
|
||||
@@ -21,6 +25,7 @@ test.describe('affine workspace', () => {
|
||||
const footer = page.locator('[data-testid="workspace-list-modal-footer"]');
|
||||
expect(await footer.getByText(userA.name).isVisible()).toBe(true);
|
||||
expect(await footer.getByText(userA.email).isVisible()).toBe(true);
|
||||
await assertCurrentWorkspaceFlavour('local', page);
|
||||
});
|
||||
|
||||
test('should enable affine workspace successfully', async ({ page }) => {
|
||||
@@ -43,5 +48,6 @@ test.describe('affine workspace', () => {
|
||||
await page.locator('[data-block-is-title="true"]').type('Hello, world!', {
|
||||
delay: 50,
|
||||
});
|
||||
await assertCurrentWorkspaceFlavour('affine', page);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user