feat(core): adjust share menu style (#4584)

This commit is contained in:
JimmFly
2023-10-12 11:26:13 +08:00
committed by GitHub
parent ae4322b75f
commit 5ebd82dc04
9 changed files with 173 additions and 109 deletions

View File

@@ -3,6 +3,7 @@ import {
addUserToWorkspace,
createRandomUser,
enableCloudWorkspace,
enableCloudWorkspaceFromShareButton,
loginUser,
} from '@affine-test/kit/utils/cloud';
import {
@@ -47,14 +48,14 @@ test.describe('collaboration', () => {
},
page
);
await enableCloudWorkspace(page);
await enableCloudWorkspaceFromShareButton(page);
const title = getBlockSuiteEditorTitle(page);
await title.pressSequentially('TEST TITLE', {
delay: 50,
});
await page.keyboard.press('Enter', { delay: 50 });
await page.keyboard.type('TEST CONTENT', { delay: 50 });
await page.getByTestId('share-menu-button').click();
await page.getByTestId('cloud-share-menu-button').click();
await page.getByTestId('share-menu-create-link-button').click();
await page.getByTestId('share-menu-copy-link-button').click();

View File

@@ -176,3 +176,12 @@ export async function enableCloudWorkspace(page: Page) {
await waitForEditorLoad(page);
await clickNewPageButton(page);
}
export async function enableCloudWorkspaceFromShareButton(page: Page) {
await page.getByTestId('local-share-menu-button').click();
await page.getByTestId('share-menu-enable-affine-cloud-button').click();
await page.getByTestId('confirm-enable-affine-cloud-button').click();
// wait for upload and delete local workspace
await page.waitForTimeout(2000);
await waitForEditorLoad(page);
await clickNewPageButton(page);
}