From 1736fb794d2bff3af04fa9de971cae1d3d70f5b2 Mon Sep 17 00:00:00 2001 From: Vincent Chan Date: Thu, 8 Sep 2022 15:49:58 +0800 Subject: [PATCH] fix: unit test on number list --- ...enter_without_shift_in_text_node_handler_test.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 _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 _testMultipleSelection(