Open olemartinorg opened 1 year ago
@bjosttveit I thought of this, in relation to the new Percy tests.. Right now I've restructured so that all-process-steps.ts
is the only test setting the cookie to generate PDFs on the frontend-test
app. And, it tests that the files are present in the receipt. What if we download those files, identify which process step each of them are for, display them in the browser (using pdf.js
if Cypress isn't able to) and perform a snapshot so that Percy can notify us if there's differences?
To achieve this, I think we'll need:
frontend-test
load the frontend js/css from the correct location, even inside the PDF service container. Possibly by forwarding a cookie, and using that in Index.cshtml
? 🤔 Would only need to work for that app, not every app.percy.css
for that app when running in the PDF service?)What do you think? I think that would help to get some test coverage for these generated PDFs.
Sounds good to me!
In #861 I took a mental note that automatic PDF generation might not work after my (extensive) changes. Sadly, PDF crashes immediately, but no cypress test ever alerted me of that fact.
pdfFormat
API response with different resultssummary.ts
for inspiration)excludeFromPdf
(also inside repeating groups)