From 827f3b7c8c825f7c5ea887a0906b101bda9e7f25 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sat, 22 Aug 2026 13:23:48 +0100 Subject: [PATCH] Update progress messages in PDF generation tests for consistency and clarity This commit modifies the progress messages in the PDF generation tests to include ellipses and exclamation marks, enhancing the clarity and consistency of the output. The changes ensure that the messages reflect a more engaging user experience during the PDF generation process. Corresponding tests have been updated to verify these modifications. --- src/templates/__tests__/pdffactory.test.js | 16 ++++++++-------- src/templates/__tests__/templatemanager.test.js | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/templates/__tests__/pdffactory.test.js b/src/templates/__tests__/pdffactory.test.js index 07168c6..c5bdcad 100644 --- a/src/templates/__tests__/pdffactory.test.js +++ b/src/templates/__tests__/pdffactory.test.js @@ -174,12 +174,12 @@ describe('PDF Factory', () => { await generatePDF('', { width: 100, height: 50, onProgress }); - expect(onProgress).toHaveBeenCalledWith(0.05, 'Loading document'); - expect(onProgress).toHaveBeenCalledWith(0.15, 'Paginating document'); - expect(onProgress).toHaveBeenCalledWith(0.525, 'Rendering page 1 of 2'); - expect(onProgress).toHaveBeenCalledWith(0.85, 'Rendering page 2 of 2'); - expect(onProgress).toHaveBeenCalledWith(0.92, 'Combining pages'); - expect(onProgress).toHaveBeenCalledWith(1, 'PDF generated'); + expect(onProgress).toHaveBeenCalledWith(0.05, 'Loading document...'); + expect(onProgress).toHaveBeenCalledWith(0.15, 'Paginating document...'); + expect(onProgress).toHaveBeenCalledWith(0.525, 'Rendering page 1 of 2...'); + expect(onProgress).toHaveBeenCalledWith(0.85, 'Rendering page 2 of 2...'); + expect(onProgress).toHaveBeenCalledWith(0.92, 'Combining pages...'); + expect(onProgress).toHaveBeenCalledWith(1, 'PDF generated!'); }); it('sends object events through the event manager when a renderRequestId is provided', async () => { @@ -198,7 +198,7 @@ describe('PDF Factory', () => { 'render', expect.objectContaining({ type: 'render:render-123', - message: 'Loading document', + message: 'Loading document...', }) ); expect(eventManager.sendObjectEvent).toHaveBeenCalledWith( @@ -207,7 +207,7 @@ describe('PDF Factory', () => { expect.objectContaining({ type: 'render:render-123', progress: 0.9, - message: 'PDF generated', + message: 'PDF generated!', }) ); }); diff --git a/src/templates/__tests__/templatemanager.test.js b/src/templates/__tests__/templatemanager.test.js index 69d2a05..4cb83a4 100644 --- a/src/templates/__tests__/templatemanager.test.js +++ b/src/templates/__tests__/templatemanager.test.js @@ -686,7 +686,7 @@ describe('TemplateManager', () => { expect.objectContaining({ type: 'render:render-123', progress: 1, - message: 'Render complete', + message: 'Render complete!', }) ); });