Reapply "Revert "Propagate textfield character limits to semantics (#40468)" (#40767)

This commit is contained in:
Michael Goderbauer
2019-09-18 14:55:37 -07:00
committed by GitHub
parent f19f040a73
commit 4373a31971
17 changed files with 458 additions and 25 deletions

View File

@@ -64,7 +64,11 @@ void main() {
});
test('TextField has correct Android semantics', () async {
final SerializableFinder normalTextField = find.byValueKey(normalTextFieldKeyValue);
final SerializableFinder normalTextField = find.descendant(
of: find.byValueKey(normalTextFieldKeyValue),
matching: find.byType('Semantics'),
firstMatchOnly: true,
);
expect(await getSemantics(normalTextField), hasAndroidSemantics(
className: AndroidClassName.editText,
isEditable: true,
@@ -112,7 +116,11 @@ void main() {
});
test('password TextField has correct Android semantics', () async {
final SerializableFinder passwordTextField = find.byValueKey(passwordTextFieldKeyValue);
final SerializableFinder passwordTextField = find.descendant(
of: find.byValueKey(passwordTextFieldKeyValue),
matching: find.byType('Semantics'),
firstMatchOnly: true,
);
expect(await getSemantics(passwordTextField), hasAndroidSemantics(
className: AndroidClassName.editText,
isEditable: true,