Skip to content

Commit e96cad7

Browse files
committed
action_sheet test: Await a bottom-sheet exit that we hadn't been awaiting
Thanks Greg for noticing that we were missing this part in the story of the test: #1624 (comment) We're about to put a MessageContent in the action sheet itself, for #217, and without this change, we'd get a failure later in the test when two MessageContents were found when one was expected (one in the message list and one in the action sheet).
1 parent 9cc34cd commit e96cad7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/widgets/action_sheet_test.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,11 @@ void main() {
16511651
connection.prepare(json: GetMessageResult(
16521652
message: eg.streamMessage(content: 'foo')).toJson());
16531653
await tapEdit(tester);
1654-
await tester.pump(Duration.zero);
1654+
await tester.pump();
1655+
// Default duration of bottom-sheet exit animation,
1656+
// plus 1ms fudge factor (why needed?)
1657+
// TODO(#1668) get this dynamically instead of hard-coding
1658+
await tester.pump(Duration(milliseconds: 200 + 1));
16551659
await tester.enterText(find.byWidgetPredicate(
16561660
(widget) => widget is TextField && widget.controller?.text == 'foo'),
16571661
'bar');

0 commit comments

Comments
 (0)