Skip to content

Commit 9fcc221

Browse files
committed
💄(export) add style file to html export
We now include a CSS style file in the exported ZIP archive. This file contains styles that enhance the appearance of the exported HTML document when viewed in a web browser to look more like the original document.
1 parent acdde81 commit 9fcc221

File tree

4 files changed

+580
-0
lines changed

4 files changed

+580
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ 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+
expect(htmlContent).toContain('href="styles.css"');
257258

258259
// Check for media files (they are at the root of the ZIP, not in a media/ folder)
259260
// Media files are named like "1-test.svg" or "media-1.png" by deriveMediaFilename
@@ -266,6 +267,8 @@ test.describe('Doc Export', () => {
266267
// Verify the SVG image is included
267268
const svgFile = mediaFiles.find((name) => name.endsWith('.svg'));
268269
expect(svgFile).toBeDefined();
270+
const styleFile = mediaFiles.find((name) => name === 'styles.css');
271+
expect(styleFile).toBeDefined();
269272
});
270273

271274
/**

0 commit comments

Comments
 (0)