Skip to content

Transaction Dashboard: Call Stack Trace tab tests#2126

Merged
quietbits merged 3 commits into
mainfrom
issue-1857
Jun 29, 2026
Merged

Transaction Dashboard: Call Stack Trace tab tests#2126
quietbits merged 3 commits into
mainfrom
issue-1857

Conversation

@quietbits

Copy link
Copy Markdown
Contributor
  • Refactored code to create helpers to test with unit tests
  • Basic e2e tests

Copilot AI review requested due to automatic review settings June 26, 2026 14:37
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Jun 26, 2026
@quietbits quietbits linked an issue Jun 26, 2026 that may be closed by this pull request
@stellar-jenkins-ci

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds automated coverage for the Transaction Dashboard’s Call stack trace tab by extracting UI-specific formatting/truncation logic into standalone helpers with unit tests, and by introducing Playwright e2e tests plus fixtures that exercise key UI states.

Changes:

  • Refactors CallStackTrace to use new helper modules (truncateParams, hasEllipsisAnywhere, toErrorMapData, isAsset, renderAssetString) and adds data-testid hooks to support e2e testing.
  • Adds unit tests for the new call-stack-trace helper functions.
  • Adds Playwright e2e tests and mocked getTransaction RPC responses for empty/success/failure/long-params scenarios.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/unit/callStackTrace/truncateParams.test.ts Adds unit coverage for param truncation behavior.
tests/unit/callStackTrace/toErrorMapData.test.ts Adds unit coverage for converting error values into renderable nodes.
tests/unit/callStackTrace/renderAssetString.test.ts Adds unit coverage for asset string display formatting.
tests/unit/callStackTrace/isAsset.test.ts Adds unit coverage for asset-string detection.
tests/unit/callStackTrace/hasEllipsisAnywhere.test.ts Adds unit coverage for ellipsis detection in nested structures.
tests/e2e/txDashCallStackTrace.test.ts Adds e2e tests validating call stack trace UI behavior (alerts, truncation, chevrons, links).
tests/e2e/mock/txCallStackTrace.ts Adds minimal mocked getTransaction responses for e2e scenarios.
src/helpers/callStackTrace/truncateParams.ts Extracts param truncation logic into a reusable helper.
src/helpers/callStackTrace/toErrorMapData.ts Extracts error-to-renderable-node conversion helper.
src/helpers/callStackTrace/renderAssetString.ts Extracts asset display formatting helper.
src/helpers/callStackTrace/isAsset.ts Extracts asset detection helper.
src/helpers/callStackTrace/hasEllipsisAnywhere.ts Extracts ellipsis detection helper.
src/constants/networkLimits.ts Updates generated network limits constants.
src/app/(sidebar)/transaction/dashboard/components/CallStackTrace.tsx Integrates helpers + adds test ids for e2e selectors.
.gitignore Updates ignored paths and normalizes env entry formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/helpers/callStackTrace/hasEllipsisAnywhere.ts
Comment thread src/helpers/callStackTrace/truncateParams.ts
Comment thread tests/unit/callStackTrace/hasEllipsisAnywhere.test.ts
Comment thread tests/unit/callStackTrace/truncateParams.test.ts
Comment thread tests/e2e/txDashCallStackTrace.test.ts Outdated
Comment thread src/helpers/callStackTrace/truncateParams.ts
@stellar-jenkins-ci

Copy link
Copy Markdown

@quietbits quietbits requested a review from jeesunikim June 26, 2026 17:28
@quietbits quietbits merged commit cda0ff3 into main Jun 29, 2026
7 checks passed
@quietbits quietbits deleted the issue-1857 branch June 29, 2026 13:03
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Transaction Dashboard: Add Call Stack Trace tab tests

3 participants