Closes DOCS-1210 Closes DOCS-1209 #48226 needs to merge first for CI failure ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Test coverage and several small bug fixes discovered during implementation. ## What is the current behavior? Nothing verified that `pnpm run dev:docs` keeps working without private credentials. We value this command working, especially for community contributors. However, this issue can go undetected by employees at Supabase since many of us have credentials in place. We do not want this to go a week before finding and fixing like in the previous instance. ## What is the new behavior? - **New Playwright test suite**: `e2e/docs/local-smoke/no-credentials.spec.ts` boots the docs dev server with zero GitHub App/Supabase secrets and checks 5 routes covering each known failure point. - **CI**: a new `local-dev-smoke` job in `docs-tests.yml` runs this suite with no credentials configured. ## Additional bugs resolved Setting up this test exposed other issues that are fixed in this PR: - **Troubleshooting.utils.ts crash** — Unguarded Supabase call pattern, crashing every troubleshooting article. Added the same guard as previous fixes. - **Missing manifest.json** — middleware.ts statically imports public/markdown/manifest.json, which is gitignored and only generated by a build step that's skipped in local dev. On a fresh checkout it doesn't exist, so middleware fails to compile and takes down every page. Fixed by committing a placeholder [] (real builds still regenerate the full file). - **Phantom @code-hike/mdx import** — apps/docs/app/layout.tsx imported @code-hike/mdx/styles.css, but only apps/www actually declares that dependency. Worked by accident whenever both apps were installed together; broke in CI's docs-only install. Turned out to be dead code (nothing in docs actually uses code-hike), so fixed by deleting the unused imports rather than adding the dependency. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit * **New Features** * Added a credential-free “local smoke” end-to-end test suite for key documentation routes. * **Bug Fixes** * Improved troubleshooting behavior when required external service credentials are missing. * Updated federated “wrappers” documentation pages to gracefully show a fallback message when external content can’t be fetched. * **Tests** * Added a dedicated local-smoke Playwright runner and enhanced CI path-based triggering and reporting (failure-focused artifacts). * **Chores** * Refined docs workflow path filters and adjusted docs markdown manifest/ignore rules for generated content. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Supabase Docs E2E Tests
Playwright end-to-end tests for the docs site under apps/docs.
Add new docs journeys under features/. They all run together as one suite.
Setup
Install the Playwright browser once from this directory:
cd e2e/docs
pnpm exec playwright install chromium
Choosing a target URL
Tests run against whatever PLAYWRIGHT_BASE_URL points to, defaulting to the
local docs dev server at http://localhost:3001.
-
Local docs server — in a separate terminal, start docs from the repo root:
pnpm dev:docs -
A deployed site — set the base URL inline:
PLAYWRIGHT_BASE_URL=https://supabase.com pnpm e2e:docs
If the target is a protected Vercel preview, also set
VERCEL_AUTOMATION_BYPASS_SECRET so the tests can bypass deployment protection.
The local docs server requires a full monorepo install and credentials for some content, so the quickest way to run the suite is against a deployed site. Reach for the local server only when you need to test unpublished content changes.
Running the tests
From the repo root:
pnpm e2e:docs
Or from this directory:
pnpm run e2e:docs
UI mode for debugging
pnpm e2e:docs:ui
Run a single file
pnpm run e2e:docs -- features/<name>.spec.ts
Debugging
-
View the HTML report after a run:
pnpm -C e2e/docs exec playwright show-report -
Traces and screenshots for failures are saved in
test-results/.
CI
.github/workflows/docs-e2e.yml runs this suite on pull requests that touch the
tested docs pages or e2e/docs. When the PR changes apps/docs, the workflow
waits for the matching Vercel preview and points PLAYWRIGHT_BASE_URL at it.
When only the harness or workflow changes, Vercel skips the docs preview, so
the suite falls back to production. Draft PRs are skipped until marked ready
for review. The workflow can also be triggered manually with an optional
base_url input that defaults to production.