mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 02:01:36 +03:00
Fix opening OATH dialog in tests.
This commit is contained in:
parent
47e577c947
commit
5e85c89c8f
@ -112,6 +112,7 @@ extension OathFunctions on WidgetTester {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await shortWait();
|
await shortWait();
|
||||||
|
|
||||||
/// find an AccountView with issuer/name in the account list
|
/// find an AccountView with issuer/name in the account list
|
||||||
var matchingAccounts = find.descendant(
|
var matchingAccounts = find.descendant(
|
||||||
of: findAccountList(),
|
of: findAccountList(),
|
||||||
@ -146,8 +147,11 @@ extension OathFunctions on WidgetTester {
|
|||||||
expect(accountView, isNotNull);
|
expect(accountView, isNotNull);
|
||||||
|
|
||||||
if (accountView != null) {
|
if (accountView != null) {
|
||||||
await ensureVisible(find.byWidget(accountView));
|
final accountFinder = find.byWidget(accountView);
|
||||||
await tap(find.byWidget(accountView));
|
await ensureVisible(accountFinder);
|
||||||
|
final codeButtonFinder = find.descendant(
|
||||||
|
of: accountFinder, matching: find.bySubtype<FilledButton>());
|
||||||
|
await tap(codeButtonFinder);
|
||||||
await shortWait();
|
await shortWait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user