Unverified Commit f6d3f9ad authored by Hans Muller's avatar Hans Muller Committed by GitHub

Check phone number formatting in the gallery text fields demo (#39450)

parent 9769754d
......@@ -16,9 +16,17 @@ void main() {
final Finder nameField = find.widgetWithText(TextFormField, 'Name *');
expect(nameField, findsOneWidget);
final Finder phoneNumberField = find.widgetWithText(TextFormField, 'Phone Number *');
expect(phoneNumberField, findsOneWidget);
final Finder passwordField = find.widgetWithText(TextFormField, 'Password *');
expect(passwordField, findsOneWidget);
// Verify the that the phone number's TextInputFormatter does what's expected.
await tester.enterText(phoneNumberField, '1234567890');
await tester.pumpAndSettle();
expect(find.text('(123) 456-7890'), findsOneWidget);
await tester.enterText(nameField, '');
await tester.pumpAndSettle();
// The submit button isn't initially visible. Drag it into view so that
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment