diff --git a/.config/dictionaries/project.dic b/.config/dictionaries/project.dic index 3c271a5313c..00c8869208a 100644 --- a/.config/dictionaries/project.dic +++ b/.config/dictionaries/project.dic @@ -189,6 +189,7 @@ netifas netkey nextest Nodetool +NuFi oapi OCSP Oleksandr diff --git a/catalyst_voices/apps/voices/integration_test/app_test.dart b/catalyst_voices/apps/voices/integration_test/app_test.dart index 4bf9d3f79eb..fc40b749252 100644 --- a/catalyst_voices/apps/voices/integration_test/app_test.dart +++ b/catalyst_voices/apps/voices/integration_test/app_test.dart @@ -3,6 +3,7 @@ import 'package:catalyst_voices/configs/bootstrap.dart'; import 'package:catalyst_voices/routes/routes.dart'; import 'package:catalyst_voices_models/catalyst_voices_models.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:go_router/go_router.dart'; import 'package:integration_test/integration_test.dart'; import 'package:patrol_finders/patrol_finders.dart'; @@ -11,12 +12,17 @@ import 'pageobject/spaces_drawer_page.dart'; void main() async { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + late final GoRouter router; + + setUpAll(() async { + router = buildAppRouter(initialLocation: const DiscoveryRoute().location); + + await bootstrap(router: router); + }); patrolWidgetTest('Spaces drawer guest menu renders correctly', (PatrolTester $) async { - final args = - await bootstrap(initialLocation: const DiscoveryRoute().location); - await $.pumpWidgetAndSettle(App(routerConfig: args.routerConfig)); + await $.pumpWidgetAndSettle(App(routerConfig: router)); await $(DashboardPage.guestShortcutBtn).tap(); await $.pumpAndSettle(); await Future.delayed(const Duration(seconds: 5)); diff --git a/catalyst_voices/apps/voices/lib/configs/bootstrap.dart b/catalyst_voices/apps/voices/lib/configs/bootstrap.dart index 7595b62ce39..d75d7fda766 100644 --- a/catalyst_voices/apps/voices/lib/configs/bootstrap.dart +++ b/catalyst_voices/apps/voices/lib/configs/bootstrap.dart @@ -74,6 +74,17 @@ Future _doBootstrapAndRun(BootstrapWidgetBuilder builder) async { await _runApp(app); } +GoRouter buildAppRouter({ + String? initialLocation, +}) { + return AppRouter.init( + initialLocation: initialLocation, + guards: const [ + MilestoneGuard(), + ], + ); +} + /// Initializes the application before it can be run. Should setup all /// the things which are necessary before the actual app is run, /// either via [runApp] or injected into a test environment during @@ -81,7 +92,9 @@ Future _doBootstrapAndRun(BootstrapWidgetBuilder builder) async { /// /// Initialization logic that is relevant for [runApp] scenario /// only should be added to [_doBootstrapAndRun], not here. -Future bootstrap({String? initialLocation}) async { +Future bootstrap({ + GoRouter? router, +}) async { _loggingService ..level = kDebugMode ? Level.FINER : Level.OFF ..printLogs = kDebugMode; @@ -94,12 +107,7 @@ Future bootstrap({String? initialLocation}) async { // Key derivation needs to be initialized before it can be used await CatalystKeyDerivation.init(); - final router = AppRouter.init( - initialLocation: initialLocation, - guards: const [ - MilestoneGuard(), - ], - ); + router ??= buildAppRouter(); Bloc.observer = AppBlocObserver(); diff --git a/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/cardano-wallet.junit-report.xml b/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/cardano-wallet.junit-report.xml deleted file mode 100644 index 9309a07e11e..00000000000 --- a/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/cardano-wallet.junit-report.xml +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Call log: - - expect.toBeVisible with timeout 5000ms - - waiting for getByText('Tx hash:') - - - at ../pages/modal.ts:62 - - 60 | await this.page.waitForTimeout(2000); - 61 | await expect(this.modalHeader).toBeVisible(); - > 62 | await expect(this.modalBody).toBeVisible(); - | ^ - 63 | } - 64 | } - 65 | - - at Modal.assertModalIsVisible (/wallet-automation/pages/modal.ts:62:34) - at HomePage.assertModal (/wallet-automation/pages/homePage.ts:102:5) - at /wallet-automation/tests/wallets.spec.ts:60:7 - - attachment #1: screenshot (image/png) ────────────────────────────────────────────────────────── - test-results/wallets-Testing-with-Yoroi-Sign-and-submit-tx-with-Yoroi-chromium/test-failed-1.png - ──────────────────────────────────────────────────────────────────────────────────────────────── - - attachment #2: screenshot (image/png) ────────────────────────────────────────────────────────── - test-results/wallets-Testing-with-Yoroi-Sign-and-submit-tx-with-Yoroi-chromium/test-failed-2.png - ──────────────────────────────────────────────────────────────────────────────────────────────── - - attachment #3: trace (application/zip) ───────────────────────────────────────────────────────── - test-results/wallets-Testing-with-Yoroi-Sign-and-submit-tx-with-Yoroi-chromium/trace.zip - Usage: - - npx playwright show-trace test-results/wallets-Testing-with-Yoroi-Sign-and-submit-tx-with-Yoroi-chromium/trace.zip - - ──────────────────────────────────────────────────────────────────────────────────────────────── - - Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── - - Error: Timed out 5000ms waiting for expect(locator).toBeVisible() - - Locator: getByText('Tx hash:') - Expected: visible - Received: - Call log: - - expect.toBeVisible with timeout 5000ms - - waiting for getByText('Tx hash:') - - - at ../pages/modal.ts:62 - - 60 | await this.page.waitForTimeout(2000); - 61 | await expect(this.modalHeader).toBeVisible(); - > 62 | await expect(this.modalBody).toBeVisible(); - | ^ - 63 | } - 64 | } - 65 | - - at Modal.assertModalIsVisible (/wallet-automation/pages/modal.ts:62:34) - at HomePage.assertModal (/wallet-automation/pages/homePage.ts:102:5) - at /wallet-automation/tests/wallets.spec.ts:60:7 - - attachment #1: screenshot (image/png) ────────────────────────────────────────────────────────── - test-results/wallets-Testing-with-Yoroi-Sign-and-submit-tx-with-Yoroi-chromium-retry1/test-failed-1.png - ──────────────────────────────────────────────────────────────────────────────────────────────── - - attachment #2: trace (application/zip) ───────────────────────────────────────────────────────── - test-results/wallets-Testing-with-Yoroi-Sign-and-submit-tx-with-Yoroi-chromium-retry1/trace.zip - Usage: - - npx playwright show-trace test-results/wallets-Testing-with-Yoroi-Sign-and-submit-tx-with-Yoroi-chromium-retry1/trace.zip - - ──────────────────────────────────────────────────────────────────────────────────────────────── -]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/tests/wallets.spec.ts b/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/tests/wallets.spec.ts index 6a637a9f54b..7867550c2b7 100644 --- a/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/tests/wallets.spec.ts +++ b/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/tests/wallets.spec.ts @@ -21,6 +21,10 @@ walletConfigs.forEach((walletConfig) => { walletConfig.extension.Name === "Lace", "https://github.com/input-output-hk/catalyst-voices/issues/1190" ); + test.skip( + walletConfig.extension.Name === "Nufi", + "https://github.com/input-output-hk/catalyst-voices/issues/1190" + ); test.beforeAll(async () => { browser = await restoreWallet(walletConfig); await enableWallet(walletConfig, browser); diff --git a/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/utils/wallets/yoroiUtils.ts b/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/utils/wallets/yoroiUtils.ts index 19b29811784..b21b5785619 100644 --- a/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/utils/wallets/yoroiUtils.ts +++ b/catalyst_voices/packages/libs/catalyst_cardano/catalyst_cardano/wallet-automation/utils/wallets/yoroiUtils.ts @@ -5,6 +5,7 @@ export const onboardYoroiWallet = async ( page: Page, walletConfig: WalletConfig ): Promise => { + /* cspell: disable */ await page.locator("#initialPage-tosAgreement-checkbox").check(); await page.locator("#initialPage-continue-button").click(); await page.locator("#mui-2").click(); @@ -32,6 +33,7 @@ export const onboardYoroiWallet = async ( await page.locator("#primaryButton").click(); await page.locator("#dialog-gotothewallet-button").click(); }; +/* cspell: enable */ export const signYoroiData = async ( signTab: Page,