Open
Description
Use case
I'm trying to add an Android integration test to one of the packages, I use Espresso for it, like suggested in Plugin-Tests.md. I need to check if a widget is not rendered on the screen, after that I'll perform an action, and then verify the existence of a widget again (this time it should be visible).
In native Espresso library we can do that with ViewAssertions.doesNotExist
, but there's no equivalent in Espresso for Flutter - we only have isExisting
here.
Proposal
I'd suggest adding another static function (doesNotExist
) to FlutterMatchers
class. This function would return a proper matcher that would check if a given Flutter widget exists. If it does, it should throw an exception.
Example code:
WidgetInteraction playButton = onFlutterWidget(withValueKey("Play"));
playButton.check(matches(doesNotExist()));
Metadata
Metadata
Assignees
Labels
Issues that are less important to the Flutter projectNothing broken; request for a new capabilityA detailed proposal for a change to FlutterThe Espresso pluginflutter/packages repository. See also p: labels.Android applications specificallyOwned by Android platform teamTriaged by Android platform team