Skip to content

Commit 4c43ef1

Browse files
committed
reverted reformatting
2 parents ef34d80 + 57c91dc commit 4c43ef1

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

super_editor/test/super_editor/supereditor_copy_and_paste_test.dart

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ void main() {
3434

3535
// Ensure that the text was pasted into the paragraph.
3636
final nodeId = doc.first.id;
37-
expect(SuperEditorInspector.findTextInComponent(nodeId).toPlainText(), "Pasted text: This was pasted here");
37+
expect(SuperEditorInspector.findTextInComponent(nodeId).toPlainText(),
38+
"Pasted text: This was pasted here");
3839
});
3940

4041
testAllInputsOnDesktop(
@@ -85,7 +86,6 @@ void main() {
8586
position: DocumentPosition(nodeId: '1', nodePosition: TextNodePosition(offset: 24)))));
8687
});
8788

88-
8989
testWidgetsOnApple('pastes within a list item', (tester) async {
9090
await tester //
9191
.createDocument()
@@ -97,7 +97,8 @@ void main() {
9797

9898
// Place the caret at the end of the list item.
9999
await tester.placeCaretInParagraph(doc.first.id, 12);
100-
await tester.typeImeText(" "); // <- manually add a space because Markdown strips it
100+
await tester.typeImeText(
101+
" "); // <- manually add a space because Markdown strips it
101102

102103
// Paste text into the paragraph.
103104
tester
@@ -107,7 +108,8 @@ void main() {
107108

108109
// Ensure that the text was pasted into the paragraph.
109110
final nodeId = doc.first.id;
110-
expect(SuperEditorInspector.findTextInComponent(nodeId).toPlainText(), "Pasted text: This was pasted here");
111+
expect(SuperEditorInspector.findTextInComponent(nodeId).toPlainText(),
112+
"Pasted text: This was pasted here");
111113
});
112114

113115
testAllInputsOnDesktop('pastes multiple paragraphs', (
@@ -138,12 +140,16 @@ This is the third paragraph''');
138140
// Ensure three paragraphs were created.
139141
final doc = testContext.document;
140142
expect(doc.nodeCount, 3);
141-
expect((doc.getNodeAt(0)! as ParagraphNode).text.toPlainText(), 'This is a paragraph');
142-
expect((doc.getNodeAt(1)! as ParagraphNode).text.toPlainText(), 'This is a second paragraph');
143-
expect((doc.getNodeAt(2)! as ParagraphNode).text.toPlainText(), 'This is the third paragraph');
143+
expect((doc.getNodeAt(0)! as ParagraphNode).text.toPlainText(),
144+
'This is a paragraph');
145+
expect((doc.getNodeAt(1)! as ParagraphNode).text.toPlainText(),
146+
'This is a second paragraph');
147+
expect((doc.getNodeAt(2)! as ParagraphNode).text.toPlainText(),
148+
'This is the third paragraph');
144149
});
145150

146-
testAllInputsOnAllPlatforms("paste retains node IDs when replayed during undo", (
151+
testAllInputsOnAllPlatforms(
152+
"paste retains node IDs when replayed during undo", (
147153
tester, {
148154
required TextInputSource inputSource,
149155
}) async {
@@ -169,7 +175,8 @@ This is the third paragraph''');
169175
}
170176

171177
// Gather the current node IDs in the document.
172-
final originalNodeIds = testContext.document.toList().map((node) => node.id).toList();
178+
final originalNodeIds =
179+
testContext.document.toList().map((node) => node.id).toList();
173180

174181
// Pump enough time to separate the next text entry from the paste action.
175182
await tester.pump(const Duration(seconds: 2));
@@ -187,11 +194,14 @@ This is the third paragraph''');
187194

188195
// Ensure that the node IDs in the document didn't change after re-running
189196
// the paste command.
190-
final newNodeIds = testContext.document.toList().map((node) => node.id).toList();
197+
final newNodeIds =
198+
testContext.document.toList().map((node) => node.id).toList();
191199
expect(newNodeIds, originalNodeIds);
192200
});
193201

194-
testWidgetsOnMac("paste command content does not mutate when document changes", (tester) async {
202+
testWidgetsOnMac(
203+
"paste command content does not mutate when document changes",
204+
(tester) async {
195205
final testContext = await tester //
196206
.createDocument()
197207
.withSingleEmptyParagraph()

0 commit comments

Comments
 (0)