con un clic
test-changed
// Run e2e and unit tests related to files changed on the current branch. Use after making code changes to verify nothing is broken.
// Run e2e and unit tests related to files changed on the current branch. Use after making code changes to verify nothing is broken.
Commit a logical unit of work with a descriptive message. Invoke after completing a meaningful chunk (component created, store wired, tests passing) to maintain small, reviewable commits.
Guide for building React components using @stellar/design-system and project SCSS conventions. Invoke when creating new components or reviewing component code.
Bridge Figma MCP output to Stellar Lab code conventions. Invoke after calling get_design_context to translate Figma's reference code into project-appropriate components, classes, and patterns.
Correct mental models for React re-renders and memoization. Use this skill when writing, reviewing, or optimizing React components to avoid common misconceptions about performance. Debunks the myth that "props cause re-renders" and teaches when memoization actually helps.
Reference for the two Zustand store patterns in Stellar Lab — main store (querystring) and transaction flow store (sessionStorage). Invoke when creating store slices, debugging hydration, or deciding where state belongs.
| name | test-changed |
| description | Run e2e and unit tests related to files changed on the current branch. Use after making code changes to verify nothing is broken. |
Run e2e and unit tests that are relevant to the files changed on the current branch.
jest.config.js, path aliases via moduleNameMapperplaywright.config.ts, Chromium only, 20s timeout per test, 2 retries, 2 workerspnpm dev automatically, but reuseExistingServer: true in non-CI — a stale server from another branch will cause false failuresKill any stale dev server on port 3000 before running e2e tests. Playwright's reuseExistingServer will pick up a server from a different branch otherwise, causing false failures (especially in worktrees):
lsof -ti:3000 | xargs kill -9 2>/dev/null; true
Find changed files relative to main:
git diff --name-only main...HEAD
git diff --name-only # unstaged
git diff --name-only --cached # staged
Map source changes to test files. Use these rules:
src/app/(sidebar)/transaction/build/** -> tests/e2e/buildTransaction.test.ts, tests/e2e/savedTransactions.test.ts, tests/e2e/urlParams.test.tssrc/app/(sidebar)/transaction/sign/** -> tests/e2e/signTransactionPage.test.tssrc/app/(sidebar)/transaction/submit/** -> tests/e2e/submitTransactionPage.test.tssrc/app/(sidebar)/transaction/simulate/** -> tests/e2e/simulateTransactionPage.test.tssrc/app/(sidebar)/transaction/fee-bump/** -> tests/e2e/feeBumpTransactionPage.test.tssrc/app/(sidebar)/account/fund/** or src/app/(sidebar)/account/create/** -> tests/e2e/fundAccountPage.test.ts, tests/e2e/createAccountPage.test.tssrc/app/(sidebar)/xdr/** -> tests/e2e/viewXdrToJsonPage.test.ts, tests/e2e/jsonToXdrPage.test.tssrc/app/(sidebar)/endpoints/** -> tests/e2e/endpointsPage*.test.tssrc/app/(sidebar)/smart-contracts/** -> tests/e2e/contractExplorer*.test.tssrc/components/**, src/helpers/**, src/hooks/**, src/store/**, src/constants/**, src/types/**, src/validate/**, src/styles/**, src/middleware.tstests/e2e/mock/** -> run ALL e2e tests that import from mock/tests/e2e/*.test.ts changed directly -> run those teststests/unit/** changed -> run unit testssrc/helpers/ or src/validate/ changed, also check tests/unit/ for matching unit testsIf XDR encoding or transaction building logic changed (e.g. ClassicTransactionXdr.tsx, SorobanTransactionXdr.tsx, src/helpers/xdr/), hardcoded hash/XDR values in tests may need updating. Flag this to the user before running tests.
Run the identified tests:
npx playwright test <file1> <file2> ... --retries=0 --reporter=listpnpm test:unit <file>pnpm test:e2e and pnpm test:unitReport results. Show pass/fail counts and list any failures with their error messages. For failures, read the relevant test code and source code to suggest fixes.