Fixing the editable_text unit tests by clearing the log. Add a modification for also testing cached size. (#41300)
This commit is contained in:
parent
9c6dd0de23
commit
ae529d8be0
@ -2253,6 +2253,8 @@ void main() {
|
|||||||
style: Typography(platform: TargetPlatform.android).black.subhead,
|
style: Typography(platform: TargetPlatform.android).black.subhead,
|
||||||
cursorColor: Colors.blue,
|
cursorColor: Colors.blue,
|
||||||
backgroundCursorColor: Colors.grey,
|
backgroundCursorColor: Colors.grey,
|
||||||
|
minLines: 10,
|
||||||
|
maxLines: 20,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 100.0),
|
const SizedBox(height: 100.0),
|
||||||
],
|
],
|
||||||
@ -2272,6 +2274,8 @@ void main() {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
log.clear();
|
||||||
|
|
||||||
// Move to the next editable text.
|
// Move to the next editable text.
|
||||||
await tester.showKeyboard(find.byKey(ValueKey<String>(controller2.text)));
|
await tester.showKeyboard(find.byKey(ValueKey<String>(controller2.text)));
|
||||||
final MethodCall methodCall2 = log.firstWhere((MethodCall m) => m.method == 'TextInput.setEditableSizeAndTransform');
|
final MethodCall methodCall2 = log.firstWhere((MethodCall m) => m.method == 'TextInput.setEditableSizeAndTransform');
|
||||||
@ -2279,11 +2283,13 @@ void main() {
|
|||||||
methodCall2,
|
methodCall2,
|
||||||
isMethodCall('TextInput.setEditableSizeAndTransform', arguments: <String, dynamic>{
|
isMethodCall('TextInput.setEditableSizeAndTransform', arguments: <String, dynamic>{
|
||||||
'width': 800,
|
'width': 800,
|
||||||
'height': 14,
|
'height': 140.0,
|
||||||
'transform': Matrix4.identity().storage.toList(),
|
'transform': <double>[1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 214.0, 0.0, 1.0],
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
log.clear();
|
||||||
|
|
||||||
// Move back to the first editable text.
|
// Move back to the first editable text.
|
||||||
await tester.showKeyboard(find.byKey(ValueKey<String>(controller1.text)));
|
await tester.showKeyboard(find.byKey(ValueKey<String>(controller1.text)));
|
||||||
final MethodCall methodCall3 = log.firstWhere((MethodCall m) => m.method == 'TextInput.setEditableSizeAndTransform');
|
final MethodCall methodCall3 = log.firstWhere((MethodCall m) => m.method == 'TextInput.setEditableSizeAndTransform');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user