From 75b59e709b15e687dba1d19af385017d3a68b57d Mon Sep 17 00:00:00 2001 From: Efthymis Sarmpanis Date: Fri, 14 Jun 2019 21:38:17 +0300 Subject: [PATCH] Ensure the product item is in view, before selecting it in IT. --- test_driver/products_it_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_driver/products_it_test.dart b/test_driver/products_it_test.dart index 0977144bb..410f4f492 100644 --- a/test_driver/products_it_test.dart +++ b/test_driver/products_it_test.dart @@ -53,7 +53,7 @@ void main() { await driver.tap(find.pageBack()); - //TODO: This will not work if the product is out of the scrollable view + await driver.scrollUntilVisible(find.byType('ListView'), find.text(productKey)); await driver.tap(find.text(productKey)); await driver.waitFor(find.text(productKey)); await driver.waitFor(find.text(notes)); @@ -65,7 +65,7 @@ void main() { // Edit the newly created product test('Edit an existing product', () async { - //TODO: This will not work if the product is out of the scrollable view + await driver.scrollUntilVisible(find.byType('ListView'), find.text(productKey)); await driver.tap(find.text(productKey), timeout: Duration(seconds: 3)); await driver.tap(find.byValueKey(ProductKeys.productKey));