Skip to content

Commit

Permalink
chore: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>
  • Loading branch information
LucasXu0 and Xazin authored Apr 11, 2023
1 parent 1b014c2 commit f6b5597
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void main() async {
);
});

testWidgets('Presses alt + arrow left key, move the cursor one left right',
testWidgets('Presses alt + arrow left key, move the cursor one word left',
(tester) async {
const text = 'Welcome to Appflowy';
final editor = tester.editor
Expand Down
18 changes: 6 additions & 12 deletions test/service/shortcut_event/shortcut_event_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -261,18 +261,12 @@ void main() async {

expect(editor.documentLength, 2);

if (Platform.isMacOS) {
await editor.pressLogicKey(
key: LogicalKeyboardKey.backspace,
isMetaPressed: true,
);
} else {
await editor.pressLogicKey(
key: LogicalKeyboardKey.backspace,
isControlPressed: true,
isAltPressed: true,
);
}
await editor.pressLogicKey(
key: LogicalKeyboardKey.backspace,
isMetaPressed: Platform.isMacOS,
isControlPressed: !Platform.isMacOS,
isAltPressed: !Platform.isMacOS,
);

await tester.pumpAndSettle();

Expand Down

0 comments on commit f6b5597

Please sign in to comment.