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

+38
View File
@@ -92,6 +92,14 @@ void main() {
findsOneWidget,
);
expect(find.byKey(const ValueKey('verification-sent')), findsNothing);
expect(
tester.testTextInput.log,
isNot(
contains(
isMethodCall('TextInput.finishAutofillContext', arguments: true),
),
),
);
expect(
tester
.widget<TextFormField>(find.byKey(const ValueKey('email')))
@@ -153,6 +161,14 @@ void main() {
'/verification-sent',
);
expect(backend.sends, 1);
expect(
tester.testTextInput.log,
isNot(
contains(
isMethodCall('TextInput.finishAutofillContext', arguments: true),
),
),
);
expect(
find.textContaining('a verification email is on its way'),
findsOneWidget,
@@ -198,6 +214,14 @@ void main() {
find.text('Сервис недоступен. Попробуйте ещё раз.'),
findsOneWidget,
);
expect(
tester.testTextInput.log,
isNot(
contains(
isMethodCall('TextInput.finishAutofillContext', arguments: true),
),
),
);
await tester.tap(button);
await tester.pump();
expect(service.calls, hasLength(2));
@@ -207,6 +231,12 @@ void main() {
await tester.pumpAndSettle();
expect(find.byKey(const ValueKey('preview-result')), findsOneWidget);
expect(find.byKey(const ValueKey('auth-error')), findsNothing);
expect(
tester.testTextInput.log,
contains(
isMethodCall('TextInput.finishAutofillContext', arguments: true),
),
);
expect(tester.takeException(), isNull);
},
);
@@ -237,6 +267,14 @@ void main() {
await tester.pumpAndSettle();
expect(find.byKey(const ValueKey('confirmation')), findsOneWidget);
expect(find.byKey(const ValueKey('preview-result')), findsNothing);
expect(
tester.testTextInput.log,
isNot(
contains(
isMethodCall('TextInput.finishAutofillContext', arguments: true),
),
),
);
expect(tester.takeException(), isNull);
});
}