fix: unit test on number list

This commit is contained in:
Vincent Chan 2022-09-08 15:49:58 +08:00
parent 875c109b14
commit 1736fb794d

View File

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