From 5e85c89c8fb6c2e72dc01a566237d47d39b1910a Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Mon, 27 Feb 2023 11:14:25 +0100 Subject: [PATCH] Fix opening OATH dialog in tests. --- integration_test/oath_test_util.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/integration_test/oath_test_util.dart b/integration_test/oath_test_util.dart index 8627c312..ed8844b6 100644 --- a/integration_test/oath_test_util.dart +++ b/integration_test/oath_test_util.dart @@ -112,6 +112,7 @@ extension OathFunctions on WidgetTester { } await shortWait(); + /// find an AccountView with issuer/name in the account list var matchingAccounts = find.descendant( of: findAccountList(), @@ -146,8 +147,11 @@ extension OathFunctions on WidgetTester { expect(accountView, isNotNull); if (accountView != null) { - await ensureVisible(find.byWidget(accountView)); - await tap(find.byWidget(accountView)); + final accountFinder = find.byWidget(accountView); + await ensureVisible(accountFinder); + final codeButtonFinder = find.descendant( + of: accountFinder, matching: find.bySubtype()); + await tap(codeButtonFinder); await shortWait(); } }