[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

@@ -22,12 +22,12 @@ void main() {
test('measure', () async {
Timeline timeline = await driver.traceAction(() async {
// Find the scrollable stock list
ObjectRef stockList = await driver.findByValueKey('Gallery List');
SerializableFinder stockList = find.byValueKey('Gallery List');
expect(stockList, isNotNull);
await driver.tap(await driver.findByText('Demos'));
await driver.tap(await driver.findByText('Components'));
await driver.tap(await driver.findByText('Style'));
await driver.tap(find.text('Demos'));
await driver.tap(find.text('Components'));
await driver.tap(find.text('Style'));
// TODO(eseidel): These are very artifical scrolls, we should use better
// https://github.com/flutter/flutter/issues/3316

View File

@@ -23,7 +23,7 @@ void main() {
test('measure', () async {
Timeline timeline = await driver.traceAction(() async {
// Find the scrollable stock list
ObjectRef stockList = await driver.findByValueKey('stock-list');
SerializableFinder stockList = find.byValueKey('stock-list');
expect(stockList, isNotNull);
// Scroll down