Skip to content

Conversation

@alberto-crossmint
Copy link
Contributor

@alberto-crossmint alberto-crossmint commented Sep 29, 2025

Description

Implements end-to-end Playwright testing scaffolding for the @crossmint/wallets-sdk package as requested by @alberto-crossmint. This adds:

  • Complete E2E test setup under packages/wallets/e2e/
  • GitHub Actions workflow that runs on PRs and main branch pushes
  • Sample test for getOrCreateWallet using real Crossmint staging environment
  • Browser-based test harness using Vite (required since getOrCreateWallet is client-side only)

⚠️ Current Status: Test fails due to API key requirements

The test requires a CLIENT API key (ck_staging_...) to be configured as the CROSSMINT_STAGING_API_KEY GitHub secret. Server keys (sk_staging_...) will fail because getOrCreateWallet can only be called from client-side code.

Test plan

  • Added comprehensive E2E test for getOrCreateWallet that verifies wallet creation succeeds and returns an address
  • Test runs in browser environment using Playwright + Vite harness to satisfy client-side API requirements
  • CI workflow validates the E2E test passes on every PR and main branch push
  • Local testing verified with proper client API key setup

Human Review Checklist

Critical items to verify:

  • API Key Security: Confirm CROSSMINT_STAGING_API_KEY GitHub secret is configured with a CLIENT key (ck_staging_...), not server key
  • Test Approach: Validate browser-based harness approach vs direct SDK testing is appropriate for client-side-only methods
  • Real API Dependency: Review implications of tests hitting live staging environment (reliability, cleanup, rate limits)
  • Parameter Passing: URL parameter approach for test configuration is unconventional - confirm this is acceptable
  • CI Dependencies: Playwright browser installation adds complexity - ensure this is justified

Package updates:

  • Added @playwright/test: 1.54.2, vite: ^5.4.0, dotenv: ^16.3.1, dotenv-cli: ^7.4.1 to wallets package devDependencies
  • No changesets required as these are dev-only dependencies

Link to Devin run: https://app.devin.ai/sessions/952ab99d26c64024857ab74ca3e680fc
Requested by: @alberto-crossmint

devin-ai-integration bot and others added 2 commits September 29, 2025 09:12
…nt/wallets-sdk

Co-Authored-By: Alberto García <alberto@paella.dev>
Co-Authored-By: Alberto García <alberto@paella.dev>
@devin-ai-integration
Copy link
Contributor

Original prompt from Alberto
In this crossmint-sdk repository, I'd like to implement end to end testing for my wallet package in packages/wallets

You should use playwright for that, and it should use the real Crossmint staging environment for all API operations. The API key will be provided via environment variable

Create the scaffolding for that: 
- Playwright test suite
- Script under package.json to run the test (should work locally using .env and in github actions)
- CI job to run tests and report results, run on each PR and main branch
- Sample test that tests calling the getOrCreateWallet and checks it succeeded

Prioritize making the code elegant

You only need to look in the following repo: Crossmint/crossmint-sdk

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@changeset-bot
Copy link

changeset-bot bot commented Sep 29, 2025

⚠️ No Changeset found

Latest commit: aa62920

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Sep 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
crossmint-sdk-quickstart-devkit Ready Ready Preview Comment Sep 29, 2025 9:58am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
smart-wallet-auth-demo Ignored Ignored Sep 29, 2025 9:58am

…example

Co-Authored-By: Alberto García <alberto@paella.dev>
devin-ai-integration bot and others added 2 commits September 29, 2025 09:34
Co-Authored-By: Alberto García <alberto@paella.dev>
Co-Authored-By: Alberto García <alberto@paella.dev>
Co-Authored-By: Alberto García <alberto@paella.dev>
devin-ai-integration bot and others added 2 commits September 29, 2025 09:52
Co-Authored-By: Alberto García <alberto@paella.dev>
…pecs

Co-Authored-By: Alberto García <alberto@paella.dev>
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.

2 participants