Saul-Mirone
2025-03-27 05:27:59 +00:00
parent 5f5c27fbdf
commit d9d5aa407a
12 changed files with 90 additions and 45 deletions

View File

@@ -5,7 +5,6 @@ import { expect } from '@playwright/test';
import {
captureHistory,
copyByKeyboard,
dragBetweenCoords,
dragOverTitle,
enterPlaygroundRoom,
focusRichText,
@@ -20,15 +19,18 @@ import {
mockParseDocUrlService,
pasteByKeyboard,
pasteContent,
pressArrowRight,
pressEnter,
pressShiftTab,
pressTab,
resetHistory,
selectAllByKeyboard,
setInlineRangeInSelectedRichText,
setSelection,
SHORT_KEY,
type,
undoByClick,
undoByKeyboard,
waitNextFrame,
} from '../utils/actions/index.js';
import {
@@ -106,15 +108,15 @@ test(scoped`split block when paste`, async ({ page }) => {
`,
};
await type(page, 'abc');
await captureHistory(page);
await setInlineRangeInSelectedRichText(page, 1, 1);
await captureHistory(page);
await pasteContent(page, clipData);
await waitNextFrame(page);
await assertRichTexts(page, ['atext', 'h1c']);
await undoByClick(page);
await undoByKeyboard(page);
await assertRichTexts(page, ['abc']);
await type(page, 'aa');
@@ -132,11 +134,12 @@ test(scoped`split block when paste`, async ({ page }) => {
if (!bottomRight789) {
throw new Error('bottomRight789 is not found');
}
await dragBetweenCoords(page, topLeft123, bottomRight789);
await selectAllByKeyboard(page);
await pressArrowRight(page);
await pressEnter(page);
// FIXME see https://github.com/toeverything/blocksuite/pull/878
// await pasteContent(page, clipData);
// await assertRichTexts(page, ['aaa', 'bbc', 'text', 'h1']);
await pasteContent(page, clipData);
await assertRichTexts(page, ['aaa', 'bbc', 'text', 'h1']);
});
test(scoped`copy clipItems format`, async ({ page }) => {

View File

@@ -481,6 +481,7 @@ test(scoped`copy when text note active in edgeless`, async ({ page }) => {
await activeNoteInEdgeless(page, ids.noteId);
await waitForInlineEditorStateUpdated(page);
await focusRichText(page);
await setInlineRangeInSelectedRichText(page, 0, 4);
await copyByKeyboard(page);
await pressArrowRight(page);