teqo-backup/scripts/lib/e2e-affected-manifest.mjs
Francisco Ignácio Fontoura Solla 2e0cc2c03e chore(ci): parallel PR jobs, affected tests, push gate, owner-of-red-CI policy
- ci-pr.yml: split the serial checks job into parallel lint/format/
  typecheck/knip/cycles + unit/int (vitest --changed vs PR base via
  scripts/test-affected.mjs, full fallback on high-risk paths) + e2e
  (manifest path->spec via scripts/e2e-affected.mjs, blocking) + build;
  migration-lock gains checkout + pull-requests:read (fixes the failures
  that blocked PR #50)
- ci.yml (main): full safety net — seed:minimal + int full + build + e2e
- package.json: gate:fast / gate:push; .husky/pre-push runs gate:push
- docs: "Dono do PR, dono do CI" policy in AGENT-OPS + work-issue +
  engineering-standards; changelog entry; plans for OPS3-OPS7
2026-07-30 17:37:20 -03:00

85 lines
2.2 KiB
JavaScript

/**
* e2e manifest (OPS5): source path prefix → Playwright specs exercising it.
* e2e specs never import app code, so this curated table is the only source
* of truth. Granularity is the DOMAIN prefix on purpose — finer grains rot.
* Spec names exist as tests/e2e/<name>.e2e.spec.ts (pinned by unit test).
* Prefixes are repo-relative POSIX paths; matching is startsWith.
*/
const CAMPAIGN_APP = 'src/app/(campaign)/campanha/(app)'
export const E2E_AFFECTED_MANIFEST = [
{
prefixes: ['src/app/(payload)'],
specs: ['admin'],
},
{
prefixes: ['src/app/(frontend)'],
specs: ['frontend'],
},
{
prefixes: ['src/app/(campaign)/campanha/login', 'src/utilities/campaignAuth'],
specs: ['campaignAuth'],
},
{
prefixes: ['src/app/(campaign)/campanha/webauthn', 'src/utilities/webauthn'],
specs: ['campaignWebAuthn'],
},
{
prefixes: [
`${CAMPAIGN_APP}/municipios`,
'src/components/campaign/municipality',
'src/components/campaign/map',
'src/utilities/municipality',
],
specs: [
'campaignMunicipalities',
'campaignZoneMap',
'campaignNearestMunicipality',
'campaignSavedFilters',
'campaignColumnPicker',
],
},
{
prefixes: [
`${CAMPAIGN_APP}/atividades`,
'src/components/campaign/activity',
'src/utilities/activity',
],
specs: ['campaignActivity'],
},
{
prefixes: [
`${CAMPAIGN_APP}/liderancas`,
'src/components/campaign/leadership',
'src/utilities/leadership',
],
specs: ['campaignLeaderships'],
},
{
prefixes: [`${CAMPAIGN_APP}/territorios`, 'src/utilities/territory'],
specs: ['campaignTerritories'],
},
{
prefixes: [`${CAMPAIGN_APP}/conceitos`],
specs: ['campaignConcepts'],
},
{
prefixes: [
`${CAMPAIGN_APP}/page.tsx`,
`${CAMPAIGN_APP}/home-search`,
'src/components/campaign/dashboard',
'src/utilities/homeSearch',
'src/utilities/campaignDashboardData',
'src/lib/campaignHomeSearchHits',
],
specs: ['campaignHomeActions'],
},
{
prefixes: [
'src/components/campaign/shell',
`${CAMPAIGN_APP}/layout.tsx`,
'src/utilities/campaignPwa',
],
specs: ['campaign-pwa', 'campaignWizardChrome'],
},
]