颤振集成测试失败,出现错误"_pendingFrame== null":不正确。



我正在为我的flutter应用程序创建一个集成测试,但当我找到一个TextInput并试图在里面键入时,我遇到了这个错误。错误:'package:flutter_test/src/binding.dart': Failed assertion: line 1649 pos 12: '_pendingFrame == null': is not true.

代码:

final Finder email = find.byWidgetPredicate(
(widget) => widget is FutXTextField && widget.title == 'EMAIL',
);
expect(email, findsOneWidget,
reason: " Só pode haver um botão de escrever email");
await tester.enterText(email, "teste@teste.teste");

我在网上找不到这个错误是什么。

有没有人以前遇到过这种异常,并且知道如何解决它?

当我运行测试的应用程序引发异常时,我也遇到了同样的错误,如果你检查日志,你会发现在测试失败之前发生了任何错误吗?

我出现此错误是因为我在测试中使用了一个异步方法,但没有await

相关内容

最新更新