Repository navigation
Set up TestDriver with sample E2E tests for production - #2
Open
testdriverai[bot] wants to merge 2 commits into
Open
testdriverai[bot] wants to merge 2 commits into
testdriverai[bot] wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Closed
This branch had an error being deployed
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.
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)lineninto 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 run report
filters the catalog when searching for 'linen' — ✅ passed

📊 Test run report
Setup notes
tests/**with their own Vitest config,vitest.config.testdriver.mjs— kept separate from the app's existing unit tests (src/**/*.test.ts) sopnpm testand the E2E suite never collide. Run them with:testdriverai+vitestdevDeps, a.github/workflows/testdriver.ymlCI workflow, and ignores.env/.testdriver/.Running in CI
The recommended way to run this in CI is the published
testdriverai/actionwith GitHub OIDC — it mints a token and exchanges it for your team's key at run time, so there's noTD_API_KEYsecret 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 aTD_API_KEYrepo secret.)