From d1ffe2a5dc050379b2698665918908cd04ab291d Mon Sep 17 00:00:00 2001 From: poka Date: Fri, 5 Nov 2021 18:25:21 +0100 Subject: [PATCH] Add test for renaming first created derivation: failed state --- pubspec.lock | 130 +++++++++++++++++++------------------- pubspec.yaml | 70 ++++++++++---------- test_driver/app_test.dart | 33 ++++++++-- 3 files changed, 128 insertions(+), 105 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index e13954a..b781f23 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "20.0.0" + version: "30.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "1.4.0" + version: "2.7.0" archive: dependency: transitive description: @@ -28,7 +28,7 @@ packages: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.3.0" async: dependency: transitive description: @@ -77,7 +77,7 @@ packages: name: cli_util url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.3.5" clock: dependency: transitive description: @@ -98,7 +98,7 @@ packages: name: connectivity_plus url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.4.0" connectivity_plus_linux: dependency: transitive description: @@ -112,7 +112,7 @@ packages: name: connectivity_plus_macos url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.1" connectivity_plus_platform_interface: dependency: transitive description: @@ -133,14 +133,14 @@ packages: name: connectivity_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" convert: dependency: transitive description: name: convert url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" coverage: dependency: transitive description: @@ -154,7 +154,7 @@ packages: name: cross_file url: "https://pub.dartlang.org" source: hosted - version: "0.3.1+5" + version: "0.3.2" crypto: dependency: "direct main" description: @@ -168,7 +168,7 @@ packages: name: dbus url: "https://pub.dartlang.org" source: hosted - version: "0.5.4" + version: "0.5.6" dubp: dependency: "direct main" description: @@ -189,14 +189,14 @@ packages: name: fast_base58 url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.2.1" ffi: dependency: transitive description: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.2" file: dependency: transitive description: @@ -210,7 +210,7 @@ packages: name: file_utils url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" flutter: dependency: "direct main" description: flutter @@ -227,7 +227,7 @@ packages: name: flutter_launcher_icons url: "https://pub.dartlang.org" source: hosted - version: "0.9.0" + version: "0.9.2" flutter_logs: dependency: "direct main" description: @@ -241,7 +241,7 @@ packages: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" flutter_svg: dependency: "direct main" description: @@ -277,7 +277,7 @@ packages: name: glob url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" globbing: dependency: transitive description: @@ -361,7 +361,7 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.13.0" + version: "0.13.4" http_multi_server: dependency: transitive description: @@ -382,28 +382,28 @@ packages: name: image url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.0.8" image_gallery_saver: dependency: "direct main" description: name: image_gallery_saver url: "https://pub.dartlang.org" source: hosted - version: "1.6.9" + version: "1.7.1" image_picker: dependency: "direct main" description: name: image_picker url: "https://pub.dartlang.org" source: hosted - version: "0.8.4" + version: "0.8.4+4" image_picker_for_web: dependency: transitive description: name: image_picker_for_web url: "https://pub.dartlang.org" source: hosted - version: "2.1.3" + version: "2.1.4" image_picker_platform_interface: dependency: transitive description: @@ -424,14 +424,14 @@ packages: name: io url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.3" isolate: dependency: transitive description: name: isolate url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.1.1" jdenticon_dart: dependency: "direct main" description: @@ -459,7 +459,7 @@ packages: name: logging url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" matcher: dependency: transitive description: @@ -480,7 +480,7 @@ packages: name: mime url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" nested: dependency: transitive description: @@ -501,7 +501,7 @@ packages: name: node_preamble url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" normalize: dependency: transitive description: @@ -515,7 +515,7 @@ packages: name: package_config url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" package_info: dependency: "direct main" description: @@ -529,42 +529,42 @@ packages: name: package_info_plus url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.3.0" package_info_plus_linux: dependency: transitive description: name: package_info_plus_linux url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.3" package_info_plus_macos: dependency: transitive description: name: package_info_plus_macos url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.3.0" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.2" package_info_plus_web: dependency: transitive description: name: package_info_plus_web url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.4" package_info_plus_windows: dependency: transitive description: name: package_info_plus_windows url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.4" path: dependency: transitive description: @@ -578,7 +578,7 @@ packages: name: path_drawing url: "https://pub.dartlang.org" source: hosted - version: "0.5.1" + version: "0.5.1+1" path_parsing: dependency: transitive description: @@ -592,21 +592,21 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.6" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" path_provider_platform_interface: dependency: transitive description: @@ -620,21 +620,21 @@ packages: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.3" pdf: dependency: "direct main" description: name: pdf url: "https://pub.dartlang.org" source: hosted - version: "3.5.0" + version: "3.6.1" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.11.0" + version: "1.11.1" permission_handler: dependency: "direct main" description: @@ -648,21 +648,21 @@ packages: name: permission_handler_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.6.1" + version: "3.7.0" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "4.3.0" + version: "4.4.0" pin_code_fields: dependency: "direct main" description: name: pin_code_fields url: "https://pub.dartlang.org" source: hosted - version: "6.0.2" + version: "6.1.0" platform: dependency: transitive description: @@ -676,7 +676,7 @@ packages: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" pool: dependency: transitive description: @@ -690,7 +690,7 @@ packages: name: printing url: "https://pub.dartlang.org" source: hosted - version: "5.5.0" + version: "5.6.0" process: dependency: transitive description: @@ -704,21 +704,21 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "6.0.0" + version: "6.0.1" pub_semver: dependency: transitive description: name: pub_semver url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" qr: dependency: transitive description: name: qr url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" qrscan: dependency: "direct main" description: @@ -739,7 +739,7 @@ packages: name: responsive_framework url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" rxdart: dependency: transitive description: @@ -753,35 +753,35 @@ packages: name: sentry url: "https://pub.dartlang.org" source: hosted - version: "6.0.0" + version: "6.1.0" sentry_flutter: dependency: "direct main" description: name: sentry_flutter url: "https://pub.dartlang.org" source: hosted - version: "6.0.0" + version: "6.1.0" shared_preferences: dependency: "direct main" description: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.7" + version: "2.0.8" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" shared_preferences_platform_interface: dependency: transitive description: @@ -795,21 +795,21 @@ packages: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" shelf: dependency: transitive description: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" shelf_packages_handler: dependency: transitive description: @@ -823,7 +823,7 @@ packages: name: shelf_static url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" shelf_web_socket: dependency: transitive description: @@ -898,7 +898,7 @@ packages: name: system_info url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" term_glyph: dependency: transitive description: @@ -954,7 +954,7 @@ packages: name: uuid url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.0.5" vector_math: dependency: transitive description: @@ -975,14 +975,14 @@ packages: name: watcher url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" web_socket_channel: dependency: transitive description: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" webdriver: dependency: transitive description: @@ -1003,7 +1003,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.2.10" xdg_directories: dependency: transitive description: @@ -1017,7 +1017,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.3.0" + version: "5.3.1" yaml: dependency: transitive description: @@ -1027,4 +1027,4 @@ packages: version: "3.1.0" sdks: dart: ">=2.14.0 <3.0.0" - flutter: ">=2.0.0" + flutter: ">=2.5.0" diff --git a/pubspec.yaml b/pubspec.yaml index d92f9d6..c9aa99b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,47 +11,47 @@ environment: sdk: ">=2.7.0 <3.0.0" dependencies: - flutter: - sdk: flutter + bubble: ^1.2.1 + crypto: ^3.0.1 dubp: path: packages/dubp_rs - flutter_launcher_icons: "^0.9.0" - qrscan: ^0.3.2 - permission_handler: ^8.1.6 - image_gallery_saver: ^1.6.9 - image_picker: ^0.8.4 - # graphql_flutter: ^4.0.1 #^3.1.0 - graphql_flutter: ^5.0.0 - provider: ^6.0.0 - truncate: ^3.0.1 - path_provider: ^2.0.3 - intl: ^0.17.0 - pin_code_fields: ^6.0.2 - http: ^0.13.0 - super_tooltip: ^1.0.1 - package_info: ^2.0.2 - xml: ^5.3.0 - pdf: ^3.5.0 - printing: ^5.5.0 - shared_preferences: ^2.0.7 - sync_http: ^0.3.0 - crypto: ^3.0.1 fast_base58: ^0.2.0 - logger: ^1.1.0 - flutter_logs: ^2.1.4 - sentry: ^6.0.0 - sentry_flutter: ^6.0.0 - bubble: ^1.2.1 - flutter_svg: ^0.22.0 - responsive_framework: ^0.1.4 - responsive_builder: ^0.4.1 - jdenticon_dart: ^2.0.0 - # audioplayers: ^0.18.1 + flutter: + sdk: flutter flutter_driver: sdk: flutter - test: ^1.17.10 - unorm_dart: ^0.2.0 + flutter_launcher_icons: ^0.9.0 + flutter_logs: ^2.1.4 + flutter_svg: ^0.22.0 + graphql_flutter: ^5.0.0 hive: ^2.0.4 + http: ^0.13.0 + image_gallery_saver: ^1.6.9 + image_picker: ^0.8.4 + intl: ^0.17.0 + jdenticon_dart: ^2.0.0 + logger: ^1.1.0 + package_info: ^2.0.2 + path_provider: ^2.0.3 + pdf: ^3.5.0 + permission_handler: 8.1.6 + pin_code_fields: ^6.0.2 + printing: ^5.5.0 + provider: ^6.0.0 + qrscan: ^0.3.2 + responsive_builder: ^0.4.1 + responsive_framework: ^0.1.4 + sentry: ^6.0.0 + sentry_flutter: ^6.0.0 + shared_preferences: ^2.0.7 + super_tooltip: ^1.0.1 + sync_http: ^0.3.0 + test: ^1.17.10 + # test_api: ^0.4.7 + # test: ^1.19.3 + truncate: ^3.0.1 + unorm_dart: ^0.2.0 + xml: ^5.3.0 flutter_icons: android: "ic_launcher" diff --git a/test_driver/app_test.dart b/test_driver/app_test.dart index 0083329..7bcf48b 100644 --- a/test_driver/app_test.dart +++ b/test_driver/app_test.dart @@ -254,13 +254,32 @@ void main() { "Top !\n\nVotre trousseau de clef et votre portefeuille ont été créés avec un immense succès.\n\nFélicitations !"); }); - test('My wallets - Create a derivations, open thems, tap all buttons', ( - {timeout: Timeout.none}) async { + test('My wallets - Rename first derivation', ( + {timeout: const Duration(seconds: 2)}) async { await tapOn('goWalletHome'); expect(await getText('myWallets'), "Mes portefeuilles"); await sleep(300); + // Go to first derivation and rename it + await driver.tap(find.text('Mon portefeuille courant')); + await sleep(300); + await tapOn('renameWallet'); + await sleep(100); + await tapOn('walletName'); + await sleep(100); + await driver.enterText('Renommage wallet 1'); + await sleep(300); + await tapOn('renameWallet'); + await sleep(400); + await driver.waitFor(find.text('Renommage wallet 1'), timeout: timeout); + // expect(await getText('walletName'), "Renommage wallet 1"); + await goBack(); + }); + + test('My wallets - Create a derivations, open thems, tap all buttons', ( + {timeout: const Duration(seconds: 2)}) async { + await driver.waitFor(find.text('Renommage wallet 1'), timeout: timeout); // Add a second derivation await createDerivation('Derivation 2'); @@ -301,8 +320,10 @@ void main() { await deleteWallet(true); }); - test('My wallets - Extra tests', ({timeout: Timeout.none}) async { + test('My wallets - Extra tests', ( + {timeout: const Duration(seconds: 2)}) async { // Add derivation 5,6 and 7 + await driver.waitFor(find.text('Derivation 4'), timeout: timeout); await createDerivation('Derivation 5'); await createDerivation('Derivation 6'); await createDerivation('Derivation 7'); @@ -377,7 +398,8 @@ void main() { }); test('Search - Search Pi profile, navigate in history transactions', ( - {timeout: Timeout.none}) async { + {timeout: const Duration(seconds: 2)}) async { + await driver.waitFor(find.text('Derivation 20'), timeout: timeout); await goBack(); await goBack(); await sleep(200); @@ -408,7 +430,8 @@ void main() { }, timeout: Timeout(Duration(minutes: globalTimeout))); test('Wallet generation - Fast wallets generations', ( - {timeout: Timeout.none}) async { + {timeout: const Duration(seconds: 2)}) async { + await driver.waitFor(find.text('Commentaire:'), timeout: timeout); await goBack(); await goBack(); await deleteAllWallets();