| // Copyright 2016 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| import 'package:flutter_driver/flutter_driver.dart'; |
| import 'package:test/test.dart'; |
| group('scrolling performance test', () { |
| driver = await FlutterDriver.connect(); |
| test('tap on the floating action button; verify counter', () async { |
| // Find the scrollable stock list |
| ObjectRef stockList = await driver.findByValueKey('stock-list'); |
| expect(stockList, isNotNull); |
| for (int i = 0; i < 5; i++) { |
| await driver.scroll(stockList, 0.0, -300.0, new Duration(milliseconds: 300)); |
| await new Future.delayed(new Duration(milliseconds: 500)); |
| for (int i = 0; i < 5; i++) { |
| await driver.scroll(stockList, 0.0, 300.0, new Duration(milliseconds: 300)); |
| await new Future.delayed(new Duration(milliseconds: 500)); |