fix(pdf): bundle the branding assets into the app (no fetch at export), export returns its warnings and the editor reports missing elements
This commit is contained in:
1 parent
80e95ca61d
commit
293a6e0b36
22 files changed
+199
-185
No files matched your search
@@ -31,9 +31,6 @@ let findings: Finding[]
|
||||
let unresolvedFindings: number
|
||||
|
||||
beforeAll(async () => {
|
||||
// No logo served: the branding loader leaves every slot empty.
|
||||
globalThis.fetch = (async () =>
|
||||
new Response('not found', { status: 404 })) as typeof fetch
|
||||
sheet = await loadTestSheet()
|
||||
const leaves = legacyLeaves(loadLegacyBaseline())
|
||||
const v2 = leavesAsV2Report(leaves)
|
||||
@@ -60,7 +57,9 @@ describe('the 612 legacy leaves in the application', () => {
|
||||
})
|
||||
|
||||
it('keeps every finding, resolved or not, through an archive PDF export and import', async () => {
|
||||
const bytes = await exportReportToPdf(report, sheet, { locale: 'fr' })
|
||||
const { pdf: bytes } = await exportReportToPdf(report, sheet, {
|
||||
locale: 'fr',
|
||||
})
|
||||
const back = await importReportFromPdf(bytes, sheet.sheet.migrationMap)
|
||||
expect(back.migrated).toBe(false)
|
||||
expect(back.origin).toBe('envelope_v1')
|
||||
|
||||
Reference in new issue
Block a user