Skip to content

Set up TestDriver with sample E2E tests for production - #2

Open
testdriverai[bot] wants to merge 2 commits into
mainfrom
testdriver/set-up-testdriver-with-sample-e2e-tests-for-prod
Open

testdriverai[bot] wants to merge 2 commits into
mainfrom
testdriver/set-up-testdriver-with-sample-e2e-tests-for-prod

Conversation

@testdriverai

@testdriverai testdriverai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Closes #1.

Sets up TestDriver in this repo and adds two short, passing end-to-end tests that run against the production deployment (https://downshift-items.vercel.app — the repo's Vercel homepage).

This app has no authentication, cart, or login (per README.md), so no credentials/fixtures were needed — the tests exercise the real product-discovery flows.

Tests (tests/catalog.test.mjs)

  1. Catalog loads — verifies the discovery page renders the product grid, FILTER BY sidebar, SORT control, and total product count.
  2. Search filters the catalog — types linen into the sidebar search box and asserts the results narrow to linen products (at least one card titled "Linen").

Both pass — 2/2 green against production:

loads the catalog and shows products by default — ✅ passed
Test Recording
📊 Test run report

filters the catalog when searching for 'linen' — ✅ passed
Test Recording
📊 Test run report

Setup notes

  • The E2E tests live in tests/** with their own Vitest config, vitest.config.testdriver.mjs — kept separate from the app's existing unit tests (src/**/*.test.ts) so pnpm test and the E2E suite never collide. Run them with:
    npx vitest run --config vitest.config.testdriver.mjs
  • Adds testdriverai + vitest devDeps, a .github/workflows/testdriver.yml CI workflow, and ignores .env / .testdriver/.

Running in CI

The recommended way to run this in CI is the published testdriverai/action with GitHub OIDC — it mints a token and exchanges it for your team's key at run time, so there's no TD_API_KEY secret to add or rotate. One-time: authorize the TestDriver GitHub App for the org at https://console.testdriver.ai. (If your runner can't use OIDC, fall back to adding a TD_API_KEY repo secret.)

@vercel

vercel Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
downshift-items Error Error Jul 21, 2026 10:51pm

This branch had an error being deployed

1 failed deployment
Preview — b1b3310e Deployed Jul 21, 2026 by vercel[bot]
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.

Set up TestDriver

0 participants