Skip to content

ci: add GitHub Actions workflow for frontend E2E testing (#1262) - #1288

Merged
p3ris0n merged 22 commits into
BCPathway:mainfrom
GhulamMustufa:feature/1262-create-github-actions-ci-workflow-for-automated-frontend-e2e
Oct 21, 2026
Merged

p3ris0n merged 22 commits into
BCPathway:mainfrom
GhulamMustufa:feature/1262-create-github-actions-ci-workflow-for-automated-frontend-e2e

Conversation

@GhulamMustufa

Copy link
Copy Markdown
Contributor

Overview

Configure .github/workflows/frontend-e2e.yml running build, lint, unit tests, and the Playwright E2E matrix on every pull request and push to main, closing #1262.

Closes #1262


Scope & Changes Made

1. GitHub Actions CI Workflow (.github/workflows/frontend-e2e.yml) [Core Deliverable]

  • Triggers: Pull requests affecting react/**, sdk/**, or .github/workflows/frontend-e2e.yml, plus push to main and manual dispatch.
  • Environment: Node.js 22 LTS with caching.
  • Pipeline: Installs workspace and demo dependencies, builds SDK & React packages, runs linter and unit tests (166 tests passing), installs Playwright Chromium with OS dependencies, and runs npm run e2e.
  • Diagnostics: Automatically uploads Playwright HTML report and traces as GitHub Actions artifacts on failure.

2. E2E Test Fixtures & Navigation (react/e2e/)

  • react/e2e/stubs.ts:
    • Replaced invalid dummy key with a valid checksummed ed25519 Stellar address (GBX6IWES6LXR37NISD3DKBJSSWEGGY6UB5PSL3UVTJEZRIJ4GUPJAWVE).
    • Replaced invalid simulation XDR 'AAAAAQAAAAA=' with authentic 4-byte xdr.ScVal.scvVoid() base64 'AAAAAQ==' to prevent @stellar/stellar-sdk unhandled buffer overflow during buildUnsignedTransaction.
    • Added sequence 1000 response handler to getLedgerEntries mock.
  • Spec Navigation (mint.spec.ts, burn.spec.ts, transfer.spec.ts, roles.spec.ts, vaults.spec.ts):
    • Replaced hard browser reloads (page.goto('/#/screen')) with UI link navigation (page.getByTestId('nav-...').click()) to preserve in-memory wallet connection state across screens during user flows.

3. State & Context Integration (react/src/screens/ & sdk/src/)

As outlined in the Phase 3 scope ("Integrate with existing contexts (BcForgeProvider, WalletProvider) and SDK methods where applicable"):

  • react/src/screens/VaultsScreen.tsx: Added fallback to context wallet adapter (useWalletContext().adapter / contextClient.getWalletAdapter()) so VaultsScreen can sign deposit and withdraw transactions when rendered inside <WalletProvider>.
  • sdk/src/vaultClient.ts: Enhanced invokeContract to accept a WalletAdapter as the transaction signer without requiring a raw secret Keypair.
  • sdk/src/client.ts: Added fallback to response.txHash when reading transaction results from Soroban RPC to ensure compatibility across RPC versions.

Verification & Test Results

  • Playwright E2E Suite: 17/17 tests passing (13.5s) on GitHub Actions CI (Run #39143824995).
    • mint.spec.ts: 3/3 passed
    • burn.spec.ts: 3/3 passed
    • transfer.spec.ts: 3/3 passed
    • roles.spec.ts: 6/6 passed
    • vaults.spec.ts: 2/2 passed
  • Unit Tests: 16/16 test suites passed (166 unit tests).
  • Visual Snapshots: Passing.
  • Mergeability: Clean merge against upstream/main with zero conflicts.

@p3ris0n
p3ris0n force-pushed the feature/1262-create-github-actions-ci-workflow-for-automated-frontend-e2e branch from ebf415f to 15dfae5 Compare October 20, 2026 21:34
GhulamMustufa and others added 22 commits October 21, 2026 08:43
Added step to install React demo dependencies before running tests.
@p3ris0n
p3ris0n force-pushed the feature/1262-create-github-actions-ci-workflow-for-automated-frontend-e2e branch from 6a88f61 to c2a4212 Compare October 21, 2026 07:51
@p3ris0n
p3ris0n merged commit d953128 into BCPathway:main Oct 21, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Phase 3] Create GitHub Actions CI Workflow for Frontend E2E

2 participants