mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-28 17:08:29 +01:00
test(auth): stabilize API token happy-path assertion
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user