mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
The page scan stops at the article wrapper, so nothing checked the top nav, sidebar nav, table-of-contents sidebar, breadcrumbs, or footer. A violation in any of those lands on every docs page. Adds a global-elements Playwright project that scans the document with the article excluded, across six pages, one per layout, at two viewports, plus one pass with the mobile menu open. It runs from a docs_components paths filter in the existing workflow, so a content-only pull request never triggers it. Rules that pass today are enforced, so they catch a newly introduced violation without failing on existing debt. Everything else annotates. Supersedes #48909, which predated e2e/shared.
18 lines
536 B
JavaScript
18 lines
536 B
JavaScript
#!/usr/bin/env node
|
|
import { dirname, join } from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
import { runSuite } from '../../shared/run-suite.ts'
|
|
|
|
// Fixed page list, so unlike `pnpm e2e:docs` this resolves nothing from git.
|
|
runSuite({
|
|
root: join(dirname(fileURLToPath(import.meta.url)), '..'),
|
|
label: 'docs',
|
|
devCommand: 'pnpm dev:docs',
|
|
defaultBaseUrl: 'http://localhost:3001',
|
|
project: 'global-elements',
|
|
}).catch((error) => {
|
|
console.error(error instanceof Error ? error.message : error)
|
|
process.exit(1)
|
|
})
|