From 2f31dd2b870c86d082c148df19309971056da7c0 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Mon, 28 Sep 2026 15:55:41 -0300 Subject: [PATCH] chore: clean repository migration artifacts Co-Authored-By: Claude Sonnet 5 --- .gitignore | 2 +- maquina-comercial-pessoal/task-10-report.md | 83 --------------------- 2 files changed, 1 insertion(+), 84 deletions(-) delete mode 100644 maquina-comercial-pessoal/task-10-report.md diff --git a/.gitignore b/.gitignore index 4a9d73e..d0fddc4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ Thumbs.db .env .env.* -!.env.example +!*.example diff --git a/maquina-comercial-pessoal/task-10-report.md b/maquina-comercial-pessoal/task-10-report.md deleted file mode 100644 index 467e306..0000000 --- a/maquina-comercial-pessoal/task-10-report.md +++ /dev/null @@ -1,83 +0,0 @@ -# Task 10: Real Browser Acceptance and Final Verification - -## Files Created/Modified - -| Action | File | -|--------|------| -| Modified | `package.json` (added `test:browser` script) | -| Created | `playwright.config.mjs` | -| Created | `tests/browser/server.mjs` | -| Created | `tests/browser/campaign-pilot.spec.mjs` | - -## Test Results - -### `npm test` — All Node tests: **370 passed, 0 failed** -- All server, campaign, outreach, message, schedule, worker, store, auth, WhatsApp manager, and integration tests pass. - -### `npm run test:browser` — Playwright tests: **42 passed, 0 failed** -- **Desktop (1440×900):** 21/21 passed -- **Mobile (390×844):** 21/21 passed -- No console errors detected during any test. - -### `npm audit --omit=dev` — **0 vulnerabilities** - -## Test Coverage Summary - -| Test Area | Status | -|-----------|--------| -| Login with seeded admin credentials | ✅ | -| Campaign cards (status, week, limit) | ✅ | -| Separate manual/automatic limits display | ✅ | -| Campaign prepare creates queue items | ✅ | -| Preview rows show server-rendered text | ✅ | -| Per-row removal works | ✅ | -| Approval flow (transactional, scheduled, campaign→ready) | ✅ | -| Pause with explicit reason | ✅ | -| Start on paused/ready campaign with scheduled items | ✅ | -| Stage classification via API | ✅ | -| Appointment/demo scheduling form | ✅ | -| Pending replies endpoint | ✅ | -| Metrics endpoint (segmento + variant filters) | ✅ | -| UI: Pending replies section visible | ✅ | -| UI: Stage classification section renders | ✅ | -| UI: Appointment form renders | ✅ | -| UI: Metrics section with filter selects | ✅ | -| Fake provider send count remains zero | ✅ | -| Mobile viewport: cards visible, full-width controls | ✅ | - -## Smoke Check Instructions - -### 1. Migration v15 Verification -Start the app with `npm start`. Check `schema_migrations` table has version 15: -```sql -SELECT MAX(version) FROM schema_migrations; -``` - -### 2. Server-Restart Campaign Pause -Start the app, go to Campanhas tab. Verify all 3 campaigns show as `Pausada`. Hover the pause reason chip to confirm no unexpected text. - -### 3. WhatsApp Status Display -Open Configurações. The WhatsApp connection state chip will show `Parado` initially. Click "Conectar / gerar QR" only when ready to pair a device. - -### 4. Campaign Preview -In Campanhas tab, click "Preparar fila" on any campaign card. The queue table should appear with rendered messages and selection reasons. - -### 5. Manual/Automatic Counters -Each campaign card shows `Manual: 0/10` and `Automático: 0/10`. These increment independently — manual sends count toward `Manual` only, campaign sends count toward `Automático` only. - -### 6. Queue Approval -After preparing, select items and click "Aprovar fila". Approved items become `scheduled` and remaining preview items are cancelled with reason `removed_by_operator`. Campaign status changes to `Pronta`. - -### 7. Pending-Reply UI -The "Respostas pendentes" section lists leads classified as `respondeu`. Use the "Classificar" button to move leads through the commercial funnel stages. - -### 8. Mobile Layout -Open DevTools (F12) and toggle device toolbar (Ctrl+Shift+M). Select a mobile viewport (390×844). Verify: -- Campaign cards stack vertically -- Tables scroll horizontally -- Controls are full-width -- No layout breakage - -## Safety Confirmation -- **Real provider never contacted**: All 42 browser tests use a fake WhatsApp manager that records send attempts in memory. Zero real sends occurred (asserted in test). -- **Isolated database**: Each test run uses a temporary SQLite database created via `fs.mkdtempSync` and deleted on teardown.