Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying unit tests for editable_text #41300

Merged
merged 1 commit into from Sep 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/flutter/test/widgets/editable_text_test.dart
Expand Up @@ -2253,6 +2253,8 @@ void main() {
style: Typography(platform: TargetPlatform.android).black.subhead,
cursorColor: Colors.blue,
backgroundCursorColor: Colors.grey,
minLines: 10,
maxLines: 20,
),
const SizedBox(height: 100.0),
],
Expand All @@ -2272,18 +2274,22 @@ void main() {
}),
);

log.clear();

// Move to the next editable text.
await tester.showKeyboard(find.byKey(ValueKey<String>(controller2.text)));
final MethodCall methodCall2 = log.firstWhere((MethodCall m) => m.method == 'TextInput.setEditableSizeAndTransform');
expect(
methodCall2,
isMethodCall('TextInput.setEditableSizeAndTransform', arguments: <String, dynamic>{
'width': 800,
'height': 14,
'transform': Matrix4.identity().storage.toList(),
'height': 140.0,
'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.
await tester.showKeyboard(find.byKey(ValueKey<String>(controller1.text)));
final MethodCall methodCall3 = log.firstWhere((MethodCall m) => m.method == 'TextInput.setEditableSizeAndTransform');
Expand Down