duplication-notes.md
1 month ago
flow-test-matrix.md
1 month ago
php-file-metrics.tsv
1 month ago
security-checklist-results.md
1 month ago
flow-test-matrix.md
25 lines
| 1 | # Flow–test matrix |
| 2 | |
| 3 | Maps user-visible or contract-critical behavior to automated tests. Update when adding flows or tests. |
| 4 | |
| 5 | | Flow | User-visible / contract outcome | PHPUnit | Playwright | Gap action | |
| 6 | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------- | |
| 7 | | Plugin bootstrap | Plugin loads without fatal | — | — | Add smoke PHPUnit boot test if regressions appear | |
| 8 | | Ads CRUD (model) | Ad entities persist and validate | `tests/Unit/Ads/CRUDTest.php`, `FactoryTest.php`, `TypesTest.php`, `ManagerTest.php`, `Concrete/*` | `tests/Acceptance/Admin/Ads/listing.spec.ts`, `new.ad.spec.ts` | Extend E2E for edit/delete if not covered | |
| 9 | | Ad admin labels | Labels render correctly in UI | `tests/Unit/Shortcodes/TheAdShortcodeSecurityTest.php` (shortcode/security) | `tests/Acceptance/Admin/Ads/ad.label.spec.ts` | Align naming: shortcode vs admin label scope | |
| 10 | | Groups CRUD | Groups persist | `tests/Unit/Groups/CRUDTest.php`, `FactoryTest.php`, `TypesTest.php`, `ManagerTest.php` | `tests/Acceptance/Admin/Groups/listing.spec.ts` | Add E2E for create group if product-critical | |
| 11 | | Placements CRUD | Placements persist | `tests/Unit/Placements/CRUDTest.php`, `FactoryTest.php`, `TypesTest.php`, `ManagerTest.php`, `PlacementTest.php` | `tests/Acceptance/Admin/Placements/listing.spec.ts` | Add E2E for placement attach to content | |
| 12 | | In-content injection | XPath/CSS injection rules | `tests/Unit/Core/InContentInjectorXPathTest.php`, `InContentInjectorCssSelectorTest.php` | — | Add Playwright front post with placement if feasible | |
| 13 | | Public post shortcode | `[the_ad]` renders on singular post | — | `tests/Acceptance/Frontend/post-shortcode-renders.spec.ts` | Add placement-only front test if needed | |
| 14 | | Importers API | Import contracts | `tests/Unit/Importers/ApiTest.php` | — | Manual or E2E for full XML upload path | |
| 15 | | License utilities | License helper behavior | `tests/Unit/Utilities/LicenseTest.php` | — | E2E for activate/deactivate if revenue-critical | |
| 16 | | WordPress utilities | Wrapper utilities | `tests/Unit/Utilities/WordPressTest.php` | — | Keep unit-level; no E2E required | |
| 17 | | Admin dashboard | wp-admin home loads for editor | — | `tests/Acceptance/Admin/homepage.spec.ts` | Add PHPUnit for capability-gated menu if needed | |
| 18 | | Auth / storage | Playwright auth fixture | — | `tests/Acceptance/Fixtures/auth.setup.ts` | Document secrets / `auth.json` in CI (already in workflow) | |
| 19 | |
| 20 | ## Coverage notes |
| 21 | |
| 22 | - **PHPUnit:** 24 test classes under `tests/Unit/` (see glob in health report). |
| 23 | - **Playwright:** Admin specs + `tests/Acceptance/Frontend/post-shortcode-renders.spec.ts` + setup; `frontend` project depends on `setup` so `auth.json` exists before frontend tests run. |
| 24 | - **Frontend E2E:** Shortcode-on-post rendering is covered; **placement-only** public output and logged-out visitors remain good follow-ups. |
| 25 |