You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Not a clear way to target the login/submit button to trigger in an integration test. There is a test util function for the packages own test, but as far as I can tell the animated_button widget is not accessible outside of the package.
Describe the solution you'd like
Would like to be able to something like tester.tap(find.byKey(Key("flutter_login_submit_button"); to trigger a tap on the submit button.
Additional context
The text was updated successfully, but these errors were encountered:
Similar problem. Our app requires login to reach anything beyond the home screen, and I can't actually automate the login process without some way to find the relevant elements, so I can't write integration tests at the moment.
Not in the docs, but digging through the package code leads to a workaround.
import'package:flutter_login/src/widgets/animated_button.dart';
import'package:flutter_login/src/widgets/animated_text_form_field.dart';
.
.
.
final name = find.byType(AnimatedTextFormField).first;
final pass = find.byType(AnimatedPasswordTextFormField).first;
final btn = find.byType(AnimatedButton).first;
await tester.enterText(name, '5');
await tester.enterText(pass, '5');
await tester.press(btn);
Definitely a bit fragile, as it depends on implementation details we shouldn't know or care about. Which is why it would be better to have keys on everything instead.
Is your feature request related to a problem? Please describe.
Not a clear way to target the login/submit button to trigger in an integration test. There is a test util function for the packages own test, but as far as I can tell the animated_button widget is not accessible outside of the package.
Describe the solution you'd like
Would like to be able to something like
tester.tap(find.byKey(Key("flutter_login_submit_button");
to trigger a tap on the submit button.Additional context
The text was updated successfully, but these errors were encountered: