fix: split view focus (#11217)
# After: https://github.com/user-attachments/assets/990d500d-2da7-488e-ac32-dd7bd229f896 # Before: https://github.com/user-attachments/assets/6676766a-c76a-414b-a35e-53d2cda10c24
This commit is contained in:
@@ -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 }) => {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user