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.

fix: unit test on number list

Vincent Chan1736fb794d2b
diff --git a/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler_test.dart
index 5bfe1ada67..7307f9cf2f 100644
--- a/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler_test.dart
+++ b/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(