Skip to content

Commit f0f499a

Browse files
AntoLCOvgodd
authored andcommitted
fixup! ✅(e2e) add test for accessible html export from export modal
1 parent 624879f commit f0f499a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/frontend/apps/e2e/__tests__/app-impress/doc-export.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,18 @@ test.describe('Doc Export', () => {
254254
// Read and verify HTML content
255255
const htmlContent = await indexHtml!.async('string');
256256
expect(htmlContent).toContain('Hello HTML ZIP');
257+
258+
// Check for media files (they are at the root of the ZIP, not in a media/ folder)
259+
// Media files are named like "1-test.svg" or "media-1.png" by deriveMediaFilename
260+
const allFiles = Object.keys(zip.files);
261+
const mediaFiles = allFiles.filter(
262+
(name) => name !== 'index.html' && !name.endsWith('/'),
263+
);
264+
expect(mediaFiles.length).toBeGreaterThan(0);
265+
266+
// Verify the SVG image is included
267+
const svgFile = mediaFiles.find((name) => name.endsWith('.svg'));
268+
expect(svgFile).toBeDefined();
257269
});
258270

259271
/**

src/frontend/apps/impress/src/features/docs/doc-export/__tests__/ExportMIT.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ describe('useModuleExport', () => {
2323
const Export = await import('@/features/docs/doc-export/');
2424

2525
expect(Export.default).toHaveProperty('ModalExport');
26-
}, 60000);
26+
}, 15000);
2727
});

0 commit comments

Comments
 (0)