mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved the accuracy of workspace member overcapacity calculation. - Corrected seat allocation handling for one-time license variants, ensuring proper event emission and bypassing unnecessary updates. - **Refactor** - Streamlined internal logic by removing an obsolete method related to seat count checks. - **Tests** - Removed a workspace member list pagination test to streamline end-to-end testing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
58 lines
1.4 KiB
TypeScript
58 lines
1.4 KiB
TypeScript
import { test } from '@affine-test/kit/playwright';
|
|
import {
|
|
createRandomUser,
|
|
enableCloudWorkspace,
|
|
loginUser,
|
|
} from '@affine-test/kit/utils/cloud';
|
|
import { clickPageModeButton } from '@affine-test/kit/utils/editor';
|
|
import {
|
|
getBlockSuiteEditorTitle,
|
|
waitForEditorLoad,
|
|
waitForEmptyEditor,
|
|
} from '@affine-test/kit/utils/page-logic';
|
|
import { createLocalWorkspace } from '@affine-test/kit/utils/workspace';
|
|
import { expect } from '@playwright/test';
|
|
|
|
let user: {
|
|
id: string;
|
|
name: string;
|
|
email: string;
|
|
password: string;
|
|
};
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
user = await createRandomUser();
|
|
await loginUser(page, user);
|
|
});
|
|
|
|
test('should transform local favorites data', async ({ page }) => {
|
|
await page.reload();
|
|
await waitForEditorLoad(page);
|
|
await createLocalWorkspace(
|
|
{
|
|
name: 'test',
|
|
},
|
|
page
|
|
);
|
|
await page
|
|
.getByTestId('navigation-panel-bar-add-favorite-button')
|
|
.first()
|
|
.click();
|
|
await clickPageModeButton(page);
|
|
await waitForEmptyEditor(page);
|
|
|
|
await getBlockSuiteEditorTitle(page).fill('this is a new fav page');
|
|
await expect(
|
|
page
|
|
.getByTestId('navigation-panel-favorites')
|
|
.locator('[draggable] >> text=this is a new fav page')
|
|
).toBeVisible();
|
|
|
|
await enableCloudWorkspace(page);
|
|
await expect(
|
|
page
|
|
.getByTestId('navigation-panel-favorites')
|
|
.locator('[draggable] >> text=this is a new fav page')
|
|
).toBeVisible();
|
|
});
|