vzu*_*urd 5 integration-testing dart google-signin flutter flutter-test
我试图测试我的 flutter 应用程序的主屏幕登录。我正在使用 Flutter 中的 google-signin ( https://pub.dev/packages/google_sign_in ) 包来执行登录和身份验证。因此,一旦按下登录按钮,就会出现一个弹出窗口,要求用户选择用户帐户。那时,我无法控制点击,因为该对话框屏幕是由插件生成的。在这种情况下如何实现用户帐户的选择?
test('Test Login', () async {
final Timeline timeline = await driver.traceAction(() async {
await driver.tap(find.byValueKey('GoogleLogin'));
await driver.tap(find.text('myemail@gmail.com')); // This will not work !!!
});
TimelineSummary.summarize(timeline)
..writeSummaryToFile('home_scroll_perf', pretty: true)
..writeTimelineToFile('home_scroll_perf', pretty: true);
});
Run Code Online (Sandbox Code Playgroud)
在我看来,在使用任何第三方插件进行测试时这可能是一个问题。请帮忙。
| 归档时间: |
|
| 查看次数: |
1896 次 |
| 最近记录: |