Tests
This commit is contained in:
parent
b991d3a40b
commit
ae732e41b1
|
|
@ -13,8 +13,7 @@ AppState appReducer(AppState state, dynamic action) {
|
||||||
if (action is UserLogout) {
|
if (action is UserLogout) {
|
||||||
return AppState().rebuild((b) => b
|
return AppState().rebuild((b) => b
|
||||||
..authState.replace(state.authState)
|
..authState.replace(state.authState)
|
||||||
..uiState.enableDarkMode =
|
..uiState.enableDarkMode = state.uiState.enableDarkMode
|
||||||
state.uiState.enableDarkMode || state.uiState.isTesting
|
|
||||||
..uiState.isTesting = state.uiState.isTesting);
|
..uiState.isTesting = state.uiState.isTesting);
|
||||||
} else if (action is LoadStateSuccess) {
|
} else if (action is LoadStateSuccess) {
|
||||||
return action.state.rebuild((b) => b
|
return action.state.rebuild((b) => b
|
||||||
|
|
|
||||||
|
|
@ -89,11 +89,13 @@ void main() {
|
||||||
|
|
||||||
// Edit the newly created product
|
// Edit the newly created product
|
||||||
test('Edit an existing product', () async {
|
test('Edit an existing product', () async {
|
||||||
|
if (await isMobile(driver)) {
|
||||||
print('Select product: $productKey');
|
print('Select product: $productKey');
|
||||||
await driver.scrollUntilVisible(
|
await driver.scrollUntilVisible(
|
||||||
find.byType('ListView'), find.text(productKey),
|
find.byType('ListView'), find.text(productKey),
|
||||||
dyScroll: -300);
|
dyScroll: -300);
|
||||||
await driver.tap(find.text(productKey));
|
await driver.tap(find.text(productKey));
|
||||||
|
}
|
||||||
|
|
||||||
print('Tap edit');
|
print('Tap edit');
|
||||||
await driver.tap(find.text(localization.edit));
|
await driver.tap(find.text(localization.edit));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue