Test password reset emails with the InboxIt SDK
Run a Playwright test that receives a reset link and signs in with the new password.
1. Prepare your workspace and test app
Create an API key, select Workspace-wide under Inbox access, and grant inboxes:create, inboxes:read and messages:read. Set INBOXIT_API_KEY and INBOXIT_WORKSPACE_ID to the key and workspace UUID. Set TEST_APP_ORIGIN and RESET_FIXTURE_TOKEN for your test app. Adapt the example’s user-seeding step, page routes, form labels and reset link format to your app.
2. Copy and run the example
Install the SDK in your test project. Copy the files below to the same relative paths used in the example repository, then run the Playwright test. Your test app can keep its current sending provider.
npm install @inboxit/inboxit-sdk
npm install --save-dev @playwright/test
npx playwright install chromium
npx playwright test --config examples/playwright/playwright.config.mjs3. Check the result
The test waits for the Sandbox to become active and starts listening before it triggers the reset. It follows a matching link on the test app’s own origin, changes the password, and checks sign-in. It deletes the temporary inbox when the test exits.