Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
f6d3f9ad
Unverified
Commit
f6d3f9ad
authored
Aug 29, 2019
by
Hans Muller
Committed by
GitHub
Aug 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check phone number formatting in the gallery text fields demo (#39450)
parent
9769754d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
text_form_field_demo_test.dart
...gallery/test/demo/material/text_form_field_demo_test.dart
+8
-0
No files found.
examples/flutter_gallery/test/demo/material/text_form_field_demo_test.dart
View file @
f6d3f9ad
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment