Fix tapping on a test in flutter run (#13397)

Also:

* Remove find.byIcon since it's identical to find.icon. (I sent mail to flutter-dev about this.)

* Fix IconData's operator== and hashCode, which had not been updated when we added fields.

* Add the byTooltip finder to the list of suggested finders.

* Make the suggested Key finder prettier.
This commit is contained in:
Ian Hickson
2017-12-08 14:37:24 -08:00
committed by GitHub
parent b80751cdc3
commit d25e0eb0d3
9 changed files with 57 additions and 52 deletions

View File

@@ -11,7 +11,7 @@ final int choiceCount = app_bar_bottom_sample.choices.length;
IconData iconAt(int index) => app_bar_bottom_sample.choices[index].icon;
Finder findChoiceCard(IconData icon) {
return find.descendant(of: find.byType(Card), matching: find.icon(icon));
return find.descendant(of: find.byType(Card), matching: find.byIcon(icon));
}
void main() {

View File

@@ -12,11 +12,11 @@ IconData iconAt(int index) => basic_app_bar_sample.choices[index].icon;
String titleAt(int index) => basic_app_bar_sample.choices[index].title;
Finder findAppBarIcon(IconData icon) {
return find.descendant(of: find.byType(AppBar), matching: find.icon(icon));
return find.descendant(of: find.byType(AppBar), matching: find.byIcon(icon));
}
Finder findChoiceCard(IconData icon) {
return find.descendant(of: find.byType(Card), matching: find.icon(icon));
return find.descendant(of: find.byType(Card), matching: find.byIcon(icon));
}
void main() {

View File

@@ -11,11 +11,11 @@ final int choiceCount = tabbed_app_bar_sample.choices.length;
IconData iconAt(int index) => tabbed_app_bar_sample.choices[index].icon;
Finder findChoiceCard(IconData icon) {
return find.descendant(of: find.byType(Card), matching: find.icon(icon));
return find.descendant(of: find.byType(Card), matching: find.byIcon(icon));
}
Finder findTab(IconData icon) {
return find.descendant(of: find.byType(Tab), matching: find.icon(icon));
return find.descendant(of: find.byType(Tab), matching: find.byIcon(icon));
}
void main() {