-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testst: flutter driver"flutter driver", flutter_drive, or a driver test"flutter driver", flutter_drive, or a driver test
Milestone
Description
Problem
Tried to use this inside Google today, and getting incorrect behavior:
await driver.waitForAbsent(find.text('foo'), timeout: const Duration(seconds: 20));- If I call that, the future never completes, and the test fails with a timeout exception after 20 seconds.
- If I first await a delayed future of 5 seconds to let the Snackbar that holds the text go away, then run the
awaitabove, then the future completes just fine, and the test succeeds.
Analysis
The future is never completing because of an error during this call in extension.dart:
await _waitUntilFrame(() => !finder.precache());The error is:
'package:flutter_test/src/finders.dart': Failed assertion: line 269: '_cachedResult == null': is not true.
It seems weird that it's causing the future to never complete rather than completing with an error...
Metadata
Metadata
Assignees
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testst: flutter driver"flutter driver", flutter_drive, or a driver test"flutter driver", flutter_drive, or a driver test