Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

test: fix update_test_style_by_command_x_handler_test

Lucas.Xude01e9222ed1
diff --git a/frontend/app_flowy/packages/flowy_editor/test/infra/test_raw_key_event.dart b/frontend/app_flowy/packages/flowy_editor/test/infra/test_raw_key_event.dart
index d3dac12677..e4eb99b60e 100644
--- a/frontend/app_flowy/packages/flowy_editor/test/infra/test_raw_key_event.dart
+++ b/frontend/app_flowy/packages/flowy_editor/test/infra/test_raw_key_event.dart
@@ -112,6 +112,9 @@ extension on LogicalKeyboardKey {
if (this == LogicalKeyboardKey.keyU) {
return PhysicalKeyboardKey.keyU;
}
+ if (this == LogicalKeyboardKey.keyZ) {
+ return PhysicalKeyboardKey.keyZ;
+ }
throw UnimplementedError();
}
}
diff --git a/frontend/app_flowy/packages/flowy_editor/test/service/internal_key_event_handlers/update_text_style_by_command_x_handler_test.dart b/frontend/app_flowy/packages/flowy_editor/test/service/internal_key_event_handlers/update_text_style_by_command_x_handler_test.dart
index 3d4e1aff3c..39c750a933 100644
--- a/frontend/app_flowy/packages/flowy_editor/test/service/internal_key_event_handlers/update_text_style_by_command_x_handler_test.dart
+++ b/frontend/app_flowy/packages/flowy_editor/test/service/internal_key_event_handlers/update_text_style_by_command_x_handler_test.dart
@@ -22,7 +22,7 @@ void main() async {
testWidgets('Presses Command + I to update text style', (tester) async {
await _testUpdateTextStyleByCommandX(
tester,
- StyleKey.bold,
+ StyleKey.italic,
LogicalKeyboardKey.keyI,
);
});
@@ -30,7 +30,7 @@ void main() async {
testWidgets('Presses Command + U to update text style', (tester) async {
await _testUpdateTextStyleByCommandX(
tester,
- StyleKey.bold,
+ StyleKey.underline,
LogicalKeyboardKey.keyU,
);
});
@@ -38,7 +38,7 @@ void main() async {
testWidgets('Presses Command + S to update text style', (tester) async {
await _testUpdateTextStyleByCommandX(
tester,
- StyleKey.bold,
+ StyleKey.strikethrough,
LogicalKeyboardKey.keyS,
);
});