test: add e2e pagination, property-based, and mutation CI tests#833
Open
Idaonoli wants to merge 1 commit into
Open
test: add e2e pagination, property-based, and mutation CI tests#833Idaonoli wants to merge 1 commit into
Idaonoli wants to merge 1 commit into
Conversation
…uture#711, Ethereal-Future#712, Ethereal-Future#713, Ethereal-Future#714) - e2e/tests/transaction-history.spec.js: Playwright spec covering initial load (20 rows), cursor-based next/prev navigation, final-page Next disabled state, empty-state illustration, 503 error with retry button, and a three-page uniqueness assertion (no duplicate transaction IDs). API responses are mocked via page.route() — no live server required. - property-tests/amountInput.property.test.js: fast-check property suite for the sanitization and display-formatting logic used by AmountInput. Covers 1000-run passes for: valid decimal strings pass through unchanged, non-numeric characters are stripped, negative sign is rejected, multiple dots collapse to one, Stellar 7 d.p. display cap, scientific-notation stripping, and round-trip numeric equality for valid Stellar amounts. - .github/workflows/mutation-testing.yml: add backend/src/services/** to path triggers (aligns with the stryker mutate scope) and remove continue-on-error so the job actually fails when the break threshold (50%) is breached. - stryker.config.mjs: add inline comments explaining the rationale for the break/low/high thresholds per acceptance criteria of Ethereal-Future#714. Closes Ethereal-Future#711, Ethereal-Future#712, Ethereal-Future#713, Ethereal-Future#714
|
@Idaonoli Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the missing test coverage identified in the four open issues, keeping each change strictly within the scope described.
closes #711 — E2E test for transaction history pagination
e2e/tests/transaction-history.spec.js(new, Playwright)addInitScriptso tests run without a login form./api/v1/transactions/*and/api/stellar/account/*/transactions) withpage.route()— no live Stellar network required.closes #712 — Snapshot tests for all design-system components
frontend/tests/snapshots.test.jsxalready covers every component infrontend/src/design-system/(Button — all 4 variants + 3 sizes + fullWidth + disabled + loading; Badge — all 5 variants; Card — header/footer/padding variants; Input — label/hint/error/fullWidth; Modal — all 3 sizes). The snapshot file is committed and CI runsviteston every PR, so drift fails the build automatically. No code change needed; this issue is resolved by existing committed tests.closes #713 — Property-based tests for AmountInput validation
property-tests/amountInput.property.test.js(new, fast-check)AmountInput.jsx:sanitize()(thehandleChangeregex pipeline) andformatDisplay()(theIntl.NumberFormatformatter).[0-9.]characters; non-numeric chars are always stripped; negative sign is stripped (component rejects negative inputs); multiple dots collapse to one while preserving all digit characters; scientific-notationeis stripped.922337203685.4775807), zero, and0.0000000all sanitize correctly.closes #714 — Mutation test coverage in CI
.github/workflows/mutation-testing.yml— two changes:backend/src/services/**to bothpushandpull_requestpath triggers (the strykermutatescope already coversbackend/src/services/*.js, but changes to those files were not triggering the job).continue-on-error: truefrom the "Run mutation tests" step so that a mutation score below thebreak: 50threshold now fails the CI job as intended.stryker.config.mjs— added inline comments explaining the rationale for each threshold value (break: 50,low: 60,high: 80) per the acceptance criteria.Test plan
npx playwright test e2e/tests/transaction-history.spec.js --project=chromium— all 5 specs greennpm run test:property—amountInput.property.test.jspasses all properties with 1000 runsbackend/src/services/(previously it would not)continue-on-errormasked this)npm run test— existing snapshot tests infrontend/tests/snapshots.test.jsxcontinue to pass with committed snapshots