Browse Source

test: fix update_test_style_by_command_x_handler_test

Lucas.Xu 2 năm trước cách đây
mục cha
commit
de01e9222e

+ 3 - 0
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();
   }
 }

+ 3 - 3
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,
       );
     });