From ea0b1ccbfd68dc7793eee48f509c88392053d9be Mon Sep 17 00:00:00 2001 From: januszjanus Date: Thu, 16 Jan 2025 12:39:41 +0100 Subject: [PATCH] cleanup --- .../integration_test/suites/account_test.dart | 2 +- .../integration_test/suites/app_test.dart | 14 ++-- .../suites/onboarding_test.dart | 67 +++++++++---------- .../integration_test/utils/constants.dart | 4 +- 4 files changed, 43 insertions(+), 44 deletions(-) diff --git a/catalyst_voices/apps/voices/integration_test/suites/account_test.dart b/catalyst_voices/apps/voices/integration_test/suites/account_test.dart index 59003c6f79a..3ebf83182d4 100644 --- a/catalyst_voices/apps/voices/integration_test/suites/account_test.dart +++ b/catalyst_voices/apps/voices/integration_test/suites/account_test.dart @@ -35,7 +35,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(OverallSpacesPage.userShortcutBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await $(AppBarPage.accountPopupBtn).tap(); await AccountDropdownPage.accountDropdownLooksAsExpected($); await AccountDropdownPage.accountDropdownContainsSpecificData($); diff --git a/catalyst_voices/apps/voices/integration_test/suites/app_test.dart b/catalyst_voices/apps/voices/integration_test/suites/app_test.dart index 66816758d69..b52e4d56bf3 100644 --- a/catalyst_voices/apps/voices/integration_test/suites/app_test.dart +++ b/catalyst_voices/apps/voices/integration_test/suites/app_test.dart @@ -35,7 +35,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(OverallSpacesPage.visitorShortcutBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); expect($(AppBarPage.spacesDrawerButton).exists, false); }, ); @@ -47,7 +47,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(OverallSpacesPage.guestShortcutBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await $(AppBarPage.spacesDrawerButton).waitUntilVisible().tap(); SpacesDrawerPage.commonElementsLookAsExpected($); @@ -67,7 +67,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(OverallSpacesPage.guestShortcutBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await $(AppBarPage.spacesDrawerButton).waitUntilVisible().tap(); // iterate thru spaces by clicking next @@ -93,7 +93,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(OverallSpacesPage.userShortcutBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await $(AppBarPage.spacesDrawerButton).waitUntilVisible().tap(); SpacesDrawerPage.commonElementsLookAsExpected($); for (final space in Space.values) { @@ -108,7 +108,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(OverallSpacesPage.guestShortcutBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await $(AppBarPage.spacesDrawerButton).waitUntilVisible().tap(); await $(SpacesDrawerPage.allSpacesBtn).tap(); expect($(OverallSpacesPage.spacesListView), findsOneWidget); @@ -120,7 +120,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(OverallSpacesPage.userShortcutBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await $(AppBarPage.spacesDrawerButton).waitUntilVisible().tap(); await $(SpacesDrawerPage.allSpacesBtn).tap(); expect($(OverallSpacesPage.spacesListView), findsOneWidget); @@ -139,7 +139,7 @@ void main() async { }; await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(OverallSpacesPage.userShortcutBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await $(AppBarPage.spacesDrawerButton).waitUntilVisible().tap(); for (final space in Space.values) { await $(SpacesDrawerPage.chooserItem(space)).tap(); diff --git a/catalyst_voices/apps/voices/integration_test/suites/onboarding_test.dart b/catalyst_voices/apps/voices/integration_test/suites/onboarding_test.dart index 9a221afbed8..62d832c33cc 100644 --- a/catalyst_voices/apps/voices/integration_test/suites/onboarding_test.dart +++ b/catalyst_voices/apps/voices/integration_test/suites/onboarding_test.dart @@ -40,7 +40,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(OverallSpacesPage.visitorShortcutBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await $(AppBarPage.getStartedBtn).tap(); expect($(OnboardingPage.registrationInfoPanel), findsOneWidget); expect($(OnboardingPage.registrationDetailsPanel), findsOneWidget); @@ -52,7 +52,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.onboardingScreenLooksAsExpected( $, RegistrationState.getStarted, @@ -65,7 +65,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.closeBtn($).tap(); expect($(OnboardingPage.registrationDialog), findsNothing); }, @@ -76,7 +76,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.onboardingScreenLooksAsExpected( $, @@ -90,7 +90,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await ($(OnboardingPage.backButton)).waitUntilVisible().tap(); await OnboardingPage.registrationInfoPanelLooksAsExpected( @@ -105,7 +105,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await OnboardingPage.onboardingScreenLooksAsExpected( @@ -120,7 +120,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await ($(OnboardingPage.backButton)).waitUntilVisible().tap(); @@ -135,7 +135,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -150,7 +150,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -167,7 +167,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -184,7 +184,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -202,7 +202,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -221,7 +221,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -243,7 +243,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -263,7 +263,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -285,7 +285,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -310,7 +310,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -336,7 +336,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -362,7 +362,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -390,7 +390,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -417,7 +417,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -445,7 +445,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -483,7 +483,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -517,7 +517,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -550,7 +550,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -583,7 +583,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -614,7 +614,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -644,7 +644,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -675,7 +675,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -707,7 +707,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedCreateNewBtn($).tap(); await OnboardingPage.detailsPartCreateKeychainBtn($).tap(); await $(OnboardingPage.nextButton).tap(); @@ -740,7 +740,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedRecoverBtn($).tap(); await OnboardingPage.onboardingScreenLooksAsExpected( $, @@ -754,7 +754,7 @@ void main() async { (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + .tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedRecoverBtn($).tap(); await ($(OnboardingPage.backButton)).waitUntilVisible().tap(); await OnboardingPage.onboardingScreenLooksAsExpected( @@ -771,8 +771,7 @@ void main() async { 'visitor - restore - keychain choice screen looks OK', (PatrolTester $) async { await $.pumpWidgetAndSettle(App(routerConfig: router)); - await $(AppBarPage.getStartedBtn) - .tap(settleTimeout: TimeConstants.long.duration); + await $(AppBarPage.getStartedBtn).tap(settleTimeout: Time.long.duration); await OnboardingPage.detailsPartGetStartedRecoverBtn($).tap(); await OnboardingPage.onboardingScreenLooksAsExpected( $, diff --git a/catalyst_voices/apps/voices/integration_test/utils/constants.dart b/catalyst_voices/apps/voices/integration_test/utils/constants.dart index 27fa1d5edb9..b03074474cd 100644 --- a/catalyst_voices/apps/voices/integration_test/utils/constants.dart +++ b/catalyst_voices/apps/voices/integration_test/utils/constants.dart @@ -1,9 +1,9 @@ -enum TimeConstants { +enum Time { veryShort(Duration(milliseconds: 500)), short(Duration(seconds: 2)), long(Duration(minutes: 10)); final Duration duration; - const TimeConstants(this.duration); + const Time(this.duration); }