v1.6.0 — PDF assertions, visual tag support, scrollToAnchor
Features
-
Support\Pdf(#54) — new thin wrapper aroundsmalot/pdfparserfor asserting on text extracted from a PDF (invoices, credit notes, delivery slips, e-tickets, gift cards). API:use PrestaFlow\Library\Support\Pdf; $pdf = Pdf::fromFile('/tmp/invoice.pdf'); // or fromString() $pdf->contains('VAT'); // case-insensitive by default $pdf->matches('/Invoice\s*#?\s*(\d+)/', 1); $pdf->pages(); // string[] per page
Adds
smalot/pdfparser ^2.11as a runtime dependency. 10 PHPUnit tests with a self-contained PDF fixture. -
visual[]block in results.json + tag support (#53) — each visual checkpoint is now tagged (name, tag), and comparison results (score, threshold, status, reference / actual / diff paths) are exported in thevisual[]block ofresults.json— groundwork for the API-side baseline + approve UI loop (MVP2). -
CommonPage::scrollToAnchor()(#48) — new helper to frame a viewport-mode capture (visualCheckpoint(null, null, x, false)) on a given CSS anchor instead of the top of the page (promo/header banners).
Fixes
- Visual HTML report — mobile-responsive layout (#49).
Docs
spec(visual): MVP2 design — full loop with API-side baseline and approve UI.
Upgrade
No breaking API change. composer update prestaflow/php-library:^1.6 (or dev-main).