فهرست منبع

fix: unit test on number list

Vincent Chan 2 سال پیش
والد
کامیت
1736fb794d

+ 9 - 2
frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler_test.dart

@@ -176,8 +176,15 @@ Future<void> _testStyleNeedToBeCopy(WidgetTester tester, String style) async {
   await editor.pressLogicKey(
     LogicalKeyboardKey.enter,
   );
-  expect(editor.documentSelection, Selection.single(path: [4], startOffset: 0));
-  expect(editor.nodeAtPath([4])?.subtype, null);
+  if (style == StyleKey.numberList) {
+    expect(
+        editor.documentSelection, Selection.single(path: [5], startOffset: 0));
+    expect(editor.nodeAtPath([4])?.subtype, StyleKey.numberList);
+  } else {
+    expect(
+        editor.documentSelection, Selection.single(path: [4], startOffset: 0));
+    expect(editor.nodeAtPath([4])?.subtype, null);
+  }
 }
 
 Future<void> _testMultipleSelection(