From 54a6db2e4bfcd045ff40eade2ee128d09cb8156f Mon Sep 17 00:00:00 2001 From: Madhav Date: Fri, 13 Mar 2026 17:08:19 +0530 Subject: [PATCH] test(auth): stabilize API token happy-path assertion --- test/auth/auth_screen_test.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/auth/auth_screen_test.dart b/test/auth/auth_screen_test.dart index 2267b74ae..74d1333a3 100644 --- a/test/auth/auth_screen_test.dart +++ b/test/auth/auth_screen_test.dart @@ -209,13 +209,16 @@ void main() { find.byKey(const ValueKey('inputApiToken')), '1234567890abcdef1234567890abcdef12345678', ); + + // Assert that API token mode is active before submitting. + expect(find.byKey(const ValueKey('inputApiToken')), findsOne); + expect(find.byKey(const Key('inputUsername')), findsNothing); + expect(find.byKey(const Key('inputPassword')), findsNothing); + await tester.tap(find.byKey(const Key('actionButton'))); await tester.pumpAndSettle(); // Assert - expect(find.byKey(const ValueKey('inputApiToken')), findsOne); - expect(find.byKey(const Key('inputUsername')), findsNothing); - expect(find.byKey(const Key('inputPassword')), findsNothing); expect(find.textContaining('An Error Occurred'), findsNothing); verify(