This commit is contained in:
Hillel Coren 2019-08-23 07:45:37 +03:00
parent 6b89de1e9f
commit ad744856f7
1 changed files with 13 additions and 6 deletions

View File

@ -48,8 +48,11 @@ void main() {
print('Check for error'); print('Check for error');
await driver.waitFor(find.text(localization.pleaseEnterAProductKey)); await driver.waitFor(find.text(localization.pleaseEnterAProductKey));
print('Click back'); if (await isMobile(driver)) {
await driver.tap(find.pageBack()); print('Click back');
await driver.tap(find.pageBack());
await driver.waitFor(find.byTooltip(localization.newProduct));
}
}); });
// Create a new product // Create a new product
@ -74,9 +77,11 @@ void main() {
await driver.waitFor(find.text(notes)); await driver.waitFor(find.text(notes));
//await driver.waitFor(find.text(cost)); //await driver.waitFor(find.text(cost));
print('Click back'); if (await isMobile(driver)) {
await driver.tap(find.pageBack()); print('Click back');
await driver.waitFor(find.byTooltip(localization.newProduct)); await driver.tap(find.pageBack());
await driver.waitFor(find.byTooltip(localization.newProduct));
}
}); });
// Edit the newly created product // Edit the newly created product
@ -136,7 +141,9 @@ void main() {
await driver.waitFor(find.text(localization.restoredProduct)); await driver.waitFor(find.text(localization.restoredProduct));
await driver.waitForAbsent(find.text(localization.deleted)); await driver.waitForAbsent(find.text(localization.deleted));
await driver.tap(find.pageBack()); if (await isMobile(driver)) {
await driver.tap(find.pageBack());
}
}); });
}); });
} }