test(dashmint-lab): add Playwright e2e suite#72
Conversation
Run against real testnet — no mocks. Covers browse-only queries, sub-tab visibility, How-it-works tab, sort cycling, rarity rendering, and the mint-tab login overlay. Write-tier flows are stubbed as skipped placeholders pending a login fixture. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds LoginModal entry-point coverage (sidebar + Mint overlay, Esc/backdrop close, advanced settings toggle), HowItWorks section + operations-table assertions, name-sort alphabetical verification, CardTile owner explorer link and overflow menu, browse-only Buy → LoginModal prompt, bogus contract-id resilience, and a mobile-drawer toggle smoke test. Ignores playwright-report/ and test-results/. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collapses 12 spec files into 5 (auth, browse, card, how-it-works, login-modal) and adds the dashproof-lab login-fixture pattern so auth-gated specs can reach features the read-only tier can't (TransferModal recipient validation). Also adds rarity/owner/price sort verifications, View-on-Explorer popup, Copy-ID clipboard read, and DPNS @username rendering. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A card with $price === 0n is considered unlisted everywhere else (CardTile.hasPrice, dashmint-lite). Aligning SetPriceModal so the modal shows "Set price" instead of "Change price" for zero-priced leftovers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…sion Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis change introduces comprehensive end-to-end testing infrastructure for dashmint-lab using Playwright, including configuration, custom fixtures with login helpers, and multiple test suites covering authenticated flows, browsing, card interactions, and modals. Supporting updates include documentation, npm scripts, a component logic adjustment for price handling, and Vitest configuration changes. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@example-apps/dashmint-lab/vite.config.ts`:
- Around line 28-29: The Vitest config's include pattern only matches
"*.test.{ts,tsx}" so spec files are ignored; update the include array in
vite.config.ts (the include property used with Vitest) to include both
"**/*.test.{ts,tsx}" and "**/*.spec.{ts,tsx}" (e.g., add the spec glob alongside
the existing test glob) so tests named *.spec.ts or *.spec.tsx under test/ are
discovered.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 792a200e-1f35-4868-9cfa-e2a0b4409268
⛔ Files ignored due to path filters (1)
example-apps/dashmint-lab/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (14)
example-apps/dashmint-lab/.gitignoreexample-apps/dashmint-lab/CLAUDE.mdexample-apps/dashmint-lab/README.mdexample-apps/dashmint-lab/package.jsonexample-apps/dashmint-lab/playwright.config.tsexample-apps/dashmint-lab/src/components/SetPriceModal.tsxexample-apps/dashmint-lab/test/SetPriceModal.test.tsxexample-apps/dashmint-lab/test/e2e/auth.spec.tsexample-apps/dashmint-lab/test/e2e/browse.spec.tsexample-apps/dashmint-lab/test/e2e/card.spec.tsexample-apps/dashmint-lab/test/e2e/fixtures.tsexample-apps/dashmint-lab/test/e2e/how-it-works.spec.tsexample-apps/dashmint-lab/test/e2e/login-modal.spec.tsexample-apps/dashmint-lab/vite.config.ts
Summary
dashmint-labthat runs against real Dash Platform testnet — no mocks, no fixtures faking SDK responses. Browse-only coverage runs without credentials; auth-gated coverage activates whenPLATFORM_MNEMONICis set.loginViaModal,HAS_MNEMONIC) is ported fromdashproof-laband adapted to dashmint-lab'sLoginModalstrings, so auth-gated specstest.skipcleanly when no mnemonic is configured.Bug fix included
Caught by the e2e SetPrice spec on a leftover-state run:
SetPriceModalwas treating$price === 0nas "listed" while every other surface (CardTile.hasPrice,dashmint-lite) treats zero as unlisted. AlignedSetPriceModaland added a Vitest regression test.Summary by CodeRabbit
Bug Fixes
Tests
Chores