[driver] refactor API to finder objects (#3365)

This commit is contained in:
Yegor
2016-04-15 16:57:35 -07:00
parent a91bc0ba9c
commit 9ce995f65e
11 changed files with 182 additions and 219 deletions

View File

@@ -23,14 +23,14 @@ void main() {
test('tap on the floating action button; verify counter', () async {
// Find floating action button (fab) to tap on
ObjectRef fab = await driver.findByTooltipMessage('Increment');
expect(fab, isNotNull);
SerializableFinder fab = find.byTooltip('Increment');
expect(await driver.exists(fab), isTrue);
// Tap on the fab
await driver.tap(fab);
// Wait for text to change to the desired value
expect(await driver.findByText('Button tapped 1 time.'), isNotNull);
expect(await driver.exists(find.text('Button tapped 1 time.')), isTrue);
});
});
}