Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 5 additions & 27 deletions .eslint-baseline.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"generatedAt": "2026-05-25T17:05:20.939Z",
"totalErrors": 135,
"generatedAt": "2026-05-25T22:39:29.287Z",
"totalErrors": 127,
"counts": {
"src/components/access/DevAccessDeniedPage.tsx": {
"react-hooks/exhaustive-deps": 1
Expand Down Expand Up @@ -83,9 +83,6 @@
"src/components/bi/ClientSeasonalityHeatmap.tsx": {
"@typescript-eslint/no-non-null-assertion": 1
},
"src/components/catalog/CatalogHeader.tsx": {
"@typescript-eslint/no-unused-vars": 1
},
"src/components/collections/CollectionDetailHeader.tsx": {
"@typescript-eslint/no-unused-vars": 1
},
Expand Down Expand Up @@ -159,11 +156,7 @@
"src/components/layout/MainLayout.tsx": {
"react-hooks/exhaustive-deps": 1
},
"src/components/layout/SidebarReorganized.tsx": {
"@typescript-eslint/no-unused-vars": 1
},
"src/components/layout/sidebar/SidebarNavGroup.tsx": {
"react-hooks/exhaustive-deps": 1,
"eqeqeq": 2
},
"src/components/loading/SkeletonMonitor.tsx": {
Expand Down Expand Up @@ -245,9 +238,6 @@
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/no-non-null-assertion": 1
},
"src/components/products/ProductPersonalizationRules.tsx": {
"@typescript-eslint/no-unused-vars": 1
},
"src/components/products/ProductQuickActions.tsx": {
"@typescript-eslint/naming-convention": 1,
"@typescript-eslint/no-unused-vars": 1
Expand Down Expand Up @@ -291,9 +281,6 @@
"src/components/products/zoomable-gallery/useGalleryZoom.ts": {
"react-hooks/exhaustive-deps": 1
},
"src/components/providers/AppBootstrap.tsx": {
"@typescript-eslint/no-unused-vars": 1
},
"src/components/quotes/PdfGenerationDialog.tsx": {
"@typescript-eslint/no-unused-vars": 4
},
Expand Down Expand Up @@ -366,6 +353,9 @@
"src/components/search/VoiceSearchOverlayConnected.tsx": {
"react-hooks/exhaustive-deps": 1
},
"src/components/search/useGlobalSearch.ts": {
"@typescript-eslint/no-explicit-any": 3
},
"src/components/search/voice/VoiceOverlaySections.tsx": {
"@typescript-eslint/no-unused-vars": 3
},
Expand Down Expand Up @@ -424,12 +414,6 @@
"src/hooks/admin/useDevGate.ts": {
"react-hooks/exhaustive-deps": 1
},
"src/hooks/admin/useKillSwitchObservability.ts": {
"@typescript-eslint/no-explicit-any": 1
},
"src/hooks/admin/useSmokeTests.ts": {
"@typescript-eslint/no-explicit-any": 2
},
"src/hooks/auth/useAccessSecurity.ts": {
"@typescript-eslint/naming-convention": 5
},
Expand Down Expand Up @@ -497,9 +481,6 @@
"@typescript-eslint/naming-convention": 1,
"@typescript-eslint/no-non-null-assertion": 1
},
"src/lib/external-db/rest-native.ts": {
"@typescript-eslint/no-explicit-any": 3
},
"src/lib/feature-flags.ts": {
"@typescript-eslint/no-non-null-assertion": 1
},
Expand Down Expand Up @@ -538,9 +519,6 @@
"src/pages/admin/AdminExternalDbPage.tsx": {
"react-hooks/exhaustive-deps": 1
},
"src/pages/admin/ObservabilityDashboard.tsx": {
"eqeqeq": 1
},
"src/pages/admin/PermissionsPage.tsx": {
"react-hooks/exhaustive-deps": 1
},
Expand Down
236 changes: 236 additions & 0 deletions .github/workflows/e2e-flows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
name: E2E — Critical Flows & Error Boundaries

# Roda os novos specs de fluxo completo que validam jornadas E2E
# ponta-a-ponta: quote flow, catalog→kit, admin routes, error boundaries, mobile.
# Separado do e2e.yml principal para facilitar diagnóstico por categoria.

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

concurrency:
group: e2e-flows-${{ github.ref }}
cancel-in-progress: true

env:
TZ: America/Sao_Paulo
CI: "true"
FORCE_COLOR: "0"
VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL || 'https://doufsxqlfjyuvxuezpln.supabase.co' }}
VITE_SUPABASE_PUBLISHABLE_KEY: ${{ secrets.VITE_SUPABASE_PUBLISHABLE_KEY || 'sb_publishable_tjH5qAbZ0e5HTTd872NijQ_s9m6JvYU' }}
E2E_USER_EMAIL: ${{ secrets.E2E_USER_EMAIL }}
E2E_USER_PASSWORD: ${{ secrets.E2E_USER_PASSWORD }}

jobs:
e2e-error-boundaries:
name: E2E — Error Boundaries (sem auth)
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v5

- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm

- name: Install dependencies
run: npm ci --no-audit --no-fund

- name: Cache Playwright browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }}

- name: Install Playwright (chromium)
run: npx playwright install --with-deps chromium

- name: Pre-generate E2E fixtures
run: npm run e2e:generate-fixtures

- name: Start dev server
run: npm run dev &
env:
VITE_SUPABASE_URL: ${{ env.VITE_SUPABASE_URL }}
VITE_SUPABASE_PUBLISHABLE_KEY: ${{ env.VITE_SUPABASE_PUBLISHABLE_KEY }}

