pump method

Pumps a SuperEditor widget tree with the desired configuration, and returns a TestDocumentContext, which includes the artifacts connected to the widget tree, e.g., the DocumentEditor, DocumentComposer, etc.

If you need access to the pumped Widget, use build instead of this method, and then call WidgetTester.pump with the returned Widget.

Implementation

Future<TestDocumentContext> pump() async {
  final testDocumentContext = _createTestDocumentContext();
  await _widgetTester.pumpWidget(
    _build(testDocumentContext).widget,
  );
  return testDocumentContext;
}