3

I have a class that extends EditableText, which provides styled editing - colour spans and so on.

The parent widget has a bool flag to use default TextInput or the custom one that extends EditableText.

Testing works fine for the default one:

final String dummyDesc = 'dummy desc';
final Finder mention = find.byType(Mention);
await tester.enterText(mention, dummyDesc);

however, if I do the same on a page where Mention uses the custom input, the test fails as it cannot find a TextInput - as there isn't one.

Error:

Bad state: No element

How Do you use enterText on a widget that extends EditableText? Or something similar?

4

1 に答える 1