feat: automation hooks and attach-mode state handling on top of shared parallel E2E execution - #2582
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2582 +/- ##
=======================================
Coverage 99.95% 99.95%
=======================================
Files 184 184
Lines 7446 7446
Branches 1489 1479 -10
=======================================
Hits 7443 7443
Misses 3 3 🚀 New features to boost your workflow:
|
e512786 to
1584dd2
Compare
7c22336 to
8fef1a0
Compare
0254ccf to
1d59c37
Compare
|
pnpm lock should be fixed on main if you want to merge again |
…d parallel E2E execution Signed-off-by: yasenltd <yasenltd@gmail.com>
3a69ef1 to
0ae8547
Compare
There was a problem hiding this comment.
Pull request overview
Refactors the Playwright automation suite to better support parallel/shared-environment execution and attach-mode debugging by extracting reusable bootstraps/fixtures/flows, reorganizing automation/utils into domain modules, and updating tests/pages/services to use the new structure and state-preservation controls.
Changes:
- Introduces shared-environment isolation + attach-mode preservation toggles for local app state and backend state.
- Reorganizes
automation/utilsinto focused domains (runtime,setup,db,files,data,crypto,seeding) and makesautomationSupporta thin re-export layer. - Updates suites to use extracted bootstraps/fixtures/flows and (in several suites) recreates seeded fixtures per test.
Reviewed changes
Copilot reviewed 75 out of 80 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| automation/utils/setup/sharedTestEnvironment.ts | New shared-env isolation activation/cleanup + state reset helpers. |
| automation/utils/setup/playwrightIsolation.ts | New isolation context/env application helpers. |
| automation/utils/seeding/organizationSeeding.ts | Seeds org users/keys; clears stale local org connections; links KeyPair to local user/org ids. |
| automation/utils/seeding/localUserSeeding.ts | Refactors local user seeding + attach-mode rerun handling via Pinia/router resets. |
| automation/utils/runtime/timing.ts | Extracts timeout calculation + start-time waiting utility. |
| automation/utils/runtime/oldTools.ts | Moves migration hook helper under runtime. |
| automation/utils/runtime/environment.ts | Extracts environment/transaction setup helpers (previously in automationSupport). |
| automation/utils/runtime/electronAppLauncher.ts | Centralizes app mode parsing and isolation env wiring for launch/attach. |
| automation/utils/runtime/dialogMocks.ts | Adds dialog mock state set/clear helpers via preload hook. |
| automation/utils/runtime/booleanEnv.ts | Adds boolean env parsing helper with validation. |
| automation/utils/runtime/backendStateMode.ts | Adds shared-env + backend-preservation mode helpers. |
| automation/utils/runtime/appSession.ts | Thin wrapper around AppBootstrapper for setup/reset/close. |
| automation/utils/runtime/appMode.ts | Adds app mode + local app state preservation policy helper. |
| automation/utils/network/mirrorNodeAPI.ts | Rehomes mirror-node API utilities; adds findMissingAccountId. |
| automation/utils/files/fileWait.ts | Extracts file wait/read helper. |
| automation/utils/files/encodeSystemFiles.ts | Adds system file encoding helpers (exchange rates, fee schedule, etc.). |
| automation/utils/files/csvGenerator.ts | Adjusts generated CSV output path to match new directory layout. |
| automation/utils/db/databaseUtil.ts | Adds attach-mode/backend-preserve skips for resets; updates imports. |
| automation/utils/db/databaseQueries.ts | Extends insertKeyPair to accept explicit local user/org IDs. |
| automation/utils/data/transactionUtil.ts | Moves signature map JSON conversion helper. |
| automation/utils/data/transactionFormatting.ts | Moves transaction-id/account-id formatting helpers. |
| automation/utils/data/random.ts | Extracts random email/password helpers. |
| automation/utils/data/jsonUtils.ts | Extracts JSON diffing + key removal + properties parsing. |
| automation/utils/data/dataNormalizer.ts | Extracts normalizers for exchange/throttle/fee schedule data. |
| automation/utils/crypto/keyUtil.ts | Updates crypto import path + consolidates under crypto/. |
| automation/utils/crypto/crypto.ts | Updates crypto import path + consolidates under crypto/. |
| automation/utils/automationSupport.ts | Converts to re-export façade over new runtime/data/files helpers. |
| automation/tests/workflowTests.test.ts | Uses local suite bootstrap + per-test seeded local user/session setup. |
| automation/tests/ui-performance/signAllPerformance.test.ts | Rewires imports to new runtime/ + db/ modules. |
| automation/tests/ui-performance/signAllComplexKeyPerformance.test.ts | Rewires imports to new runtime/ + db/ modules. |
| automation/tests/ui-performance/seed-org-perf-data.ts | Rewires imports to new db/, crypto/, seeding/ modules. |
| automation/tests/ui-performance/seed-local-perf-data.ts | Rewires DB path import to db/databaseUtil. |
| automation/tests/ui-performance/readyToSignPerformance.test.ts | Rewires imports to new runtime/ + db/ modules. |
| automation/tests/ui-performance/readyForReviewPerformance.test.ts | Rewires imports to new runtime/ + db/ modules. |
| automation/tests/ui-performance/readyForExecutionPerformance.test.ts | Rewires imports to new runtime/ + db/ modules. |
| automation/tests/ui-performance/inProgressPerformance.test.ts | Rewires imports to new runtime/ + db/ modules. |
| automation/tests/ui-performance/historyPerformanceLocal.test.ts | Rewires imports + local user seeding module path. |
| automation/tests/ui-performance/historyPerformance.test.ts | Rewires imports to new runtime/ + db/ modules. |
| automation/tests/ui-performance/filesPerformance.test.ts | Rewires imports + local user seeding module path. |
| automation/tests/ui-performance/draftsPerformance.test.ts | Rewires imports + local user seeding module path. |
| automation/tests/ui-performance/contactsPerformance.test.ts | Rewires imports + org seeding module path. |
| automation/tests/ui-performance/appStartupPerformance.test.ts | Rewires DB reset imports to db/databaseUtil. |
| automation/tests/ui-performance/accountsPerformance.test.ts | Rewires imports + local user seeding module path. |
| automation/tests/transactionTests.test.ts | Uses local suite bootstrap + per-test local seeding + environment setup. |
| automation/tests/settingsTests.test.ts | Uses local suite bootstrap + extracted settings restore flow helper. |
| automation/tests/registrationTests.test.ts | Rewires imports to new data/random and setup/sharedTestEnvironment. |
| automation/tests/organizationTransactionTests.test.ts | Uses org suite bootstrap + per-test org fixture; rewires utils imports. |
| automation/tests/organizationSettingsTests.test.ts | Uses org suite bootstrap + per-test org seeding; improves toast polling. |
| automation/tests/organizationRegressionTests.test.ts | Uses named org suite bootstrap + rewired utility imports (still skipped). |
| automation/tests/organizationNotificationTests.test.ts | Uses named org suite bootstrap + rewired utility imports (still skipped). |
| automation/tests/organizationGroupTests.test.ts | Uses org suite bootstrap + per-test org fixture + extracted group flows. |
| automation/tests/organizationContactListTests.test.ts | Adds per-test org nickname generation + extracted org sign-in helper. |
| automation/tests/loginTests.test.ts | Uses local suite bootstrap + per-test local seeding. |
| automation/tests/helpers/support/organizationNamingSupport.ts | Adds deterministic per-test organization nickname resolver. |
| automation/tests/helpers/support/organizationAuthSupport.ts | Adds small wrapper helper for org sign-in. |
| automation/tests/helpers/flows/settingsKeyRecoveryFlow.ts | Extracts settings key restore flow to reusable helper. |
| automation/tests/helpers/flows/organizationGroupFlow.ts | Extracts org group CSV flow to reusable helper. |
| automation/tests/helpers/flows/groupTransactionNavigationFlow.ts | Extracts shared group navigation + modal cleanup flow. |
| automation/tests/helpers/flows/groupTransactionFlow.ts | Extracts group transaction draft creation/edit flow + defaults. |
| automation/tests/helpers/fixtures/organizationAdvancedFixture.ts | Extracts org advanced fixture seeding/complex account setup. |
| automation/tests/helpers/bootstrap/organizationSuiteBootstrap.ts | Extracts org suite setup/teardown + naming helper. |
| automation/tests/helpers/bootstrap/localSuiteBootstrap.ts | Extracts local suite setup/teardown. |
| automation/tests/helpers/assertions/groupTransactionAssertions.ts | Extracts group transaction assertions to reusable class. |
| automation/tests/groupTransactionTests.test.ts | Uses local suite bootstrap + extracted group flows/assertions. |
| automation/services/TransactionEnvironmentService.ts | Updates key util import path to new crypto module. |
| automation/services/LocalnetPayerProvisioner.ts | Updates key util import path to new crypto module. |
| automation/services/AppBootstrapper.ts | Adds attach-mode local storage preservation behavior; rewires launcher/migration helpers. |
| automation/README.md | Documents shared-env + attach-mode execution model and new env flags. |
| automation/pages/TransactionPage.ts | Rewires imports to new network/db/data/runtime modules. |
| automation/pages/SettingsPage.ts | Rewires DB query import to new db/ module. |
| automation/pages/RegistrationPage.ts | Makes toast retrieval more robust by waiting for last visible toast. |
| automation/pages/OrganizationPage.ts | Rewires imports; normalizes tx id whitespace; increases retry budgets + adds diagnostic logging. |
| automation/pages/LoginPage.ts | Adds blocking-modal wait before sign-in; tweaks important-note modal handling. |
| automation/pages/GroupPage.ts | Switches CSV generator usage to return file path directly; rewires DB import. |
| automation/pages/ContactListPage.ts | Rewires imports to new mirror/db modules. |
| automation/pages/AccountPage.ts | Rewires DB import to new db/ module. |
| automation/k6/helpers/create-complex-accounts.ts | Updates crypto import path (currently with a broken extensionless import). |
| automation/example.env | Documents new env flags for local state/backend preservation. |
| automation/constants/index.ts | Re-exports app mode constants. |
| automation/constants/appMode.constants.ts | Defines ELECTRON_APP_MODES + TransactionToolAppMode type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… shared parallel E2E execution (#2582) Signed-off-by: yasenltd <yasenltd@gmail.com>
Description: This PR extracts reusable Playwright automation helpers and reorganizes shared utilities into domain-specific modules to reduce duplication and make the automation suite easier to maintain.
• Extract shared local and organization suite setup and teardown helpers
• Move repeated group, settings, and organization test actions into reusable flow helpers and fixtures
• Reorganize automation/utils into focused baselines, crypto, data, db, files, network, runtime, and setup modules
• Convert automationSupport into a thin re-export layer over the new utility modules
• Update automation pages, services, and tests to use the new module structure
Related issue(s):
Fixes #2598
Notes for reviewer:
This is primarily a test automation refactor with no intended functional changes. Review focus:
• extracted helpers under automation/tests/helpers
• utility moves and import rewiring under automation/utils
• suite setup/isolation changes for local and organization tests
Checklist
[ ] Documented (Code comments, README, etc.)
[ ] Tested (unit, integration, etc.)