- name: Wait for server
run: timeout 120 bash -c 'until curl -sf http://localhost:8080 > /dev/null 2>&1; do sleep 1; done'

- name: Run Error Boundaries E2E
run: |
npx playwright test \
e2e/flows/28-error-boundaries.spec.ts \
--project=chromium-public \
--reporter=github,list,html,json \
--pass-with-no-tests
env:
E2E_BASE_URL: http://localhost:8080
PLAYWRIGHT_JSON_OUTPUT_NAME: playwright-report/results-error-boundaries.json
continue-on-error: true
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fail job when Playwright flow tests fail

This step is marked continue-on-error: true, and this workflow has no later gate that checks steps.*.outcome to convert failures back into a job failure; the only following step uploads artifacts. As a result, broken E2E specs are reported but the job still succeeds, so required checks will not block merges even when these tests fail.

Useful? React with 👍 / 👎.

id: e2e_error_boundaries

- name: Upload report
if: always()
uses: actions/upload-artifact@v5
with:
name: e2e-error-boundaries-report-${{ github.run_id }}
path: playwright-report/
retention-days: 7

e2e-full-flows:
name: E2E — Full User Flows (authed)
runs-on: ubuntu-latest
timeout-minutes: 30
if: >
github.event_name == 'push' ||
(github.event_name == 'pull_request' && vars.E2E_USER_EMAIL != '')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate authed PR job on configured secret source

The PR condition checks vars.E2E_USER_EMAIL, but this workflow sources credentials from secrets.E2E_USER_EMAIL/E2E_USER_PASSWORD into env. If only secrets are configured (the documented setup), e2e-full-flows is skipped on pull requests even though credentials exist, so the authenticated flow suite does not run in PR validation.

Useful? React with 👍 / 👎.


steps:
- uses: actions/checkout@v5

- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm

- name: Install dependencies
run: npm ci --no-audit --no-fund

- name: Cache Playwright browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }}

- name: Install Playwright (chromium)
run: npx playwright install --with-deps chromium

- name: Pre-generate E2E fixtures
run: npm run e2e:generate-fixtures

- name: Start dev server
run: npm run dev &
env:
VITE_SUPABASE_URL: ${{ env.VITE_SUPABASE_URL }}
VITE_SUPABASE_PUBLISHABLE_KEY: ${{ env.VITE_SUPABASE_PUBLISHABLE_KEY }}

- name: Wait for server
run: timeout 120 bash -c 'until curl -sf http://localhost:8080 > /dev/null 2>&1; do sleep 1; done'

- name: Setup auth state
run: |
if [ -n "$E2E_USER_EMAIL" ] && [ -n "$E2E_USER_PASSWORD" ]; then
npx playwright test --project=setup
fi
env:
E2E_BASE_URL: http://localhost:8080
continue-on-error: true

- name: Run Quote Full Flow E2E
run: |
npx playwright test \
e2e/flows/25-quote-full-flow.spec.ts \
--project=chromium-authed \
--reporter=github,list,html,json \
--pass-with-no-tests
env:
E2E_BASE_URL: http://localhost:8080
PLAYWRIGHT_JSON_OUTPUT_NAME: playwright-report/results-quote-flow.json
continue-on-error: true

- name: Run Catalog→Kit Flow E2E
run: |
npx playwright test \
e2e/flows/26-catalog-to-kit-flow.spec.ts \
--project=chromium-authed \
--reporter=github,list,html,json \
--pass-with-no-tests
env:
E2E_BASE_URL: http://localhost:8080
PLAYWRIGHT_JSON_OUTPUT_NAME: playwright-report/results-kit-flow.json
continue-on-error: true

- name: Run Admin Critical Routes E2E
run: |
npx playwright test \
e2e/flows/27-admin-critical-routes.spec.ts \
--project=chromium-authed \
--reporter=github,list,html,json \
--pass-with-no-tests
env:
E2E_BASE_URL: http://localhost:8080
PLAYWRIGHT_JSON_OUTPUT_NAME: playwright-report/results-admin-routes.json
continue-on-error: true

- name: Upload full flows report
if: always()
uses: actions/upload-artifact@v5
with:
name: e2e-full-flows-report-${{ github.run_id }}
path: playwright-report/
retention-days: 7
if-no-files-found: ignore

e2e-mobile:
name: E2E — Mobile Critical Routes
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v5

- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm

- name: Install dependencies
run: npm ci --no-audit --no-fund

- name: Cache Playwright browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }}

- name: Install Playwright (chromium)
run: npx playwright install --with-deps chromium

- name: Pre-generate E2E fixtures
run: npm run e2e:generate-fixtures

- name: Start dev server
run: npm run dev &
env:
VITE_SUPABASE_URL: ${{ env.VITE_SUPABASE_URL }}
VITE_SUPABASE_PUBLISHABLE_KEY: ${{ env.VITE_SUPABASE_PUBLISHABLE_KEY }}

- name: Wait for server
run: timeout 120 bash -c 'until curl -sf http://localhost:8080 > /dev/null 2>&1; do sleep 1; done'

- name: Run Mobile E2E specs
run: |
npx playwright test \
e2e/flows/29-mobile-critical-routes.spec.ts \
--project=routes-mobile \
--reporter=github,list,html,json \
--pass-with-no-tests
env:
E2E_BASE_URL: http://localhost:8080
PLAYWRIGHT_JSON_OUTPUT_NAME: playwright-report/results-mobile.json
continue-on-error: true

- name: Upload mobile report
if: always()
uses: actions/upload-artifact@v5
with:
name: e2e-mobile-report-${{ github.run_id }}
path: playwright-report/
retention-days: 7
if-no-files-found: ignore
Loading
Loading