mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
refactor(editor): edgeless element toolbar with new pattern (#10511)
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
dragBetweenIndices,
|
||||
enterPlaygroundRoom,
|
||||
focusRichText,
|
||||
focusRichTextEnd,
|
||||
focusTitle,
|
||||
getBoundingBox,
|
||||
getEditorHostLocator,
|
||||
@@ -330,13 +331,22 @@ test('should format quick bar be able to link text', async ({
|
||||
const linkPopoverInput = page.locator('.affine-link-popover-input');
|
||||
await expect(linkPopoverInput).toBeVisible();
|
||||
|
||||
await type(page, 'https://www.example.com');
|
||||
const url = 'https://www.example.com';
|
||||
|
||||
await type(page, url);
|
||||
await pressEnter(page);
|
||||
|
||||
expect(await getPageSnapshot(page, true)).toMatchSnapshot(
|
||||
`${testInfo.title}_init.json`
|
||||
);
|
||||
|
||||
const linkLocator = page.locator('affine-link a');
|
||||
await expect(linkLocator).toHaveAttribute('href', url);
|
||||
|
||||
await focusRichTextEnd(page);
|
||||
|
||||
await dragBetweenIndices(page, [1, 3], [1, 0]);
|
||||
|
||||
// The link button should be active after click
|
||||
await expect(linkBtn).toHaveAttribute('active', '');
|
||||
await linkBtn.click();
|
||||
|
||||
Reference in New Issue
Block a user