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
ecc590f9
Commit
ecc590f9
authored
Apr 07, 2017
by
Chris Bracken
Committed by
GitHub
Apr 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate WidgetTester.idle() after enterText() (#9290)
enterText() now includes a call to idle().
parent
a7a95daa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
14 deletions
+0
-14
text_field_test.dart
packages/flutter/test/material/text_field_test.dart
+0
-14
No files found.
packages/flutter/test/material/text_field_test.dart
View file @
ecc590f9
...
...
@@ -103,7 +103,6 @@ void main() {
Future
<
Null
>
checkText
(
String
testValue
)
async
{
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
testValue
);
await
tester
.
idle
();
// Check that the onChanged event handler fired.
expect
(
textFieldValue
,
equals
(
testValue
));
...
...
@@ -210,7 +209,6 @@ void main() {
final
String
testValue
=
'abc def ghi'
;
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
testValue
);
await
tester
.
idle
();
await
tester
.
pumpWidget
(
builder
());
...
...
@@ -249,7 +247,6 @@ void main() {
final
String
testValue
=
'abc def ghi'
;
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
testValue
);
await
tester
.
idle
();
expect
(
controller
.
value
.
text
,
testValue
);
await
tester
.
pumpWidget
(
builder
());
...
...
@@ -285,7 +282,6 @@ void main() {
final
String
testValue
=
'abc def ghi'
;
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
testValue
);
await
tester
.
idle
();
await
tester
.
pumpWidget
(
builder
());
...
...
@@ -349,7 +345,6 @@ void main() {
final
String
testValue
=
'abc def ghi'
;
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
testValue
);
await
tester
.
idle
();
await
tester
.
pumpWidget
(
builder
());
// Tap the selection handle to bring up the "paste / select all" menu.
...
...
@@ -403,7 +398,6 @@ void main() {
final
String
testValue
=
'abc def ghi'
;
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
testValue
);
await
tester
.
idle
();
await
tester
.
pumpWidget
(
builder
());
// Tap the selection handle to bring up the "paste / select all" menu.
...
...
@@ -456,13 +450,11 @@ void main() {
final
Size
emptyInputSize
=
inputBox
.
size
;
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
'No wrapping here.'
);
await
tester
.
idle
();
await
tester
.
pumpWidget
(
builder
(
3
));
expect
(
findInputBox
(),
equals
(
inputBox
));
expect
(
inputBox
.
size
,
equals
(
emptyInputSize
));
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
kThreeLines
);
await
tester
.
idle
();
await
tester
.
pumpWidget
(
builder
(
3
));
expect
(
findInputBox
(),
equals
(
inputBox
));
expect
(
inputBox
.
size
,
greaterThan
(
emptyInputSize
));
...
...
@@ -471,14 +463,12 @@ void main() {
// An extra line won't increase the size because we max at 3.
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
kFourLines
);
await
tester
.
idle
();
await
tester
.
pumpWidget
(
builder
(
3
));
expect
(
findInputBox
(),
equals
(
inputBox
));
expect
(
inputBox
.
size
,
threeLineInputSize
);
// But now it will.
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
kFourLines
);
await
tester
.
idle
();
await
tester
.
pumpWidget
(
builder
(
4
));
expect
(
findInputBox
(),
equals
(
inputBox
));
expect
(
inputBox
.
size
,
greaterThan
(
threeLineInputSize
));
...
...
@@ -504,7 +494,6 @@ void main() {
final
String
testValue
=
kThreeLines
;
final
String
cutValue
=
'First line of stuff keeps going until abcdef ghijk. '
;
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
testValue
);
await
tester
.
idle
();
await
tester
.
pumpWidget
(
builder
());
...
...
@@ -584,7 +573,6 @@ void main() {
await
tester
.
pumpWidget
(
builder
());
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
kFourLines
);
await
tester
.
idle
();
await
tester
.
pumpWidget
(
builder
());
...
...
@@ -672,7 +660,6 @@ void main() {
Future
<
Null
>
checkText
(
String
testValue
)
async
{
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
testValue
);
await
tester
.
idle
();
// Check that the onChanged event handler fired.
expect
(
textFieldValue
,
equals
(
testValue
));
...
...
@@ -705,7 +692,6 @@ void main() {
Future
<
Null
>
checkText
(
String
testValue
)
async
{
await
tester
.
enterText
(
find
.
byType
(
EditableText
),
testValue
);
await
tester
.
idle
();
// Check that the onChanged event handler fired.
expect
(
textFieldValue
,
equals
(
testValue
));
...
...
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