Enable credential autofill for signup and login (#56)

This commit is contained in:
Stephan D committed 2026-10-17 07:24:27 +02:00
1 parent bd675357bb
commit 86b6aafe7d
6 files changed
+461 -117

No files matched your search

+26
View File
@@ -55,6 +55,12 @@ void main() {
await submit(tester);
expect(find.text('Enter your email address.'), findsOneWidget);
expect(find.text('Enter your password.'), findsOneWidget);
expect(
tester.testTextInput.log.where(
(call) => call.method == 'TextInput.finishAutofillContext',
),
isEmpty,
);
await tester.enterText(
find.byKey(const ValueKey('email')),
'test@example.com',
@@ -79,6 +85,12 @@ void main() {
await tester.testTextInput.receiveAction(TextInputAction.done);
await tester.pumpAndSettle();
expect(find.byKey(const ValueKey('preview-result')), findsOneWidget);
expect(
tester.testTextInput.log,
contains(
isMethodCall('TextInput.finishAutofillContext', arguments: true),
),
);
expect(tester.takeException(), isNull);
},
);
@@ -104,12 +116,26 @@ void main() {
);
await submit(tester);
expect(find.text('Passwords do not match.'), findsOneWidget);
expect(
tester.testTextInput.log,
isNot(
contains(
isMethodCall('TextInput.finishAutofillContext', arguments: true),
),
),
);
await tester.enterText(
find.byKey(const ValueKey('confirmation')),
'example-password',
);
await submit(tester);
expect(find.byKey(const ValueKey('verification-sent')), findsOneWidget);
expect(
tester.testTextInput.log,
contains(
isMethodCall('TextInput.finishAutofillContext', arguments: true),
),
);
await tester.ensureVisible(
find.byKey(const ValueKey('demo-confirmation')),
);