Skip to content

Commit e08ab1f

Browse files
committed
fix: Presses shift + alt + arrow right to select a word
1 parent d7410cd commit e08ab1f

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/arrow_keys_handler_test.dart

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ void main() async {
402402
);
403403
});
404404

405-
testWidgets('Presses shift + alt + arrow left to select a word',
405+
testWidgets('Presses shift + alt + arrow right to select a word',
406406
(tester) async {
407407
const text = 'Welcome to Appflowy 😁';
408408
final editor = tester.editor
@@ -416,6 +416,18 @@ void main() async {
416416
isShiftPressed: true,
417417
isAltPressed: true,
418418
);
419+
// < >
420+
expect(
421+
editor.documentSelection,
422+
selection.copyWith(
423+
end: Position(path: [0], offset: 11),
424+
),
425+
);
426+
await editor.pressLogicKey(
427+
LogicalKeyboardKey.arrowRight,
428+
isShiftPressed: true,
429+
isAltPressed: true,
430+
);
419431
// < Appflowy>
420432
expect(
421433
editor.documentSelection,
@@ -428,6 +440,11 @@ void main() async {
428440
isShiftPressed: true,
429441
isAltPressed: true,
430442
);
443+
await editor.pressLogicKey(
444+
LogicalKeyboardKey.arrowRight,
445+
isShiftPressed: true,
446+
isAltPressed: true,
447+
);
431448
// < Appflowy 😁>
432449
expect(
433450
editor.documentSelection,

0 commit comments

Comments
 (0)