File tree Expand file tree Collapse file tree
super_editor/test/super_editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import 'package:super_editor/super_editor.dart';
77import 'package:super_editor/super_editor_test.dart' ;
88
99import '../test_runners.dart' ;
10+ import '../test_tools.dart' ;
1011import 'supereditor_test_tools.dart' ;
1112
1213void main () {
@@ -76,12 +77,13 @@ void main() {
7677 // end of the pasted text.
7778 final doc = testContext.document;
7879 expect (doc.nodeCount, 1 );
79- expect ((doc.getNodeAt (0 )! as ParagraphNode ).text.toPlainText (),
80- 'This is some content in a paragraph' );
81- final selection = testContext.composer.selection;
82- expect (selection, isNotNull);
83- expect (selection! .isCollapsed, isTrue);
84- expect ((selection.base .nodePosition as TextNodePosition ).offset, 24 );
80+ expect ((doc.getNodeAt (0 )! as ParagraphNode ).text.toPlainText (), 'This is some content in a paragraph' );
81+ expect (testContext.composer.selection, selectionEquivalentTo (const DocumentSelection .collapsed (
82+ position: DocumentPosition (
83+ nodeId: '1' ,
84+ nodePosition: TextNodePosition (offset: 24 ),
85+ ),
86+ )));
8587 });
8688
8789
You can’t perform that action at this time.
0 commit comments