feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
import { INITIAL_INVOICE_DATA } from "@/app/constants" ;
import { INVOICE_PDF_TRANSLATIONS } from "@/app/(app)/pdf-i18n-translations/pdf-translations" ;
import fs from "node:fs" ;
import path from "node:path" ;
2026-03-29 22:11:50 +00:00
import { uploadLogoFile } from "../stripe-invoice-template/utils" ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
// IMPORTANT: we use custom extended test fixture that provides a temporary download directory for each test
import { test , expect } from "../utils/extended-playwright-test" ;
feat: add QR code functionality to invoice templates and other improvements + bug fixes (#165)
* feat: add QR code functionality to invoice templates and enhance user experience
* Introduced QR code generation for invoices, allowing users to include a QR code with customizable descriptions.
* Updated invoice templates to display QR codes in both default and Stripe formats.
* Enhanced form components to support QR code data input and visibility toggles.
* Added utility functions for generating QR code data URLs.
* Updated tests and snapshots to cover new QR code features and ensure visual consistency across templates.
* Introduced a Code of Conduct document to promote a respectful community environment.
* feat: enhance error handling and metadata management in invoice application
* Updated error handling to reset invoice metadata to default upon error occurrence.
* Refactored invoice client page to utilize a constant for default mobile tab value.
* Improved metadata structure by including last visited mobile tab in the default metadata.
* Adjusted schema to allow optional item name field for better flexibility in invoice items.
* fix: downgrade react-pdf version and update mobile tab handling
* Downgraded react-pdf from version 10.1.0 to 9.2.1 for compatibility.
* Updated mobile tab handling to utilize the last visited tab from app metadata.
* Refactored invoice client page to improve metadata management and ensure proper tab state persistence.
* fix: remove redundant validation message for item name in invoice form
* chore: update TODO list and comment out scroll to top effect in AppPageClient
* Added a new issue link to the TODO.md for tracking.
* Commented out the scroll to top effect in page.client.tsx for potential future use.
* refactor: streamline viewport settings and restore scroll to top effect in AppPageClient
* Simplified viewport configuration by removing unnecessary properties.
* Restored the scroll to top effect in AppPageClient for improved user experience on initial render.
* revert viewport
* fix: prevent jumping on iOS when typing in textarea component
* Added resize-none class to the textarea to improve user experience on iOS devices by preventing layout shifts while typing.
* feat: reworked app logic, improved multi-page pdf layout, add/update e2e tests, improvements and bug fixes
* Enhanced README.md with new features, including multi-page PDF support, QR code functionality, and live preview demos.
* Added demo GIFs to showcase new features and improve user understanding.
* Updated key features section for clarity and added a news & updates section for version tracking.
* feat: add debounced error handling in invoice form component
* Introduced a debounced callback for showing form errors to improve user experience by preventing rapid toast notifications.
* Updated validation logic to utilize the new debounced error handling mechanism.
* chore: update e2e snapshots and improved form errors toast
* fix: improve PDF viewer and QR code layout in invoice templates
* Added state management for page numbers in the mobile PDF viewer to handle multi-page documents.
* Adjusted QR code positioning and size to prevent overlap with the fixed footer.
* Updated padding in the Stripe template styles to resolve overlapping issues with the footer.
* Updated TODO.md with additional context on preventing layout issues in PDF rendering.
* feat: enhance invoice sharing logic with validation error handling
* Added a new test to verify error toast visibility when the invoice form has validation errors.
* Implemented state management for form validation errors in the AppPageClient.
* Updated the InvoiceForm component to manage error states and trigger appropriate toasts for user feedback.
* Ensured that the share button behavior reflects the form's validation state, improving user experience.
* feat: enhance invoice template with authorized person fields
* Added fields for Person Authorized to Receive and Person Authorized to Issue in the default invoice template.
* Implemented visibility toggles for these fields in the invoice form.
* Updated tests to verify the correct behavior of these fields in both default and Stripe invoice templates.
* Enhanced PDF rendering to include names of authorized persons when applicable.
* feat: implement cooldown for CTA toasts and update UI elements
* Introduced a 5-minute cooldown for showing CTA toasts to enhance user experience.
* Updated toast management logic in various components to respect the new cooldown.
* Adjusted text color in the InvoiceClientPage for better visibility.
* Refined tooltip content in the invoice form to clarify functionality.
* Updated TODO.md to reflect changes in toast behavior.
* feat: add unit column switch to stripe invoice template
* Changed toggle labels from Show/hide to Show for various fields in the invoice forms and dialogs to enhance clarity.
* Updated related test cases to reflect the new label changes across buyer, seller, and invoice templates.
* Ensured consistency in user interface elements for better user experience.
* chore: adjust text size
* feat: update README and improve CTA toast logic
* Replaced the EasyInvoicePDF logo with a new design and adjusted its size for better visibility.
* Enhanced the call-to-action (CTA) toast functionality by refining the logic for showing toasts based on user interactions and session activity.
* Updated text in the invoice form to clarify user actions and improve overall user experience.
* Added a new logo image to the project assets.
* update readme
* refactor: improved mobile PDF viewer by importing the PDF worker directl, improve CTA toast logic, update readme
* Renamed sections in README for clarity, including Live Preview to Invoice PDF Live Preview and Instant Download to Instant PDF Download.
* Adjusted text in CTA toasts for better engagement.
* Updated minimum time on page and interactions required for showing CTA toasts to enhance user experience.
* Improved mobile PDF viewer by importing the PDF worker directly and addressing related issues in TODO.md.
* fix: adjust CTA toast display timing for improved user experience
* Updated the timeout for showing the CTA toast to 6 seconds after the invoice link notification, enhancing the visibility and timing of user prompts.
* feat: Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* Added a new command in package.json for running cloudflared tunnel.
* Updated tests to verify the visibility of the share invoice link description toast.
* Refined toast notifications in the AppPageClient to include new IDs for better tracking and user feedback.
* Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* feat: enhance toast notifications with unique IDs for better ux
* fix: adjust invoice item limit in tests and update translations for total excluding tax
* Reduced the maximum number of invoice items in the test from 20 to 15 to better align with URL limits.
* Updated translations in the PDF i18n schema and related files to include total excluding tax in multiple languages.
* Modified the invoice PDF template to display the total excluding tax using localized text.
* fix qr code race condition
* fix: update URL variable names and enhance sharing logic for better clarity
* Renamed variables for generated URLs to improve code readability.
* Updated sharing logic to ensure consistent use of the new variable names across mobile and desktop sharing methods.
* Enhanced toast notifications to dismiss previous messages and track share events more effectively.
* fix: update tax label helper message for clarity in invoice items
* readme upd
* fix: adjust idle time and minimum interactions for CTA toast display
* Increased idle time from 3 seconds to 5 seconds to improve user engagement.
* Updated minimum interactions required for showing the CTA toast from 2 to 3 to enhance user experience.
* feat: implement cooldown logic for CTA toast display
* Added functionality to track the last shown timestamp of the CTA toast using localStorage.
* Introduced a 7-day cooldown period to prevent the toast from being shown multiple times within a week.
* Updated context to reflect whether the CTA toast was shown recently, enhancing user experience.
* chore: update dependencies and add GitHub workflows for linting and type checking
* Updated package versions in package.json and pnpm-lock.yaml for better compatibility and performance.
* Added GitHub Actions workflows for ESLint and TypeScript type checking to ensure code quality and consistency.
* Enhanced buyer and seller management components with improved state management and type safety.
* feat: enhance invoice sharing and download tracking
* Added functionality to track the number of times invoices are shared via link and downloaded as PDF.
* Updated the app metadata structure to include and .
* Implemented logic to increment these counts upon sharing and downloading invoices, improving analytics and user engagement.
* refactor: update README and TODO for clarity and consistency
2026-02-24 18:53:24 +00:00
import {
renderPdfOnCanvas ,
renderMultiPagePdfOnCanvas ,
} from "../utils/render-pdf-on-canvas" ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
test . describe ( "Default Invoice Template" , ( ) = > {
test . beforeEach ( async ( { page } ) = > {
// we set the system time to a fixed date, so that the invoice number and other dates are consistent across tests
await page . clock . setSystemTime ( new Date ( "2025-12-17T00:00:00Z" ) ) ;
2026-03-29 22:11:50 +00:00
await page . goto ( "/?template=default" ) ;
2026-02-25 14:21:34 +00:00
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
} ) ;
test ( "downloads PDF in English and verifies content" , async ( {
page ,
browserName ,
downloadDir ,
} ) = > {
const downloadPdfEnglishButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
// Wait for download button to be visible and enabled
await expect ( downloadPdfEnglishButton ) . toBeVisible ( ) ;
await expect ( downloadPdfEnglishButton ) . toBeEnabled ( ) ;
// Click the download button and wait for download
const [ download ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfEnglishButton . click ( ) ,
] ) ;
// Get the suggested filename
const suggestedFilename = download . suggestedFilename ( ) ;
// save the file to temporary directory
const pdfFilePath = path . join (
downloadDir ,
` ${ browserName } - ${ suggestedFilename } ` ,
) ;
await download . saveAs ( pdfFilePath ) ;
// Convert to absolute path and use proper file URL format
const absolutePath = path . resolve ( pdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( absolutePath ) ) . toBe ( true ) ;
/ * *
* Render the PDF on a canvas and take a screenshot of it
* /
const pdfBytes = fs . readFileSync ( absolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , pdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
"downloads-PDF-in-English.png" ,
) ;
// navigate back to the previous page
2026-02-25 14:21:34 +00:00
await page . goto ( "/" ) ;
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
/ * *
* Switch to Stripe template and download PDF in English with Stripe template
* /
await page
. getByRole ( "combobox" , { name : "Invoice Template" } )
. selectOption ( "stripe" ) ;
await page . waitForURL ( "/?template=stripe" ) ;
// Verify that the Stripe template is selected
const templateSelect = page . getByRole ( "combobox" , {
name : "Invoice Template" ,
} ) ;
await expect ( templateSelect ) . toHaveValue ( "stripe" ) ;
// Wait for the download button to be visible and enabled for Stripe template
const downloadPdfStripeButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
await expect ( downloadPdfStripeButton ) . toBeVisible ( ) ;
await expect ( downloadPdfStripeButton ) . toBeEnabled ( ) ;
// Click the download button and wait for download
const [ stripeDownload ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfStripeButton . click ( ) ,
] ) ;
// Get the suggested filename
const stripeSuggestedFilename = stripeDownload . suggestedFilename ( ) ;
// save the file to temporary directory
const stripePdfFilePath = path . join (
downloadDir ,
` ${ browserName } -stripe- ${ stripeSuggestedFilename } ` ,
) ;
await stripeDownload . saveAs ( stripePdfFilePath ) ;
// Convert to absolute path and use proper file URL format
const stripeAbsolutePath = path . resolve ( stripePdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( stripeAbsolutePath ) ) . toBe ( true ) ;
/ * *
* RENDER PDF ON CANVAS AND TAKE SCREENSHOT OF IT
* /
const stripePdfBytes = fs . readFileSync ( stripeAbsolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , stripePdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
` downloads-PDF-in-English-stripe-template.png ` ,
) ;
} ) ;
test ( "downloads PDF in Polish and verifies content" , async ( {
page ,
browserName ,
downloadDir ,
} , testInfo ) = > {
// Switch to Polish
await page
. getByRole ( "combobox" , { name : "Invoice PDF Language" } )
. selectOption ( "pl" ) ;
// we wait until this button is visible and enabled, that means that the PDF preview has been regenerated
const downloadPdfPolishButton = page . getByRole ( "link" , {
name : "Download PDF in Polish" ,
} ) ;
await expect ( downloadPdfPolishButton ) . toBeVisible ( ) ;
await expect ( downloadPdfPolishButton ) . toBeEnabled ( ) ;
const invoiceItemsSection = page . getByTestId ( "invoice-items-section" ) ;
// update name for the first invoice item
await invoiceItemsSection
. getByRole ( "textbox" , { name : "Name" } )
. fill ( "Invoice Item 1 TEST" ) ;
// update price and quantity for the first invoice item
await invoiceItemsSection
. getByRole ( "spinbutton" , { name : "Amount (Quantity)" } )
. fill ( "3" ) ;
await invoiceItemsSection
. getByRole ( "spinbutton" , {
name : "Net Price (Rate or Unit Price)" ,
} )
. fill ( "1000" ) ;
// update VAT for the first invoice item
const taxSettingsFieldset = invoiceItemsSection . getByRole ( "group" , {
name : "Tax Settings" ,
} ) ;
2026-03-01 20:17:29 +00:00
await taxSettingsFieldset
. getByRole ( "textbox" , { name : "VAT Rate" } )
. fill ( "10" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
await taxSettingsFieldset
. getByRole ( "textbox" , { name : "Tax Label" } )
. fill ( "Custom TEST TAX LABEL" ) ;
/** ADD NEW INVOICE ITEM */
await invoiceItemsSection
. getByRole ( "button" , { name : "Add invoice item" } )
. click ( ) ;
const invoiceItem2Fieldset = invoiceItemsSection . getByRole ( "group" , {
name : "Item 2" ,
} ) ;
// update name for the second invoice item
await invoiceItem2Fieldset
. getByRole ( "textbox" , { name : "Name" } )
. fill ( "Invoice Item 2 TEST" ) ;
const finalSection = page . getByTestId ( ` final-section ` ) ;
// for better debugging screenshots, we fill in the notes field with a test note =)
await finalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: downloads PDF in Polish and verifies content ( ${ testInfo . project . name } ) ` ,
) ;
// Check that the total is correct (should be 3,300.00)
const totalTextbox = page . getByRole ( "textbox" , { name : "Total" } ) ;
await expect ( totalTextbox ) . toHaveValue ( "3,300.00" ) ;
feat: add QR code functionality to invoice templates and other improvements + bug fixes (#165)
* feat: add QR code functionality to invoice templates and enhance user experience
* Introduced QR code generation for invoices, allowing users to include a QR code with customizable descriptions.
* Updated invoice templates to display QR codes in both default and Stripe formats.
* Enhanced form components to support QR code data input and visibility toggles.
* Added utility functions for generating QR code data URLs.
* Updated tests and snapshots to cover new QR code features and ensure visual consistency across templates.
* Introduced a Code of Conduct document to promote a respectful community environment.
* feat: enhance error handling and metadata management in invoice application
* Updated error handling to reset invoice metadata to default upon error occurrence.
* Refactored invoice client page to utilize a constant for default mobile tab value.
* Improved metadata structure by including last visited mobile tab in the default metadata.
* Adjusted schema to allow optional item name field for better flexibility in invoice items.
* fix: downgrade react-pdf version and update mobile tab handling
* Downgraded react-pdf from version 10.1.0 to 9.2.1 for compatibility.
* Updated mobile tab handling to utilize the last visited tab from app metadata.
* Refactored invoice client page to improve metadata management and ensure proper tab state persistence.
* fix: remove redundant validation message for item name in invoice form
* chore: update TODO list and comment out scroll to top effect in AppPageClient
* Added a new issue link to the TODO.md for tracking.
* Commented out the scroll to top effect in page.client.tsx for potential future use.
* refactor: streamline viewport settings and restore scroll to top effect in AppPageClient
* Simplified viewport configuration by removing unnecessary properties.
* Restored the scroll to top effect in AppPageClient for improved user experience on initial render.
* revert viewport
* fix: prevent jumping on iOS when typing in textarea component
* Added resize-none class to the textarea to improve user experience on iOS devices by preventing layout shifts while typing.
* feat: reworked app logic, improved multi-page pdf layout, add/update e2e tests, improvements and bug fixes
* Enhanced README.md with new features, including multi-page PDF support, QR code functionality, and live preview demos.
* Added demo GIFs to showcase new features and improve user understanding.
* Updated key features section for clarity and added a news & updates section for version tracking.
* feat: add debounced error handling in invoice form component
* Introduced a debounced callback for showing form errors to improve user experience by preventing rapid toast notifications.
* Updated validation logic to utilize the new debounced error handling mechanism.
* chore: update e2e snapshots and improved form errors toast
* fix: improve PDF viewer and QR code layout in invoice templates
* Added state management for page numbers in the mobile PDF viewer to handle multi-page documents.
* Adjusted QR code positioning and size to prevent overlap with the fixed footer.
* Updated padding in the Stripe template styles to resolve overlapping issues with the footer.
* Updated TODO.md with additional context on preventing layout issues in PDF rendering.
* feat: enhance invoice sharing logic with validation error handling
* Added a new test to verify error toast visibility when the invoice form has validation errors.
* Implemented state management for form validation errors in the AppPageClient.
* Updated the InvoiceForm component to manage error states and trigger appropriate toasts for user feedback.
* Ensured that the share button behavior reflects the form's validation state, improving user experience.
* feat: enhance invoice template with authorized person fields
* Added fields for Person Authorized to Receive and Person Authorized to Issue in the default invoice template.
* Implemented visibility toggles for these fields in the invoice form.
* Updated tests to verify the correct behavior of these fields in both default and Stripe invoice templates.
* Enhanced PDF rendering to include names of authorized persons when applicable.
* feat: implement cooldown for CTA toasts and update UI elements
* Introduced a 5-minute cooldown for showing CTA toasts to enhance user experience.
* Updated toast management logic in various components to respect the new cooldown.
* Adjusted text color in the InvoiceClientPage for better visibility.
* Refined tooltip content in the invoice form to clarify functionality.
* Updated TODO.md to reflect changes in toast behavior.
* feat: add unit column switch to stripe invoice template
* Changed toggle labels from Show/hide to Show for various fields in the invoice forms and dialogs to enhance clarity.
* Updated related test cases to reflect the new label changes across buyer, seller, and invoice templates.
* Ensured consistency in user interface elements for better user experience.
* chore: adjust text size
* feat: update README and improve CTA toast logic
* Replaced the EasyInvoicePDF logo with a new design and adjusted its size for better visibility.
* Enhanced the call-to-action (CTA) toast functionality by refining the logic for showing toasts based on user interactions and session activity.
* Updated text in the invoice form to clarify user actions and improve overall user experience.
* Added a new logo image to the project assets.
* update readme
* refactor: improved mobile PDF viewer by importing the PDF worker directl, improve CTA toast logic, update readme
* Renamed sections in README for clarity, including Live Preview to Invoice PDF Live Preview and Instant Download to Instant PDF Download.
* Adjusted text in CTA toasts for better engagement.
* Updated minimum time on page and interactions required for showing CTA toasts to enhance user experience.
* Improved mobile PDF viewer by importing the PDF worker directly and addressing related issues in TODO.md.
* fix: adjust CTA toast display timing for improved user experience
* Updated the timeout for showing the CTA toast to 6 seconds after the invoice link notification, enhancing the visibility and timing of user prompts.
* feat: Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* Added a new command in package.json for running cloudflared tunnel.
* Updated tests to verify the visibility of the share invoice link description toast.
* Refined toast notifications in the AppPageClient to include new IDs for better tracking and user feedback.
* Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* feat: enhance toast notifications with unique IDs for better ux
* fix: adjust invoice item limit in tests and update translations for total excluding tax
* Reduced the maximum number of invoice items in the test from 20 to 15 to better align with URL limits.
* Updated translations in the PDF i18n schema and related files to include total excluding tax in multiple languages.
* Modified the invoice PDF template to display the total excluding tax using localized text.
* fix qr code race condition
* fix: update URL variable names and enhance sharing logic for better clarity
* Renamed variables for generated URLs to improve code readability.
* Updated sharing logic to ensure consistent use of the new variable names across mobile and desktop sharing methods.
* Enhanced toast notifications to dismiss previous messages and track share events more effectively.
* fix: update tax label helper message for clarity in invoice items
* readme upd
* fix: adjust idle time and minimum interactions for CTA toast display
* Increased idle time from 3 seconds to 5 seconds to improve user engagement.
* Updated minimum interactions required for showing the CTA toast from 2 to 3 to enhance user experience.
* feat: implement cooldown logic for CTA toast display
* Added functionality to track the last shown timestamp of the CTA toast using localStorage.
* Introduced a 7-day cooldown period to prevent the toast from being shown multiple times within a week.
* Updated context to reflect whether the CTA toast was shown recently, enhancing user experience.
* chore: update dependencies and add GitHub workflows for linting and type checking
* Updated package versions in package.json and pnpm-lock.yaml for better compatibility and performance.
* Added GitHub Actions workflows for ESLint and TypeScript type checking to ensure code quality and consistency.
* Enhanced buyer and seller management components with improved state management and type safety.
* feat: enhance invoice sharing and download tracking
* Added functionality to track the number of times invoices are shared via link and downloaded as PDF.
* Updated the app metadata structure to include and .
* Implemented logic to increment these counts upon sharing and downloading invoices, improving analytics and user engagement.
* refactor: update README and TODO for clarity and consistency
2026-02-24 18:53:24 +00:00
/** TEST PERSON AUTHORIZED TO RECEIVE FIELD */
const personAuthorizedToReceiveFieldset = finalSection . getByRole ( "group" , {
name : "Person Authorized to Receive" ,
} ) ;
// Verify that "Show Person Authorized to Receive in PDF" switch is on by default
const showPersonAuthorizedToReceiveSwitch =
personAuthorizedToReceiveFieldset . getByRole ( "switch" , {
name : "Show Person Authorized to Receive in PDF" ,
} ) ;
await expect ( showPersonAuthorizedToReceiveSwitch ) . toBeVisible ( ) ;
await expect ( showPersonAuthorizedToReceiveSwitch ) . toBeEnabled ( ) ;
await expect ( showPersonAuthorizedToReceiveSwitch ) . toBeChecked ( ) ;
const personAuthorizedToReceiveNameInput =
personAuthorizedToReceiveFieldset . getByRole ( "textbox" , {
name : "Name" ,
} ) ;
await personAuthorizedToReceiveNameInput . fill ( "John Doe" ) ;
/** TEST PERSON AUTHORIZED TO ISSUE FIELD */
const personAuthorizedToIssueFieldset = finalSection . getByRole ( "group" , {
name : "Person Authorized to Issue" ,
} ) ;
const showPersonAuthorizedToIssueSwitch =
personAuthorizedToIssueFieldset . getByRole ( "switch" , {
name : "Show Person Authorized to Issue in PDF" ,
} ) ;
await expect ( showPersonAuthorizedToIssueSwitch ) . toBeVisible ( ) ;
await expect ( showPersonAuthorizedToIssueSwitch ) . toBeEnabled ( ) ;
await expect ( showPersonAuthorizedToIssueSwitch ) . toBeChecked ( ) ;
const personAuthorizedToIssueNameInput =
personAuthorizedToIssueFieldset . getByRole ( "textbox" , {
name : "Name" ,
} ) ;
await personAuthorizedToIssueNameInput . fill ( "Adam Smith" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
// wait, because we update pdf on debounce timeout
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
// Click the download button and wait for download
const [ download ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfPolishButton . click ( ) ,
] ) ;
// Get the suggested filename
const suggestedFilename = download . suggestedFilename ( ) ;
// save the file to temporary directory
const pdfFilePath = path . join (
downloadDir ,
` ${ browserName } - ${ suggestedFilename } ` ,
) ;
await download . saveAs ( pdfFilePath ) ;
// Convert to absolute path and use proper file URL format
const absolutePath = path . resolve ( pdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( absolutePath ) ) . toBe ( true ) ;
/ * *
* RENDER PDF ON CANVAS AND TAKE SCREENSHOT OF IT
* /
const pdfBytes = fs . readFileSync ( absolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , pdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
"downloads-PDF-in-Polish.png" ,
) ;
// navigate back to the previous page
2026-02-25 14:21:34 +00:00
await page . goto ( "/" ) ;
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
/ * *
* Switch to Stripe template and download PDF in Polish with Stripe template
* /
await page
. getByRole ( "combobox" , { name : "Invoice Template" } )
. selectOption ( "stripe" ) ;
await page . waitForURL ( "/?template=stripe" ) ;
// Verify that the Stripe template is selected
const templateSelect = page . getByRole ( "combobox" , {
name : "Invoice Template" ,
} ) ;
await expect ( templateSelect ) . toHaveValue ( "stripe" ) ;
const notesFinalSection = page . getByTestId ( ` final-section ` ) ;
// for better debugging screenshots, we fill in the notes field with a test note =)
await notesFinalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: downloads PDF in Polish and verifies content with Stripe template ( ${ testInfo . project . name } ) ` ,
) ;
// wait for debounce timeout
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
// Wait for the download button to be visible and enabled for Stripe template
const downloadPdfStripeButton = page . getByRole ( "link" , {
name : "Download PDF in Polish" ,
} ) ;
await expect ( downloadPdfStripeButton ) . toBeVisible ( ) ;
await expect ( downloadPdfStripeButton ) . toBeEnabled ( ) ;
// Click the download button and wait for download
const [ stripeDownload ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfStripeButton . click ( ) ,
] ) ;
// Get the suggested filename
const stripeSuggestedFilename = stripeDownload . suggestedFilename ( ) ;
// save the file to temporary directory
const stripePdfFilePath = path . join (
downloadDir ,
` ${ browserName } -stripe- ${ stripeSuggestedFilename } ` ,
) ;
await stripeDownload . saveAs ( stripePdfFilePath ) ;
// Convert to absolute path and use proper file URL format
const stripeAbsolutePath = path . resolve ( stripePdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( stripeAbsolutePath ) ) . toBe ( true ) ;
/ * *
* RENDER PDF ON CANVAS AND TAKE SCREENSHOT OF IT
* /
const stripePdfBytes = fs . readFileSync ( stripeAbsolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , stripePdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
` downloads-PDF-in-Polish-stripe-template.png ` ,
) ;
} ) ;
test ( "update pdf when invoice data changes" , async ( {
page ,
browserName ,
downloadDir ,
} , testInfo ) = > {
const DATE_FORMAT = "MMMM D, YYYY" ;
2026-03-08 16:36:02 +00:00
// Switch to another currency via combobox
const currencyCombobox = page . getByRole ( "combobox" , { name : "Currency" } ) ;
// Open the combobox to select the currency
await currencyCombobox . click ( ) ;
// Select the GBP currency
await page . getByRole ( "option" , { name : /^GBP\s/ } ) . click ( ) ;
await expect ( currencyCombobox ) . toContainText ( "GBP" ) ;
// check that value is saved in the hidden input
await expect ( page . locator ( 'input[name="currency"]' ) ) . toHaveValue ( "GBP" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
// Switch to another date format
await page
. getByRole ( "combobox" , { name : "Date format" } )
. selectOption ( DATE_FORMAT ) ;
await page
feat: add QR code functionality to invoice templates and other improvements + bug fixes (#165)
* feat: add QR code functionality to invoice templates and enhance user experience
* Introduced QR code generation for invoices, allowing users to include a QR code with customizable descriptions.
* Updated invoice templates to display QR codes in both default and Stripe formats.
* Enhanced form components to support QR code data input and visibility toggles.
* Added utility functions for generating QR code data URLs.
* Updated tests and snapshots to cover new QR code features and ensure visual consistency across templates.
* Introduced a Code of Conduct document to promote a respectful community environment.
* feat: enhance error handling and metadata management in invoice application
* Updated error handling to reset invoice metadata to default upon error occurrence.
* Refactored invoice client page to utilize a constant for default mobile tab value.
* Improved metadata structure by including last visited mobile tab in the default metadata.
* Adjusted schema to allow optional item name field for better flexibility in invoice items.
* fix: downgrade react-pdf version and update mobile tab handling
* Downgraded react-pdf from version 10.1.0 to 9.2.1 for compatibility.
* Updated mobile tab handling to utilize the last visited tab from app metadata.
* Refactored invoice client page to improve metadata management and ensure proper tab state persistence.
* fix: remove redundant validation message for item name in invoice form
* chore: update TODO list and comment out scroll to top effect in AppPageClient
* Added a new issue link to the TODO.md for tracking.
* Commented out the scroll to top effect in page.client.tsx for potential future use.
* refactor: streamline viewport settings and restore scroll to top effect in AppPageClient
* Simplified viewport configuration by removing unnecessary properties.
* Restored the scroll to top effect in AppPageClient for improved user experience on initial render.
* revert viewport
* fix: prevent jumping on iOS when typing in textarea component
* Added resize-none class to the textarea to improve user experience on iOS devices by preventing layout shifts while typing.
* feat: reworked app logic, improved multi-page pdf layout, add/update e2e tests, improvements and bug fixes
* Enhanced README.md with new features, including multi-page PDF support, QR code functionality, and live preview demos.
* Added demo GIFs to showcase new features and improve user understanding.
* Updated key features section for clarity and added a news & updates section for version tracking.
* feat: add debounced error handling in invoice form component
* Introduced a debounced callback for showing form errors to improve user experience by preventing rapid toast notifications.
* Updated validation logic to utilize the new debounced error handling mechanism.
* chore: update e2e snapshots and improved form errors toast
* fix: improve PDF viewer and QR code layout in invoice templates
* Added state management for page numbers in the mobile PDF viewer to handle multi-page documents.
* Adjusted QR code positioning and size to prevent overlap with the fixed footer.
* Updated padding in the Stripe template styles to resolve overlapping issues with the footer.
* Updated TODO.md with additional context on preventing layout issues in PDF rendering.
* feat: enhance invoice sharing logic with validation error handling
* Added a new test to verify error toast visibility when the invoice form has validation errors.
* Implemented state management for form validation errors in the AppPageClient.
* Updated the InvoiceForm component to manage error states and trigger appropriate toasts for user feedback.
* Ensured that the share button behavior reflects the form's validation state, improving user experience.
* feat: enhance invoice template with authorized person fields
* Added fields for Person Authorized to Receive and Person Authorized to Issue in the default invoice template.
* Implemented visibility toggles for these fields in the invoice form.
* Updated tests to verify the correct behavior of these fields in both default and Stripe invoice templates.
* Enhanced PDF rendering to include names of authorized persons when applicable.
* feat: implement cooldown for CTA toasts and update UI elements
* Introduced a 5-minute cooldown for showing CTA toasts to enhance user experience.
* Updated toast management logic in various components to respect the new cooldown.
* Adjusted text color in the InvoiceClientPage for better visibility.
* Refined tooltip content in the invoice form to clarify functionality.
* Updated TODO.md to reflect changes in toast behavior.
* feat: add unit column switch to stripe invoice template
* Changed toggle labels from Show/hide to Show for various fields in the invoice forms and dialogs to enhance clarity.
* Updated related test cases to reflect the new label changes across buyer, seller, and invoice templates.
* Ensured consistency in user interface elements for better user experience.
* chore: adjust text size
* feat: update README and improve CTA toast logic
* Replaced the EasyInvoicePDF logo with a new design and adjusted its size for better visibility.
* Enhanced the call-to-action (CTA) toast functionality by refining the logic for showing toasts based on user interactions and session activity.
* Updated text in the invoice form to clarify user actions and improve overall user experience.
* Added a new logo image to the project assets.
* update readme
* refactor: improved mobile PDF viewer by importing the PDF worker directl, improve CTA toast logic, update readme
* Renamed sections in README for clarity, including Live Preview to Invoice PDF Live Preview and Instant Download to Instant PDF Download.
* Adjusted text in CTA toasts for better engagement.
* Updated minimum time on page and interactions required for showing CTA toasts to enhance user experience.
* Improved mobile PDF viewer by importing the PDF worker directly and addressing related issues in TODO.md.
* fix: adjust CTA toast display timing for improved user experience
* Updated the timeout for showing the CTA toast to 6 seconds after the invoice link notification, enhancing the visibility and timing of user prompts.
* feat: Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* Added a new command in package.json for running cloudflared tunnel.
* Updated tests to verify the visibility of the share invoice link description toast.
* Refined toast notifications in the AppPageClient to include new IDs for better tracking and user feedback.
* Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* feat: enhance toast notifications with unique IDs for better ux
* fix: adjust invoice item limit in tests and update translations for total excluding tax
* Reduced the maximum number of invoice items in the test from 20 to 15 to better align with URL limits.
* Updated translations in the PDF i18n schema and related files to include total excluding tax in multiple languages.
* Modified the invoice PDF template to display the total excluding tax using localized text.
* fix qr code race condition
* fix: update URL variable names and enhance sharing logic for better clarity
* Renamed variables for generated URLs to improve code readability.
* Updated sharing logic to ensure consistent use of the new variable names across mobile and desktop sharing methods.
* Enhanced toast notifications to dismiss previous messages and track share events more effectively.
* fix: update tax label helper message for clarity in invoice items
* readme upd
* fix: adjust idle time and minimum interactions for CTA toast display
* Increased idle time from 3 seconds to 5 seconds to improve user engagement.
* Updated minimum interactions required for showing the CTA toast from 2 to 3 to enhance user experience.
* feat: implement cooldown logic for CTA toast display
* Added functionality to track the last shown timestamp of the CTA toast using localStorage.
* Introduced a 7-day cooldown period to prevent the toast from being shown multiple times within a week.
* Updated context to reflect whether the CTA toast was shown recently, enhancing user experience.
* chore: update dependencies and add GitHub workflows for linting and type checking
* Updated package versions in package.json and pnpm-lock.yaml for better compatibility and performance.
* Added GitHub Actions workflows for ESLint and TypeScript type checking to ensure code quality and consistency.
* Enhanced buyer and seller management components with improved state management and type safety.
* feat: enhance invoice sharing and download tracking
* Added functionality to track the number of times invoices are shared via link and downloaded as PDF.
* Updated the app metadata structure to include and .
* Implemented logic to increment these counts upon sharing and downloading invoices, improving analytics and user engagement.
* refactor: update README and TODO for clarity and consistency
2026-02-24 18:53:24 +00:00
. getByRole ( "textbox" , { name : "Header Notes" } )
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
. fill ( "HELLO FROM PLAYWRIGHT TEST!" ) ;
/** UPDATE SELLER INFORMATION */
const sellerSection = page . getByTestId ( ` seller-information-section ` ) ;
// Name field
await sellerSection
. getByRole ( "textbox" , { name : "Name" } )
. fill ( "PLAYWRIGHT SELLER TEST" ) ;
// Toggle VAT Number visibility off
await sellerSection
feat: add QR code functionality to invoice templates and other improvements + bug fixes (#165)
* feat: add QR code functionality to invoice templates and enhance user experience
* Introduced QR code generation for invoices, allowing users to include a QR code with customizable descriptions.
* Updated invoice templates to display QR codes in both default and Stripe formats.
* Enhanced form components to support QR code data input and visibility toggles.
* Added utility functions for generating QR code data URLs.
* Updated tests and snapshots to cover new QR code features and ensure visual consistency across templates.
* Introduced a Code of Conduct document to promote a respectful community environment.
* feat: enhance error handling and metadata management in invoice application
* Updated error handling to reset invoice metadata to default upon error occurrence.
* Refactored invoice client page to utilize a constant for default mobile tab value.
* Improved metadata structure by including last visited mobile tab in the default metadata.
* Adjusted schema to allow optional item name field for better flexibility in invoice items.
* fix: downgrade react-pdf version and update mobile tab handling
* Downgraded react-pdf from version 10.1.0 to 9.2.1 for compatibility.
* Updated mobile tab handling to utilize the last visited tab from app metadata.
* Refactored invoice client page to improve metadata management and ensure proper tab state persistence.
* fix: remove redundant validation message for item name in invoice form
* chore: update TODO list and comment out scroll to top effect in AppPageClient
* Added a new issue link to the TODO.md for tracking.
* Commented out the scroll to top effect in page.client.tsx for potential future use.
* refactor: streamline viewport settings and restore scroll to top effect in AppPageClient
* Simplified viewport configuration by removing unnecessary properties.
* Restored the scroll to top effect in AppPageClient for improved user experience on initial render.
* revert viewport
* fix: prevent jumping on iOS when typing in textarea component
* Added resize-none class to the textarea to improve user experience on iOS devices by preventing layout shifts while typing.
* feat: reworked app logic, improved multi-page pdf layout, add/update e2e tests, improvements and bug fixes
* Enhanced README.md with new features, including multi-page PDF support, QR code functionality, and live preview demos.
* Added demo GIFs to showcase new features and improve user understanding.
* Updated key features section for clarity and added a news & updates section for version tracking.
* feat: add debounced error handling in invoice form component
* Introduced a debounced callback for showing form errors to improve user experience by preventing rapid toast notifications.
* Updated validation logic to utilize the new debounced error handling mechanism.
* chore: update e2e snapshots and improved form errors toast
* fix: improve PDF viewer and QR code layout in invoice templates
* Added state management for page numbers in the mobile PDF viewer to handle multi-page documents.
* Adjusted QR code positioning and size to prevent overlap with the fixed footer.
* Updated padding in the Stripe template styles to resolve overlapping issues with the footer.
* Updated TODO.md with additional context on preventing layout issues in PDF rendering.
* feat: enhance invoice sharing logic with validation error handling
* Added a new test to verify error toast visibility when the invoice form has validation errors.
* Implemented state management for form validation errors in the AppPageClient.
* Updated the InvoiceForm component to manage error states and trigger appropriate toasts for user feedback.
* Ensured that the share button behavior reflects the form's validation state, improving user experience.
* feat: enhance invoice template with authorized person fields
* Added fields for Person Authorized to Receive and Person Authorized to Issue in the default invoice template.
* Implemented visibility toggles for these fields in the invoice form.
* Updated tests to verify the correct behavior of these fields in both default and Stripe invoice templates.
* Enhanced PDF rendering to include names of authorized persons when applicable.
* feat: implement cooldown for CTA toasts and update UI elements
* Introduced a 5-minute cooldown for showing CTA toasts to enhance user experience.
* Updated toast management logic in various components to respect the new cooldown.
* Adjusted text color in the InvoiceClientPage for better visibility.
* Refined tooltip content in the invoice form to clarify functionality.
* Updated TODO.md to reflect changes in toast behavior.
* feat: add unit column switch to stripe invoice template
* Changed toggle labels from Show/hide to Show for various fields in the invoice forms and dialogs to enhance clarity.
* Updated related test cases to reflect the new label changes across buyer, seller, and invoice templates.
* Ensured consistency in user interface elements for better user experience.
* chore: adjust text size
* feat: update README and improve CTA toast logic
* Replaced the EasyInvoicePDF logo with a new design and adjusted its size for better visibility.
* Enhanced the call-to-action (CTA) toast functionality by refining the logic for showing toasts based on user interactions and session activity.
* Updated text in the invoice form to clarify user actions and improve overall user experience.
* Added a new logo image to the project assets.
* update readme
* refactor: improved mobile PDF viewer by importing the PDF worker directl, improve CTA toast logic, update readme
* Renamed sections in README for clarity, including Live Preview to Invoice PDF Live Preview and Instant Download to Instant PDF Download.
* Adjusted text in CTA toasts for better engagement.
* Updated minimum time on page and interactions required for showing CTA toasts to enhance user experience.
* Improved mobile PDF viewer by importing the PDF worker directly and addressing related issues in TODO.md.
* fix: adjust CTA toast display timing for improved user experience
* Updated the timeout for showing the CTA toast to 6 seconds after the invoice link notification, enhancing the visibility and timing of user prompts.
* feat: Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* Added a new command in package.json for running cloudflared tunnel.
* Updated tests to verify the visibility of the share invoice link description toast.
* Refined toast notifications in the AppPageClient to include new IDs for better tracking and user feedback.
* Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* feat: enhance toast notifications with unique IDs for better ux
* fix: adjust invoice item limit in tests and update translations for total excluding tax
* Reduced the maximum number of invoice items in the test from 20 to 15 to better align with URL limits.
* Updated translations in the PDF i18n schema and related files to include total excluding tax in multiple languages.
* Modified the invoice PDF template to display the total excluding tax using localized text.
* fix qr code race condition
* fix: update URL variable names and enhance sharing logic for better clarity
* Renamed variables for generated URLs to improve code readability.
* Updated sharing logic to ensure consistent use of the new variable names across mobile and desktop sharing methods.
* Enhanced toast notifications to dismiss previous messages and track share events more effectively.
* fix: update tax label helper message for clarity in invoice items
* readme upd
* fix: adjust idle time and minimum interactions for CTA toast display
* Increased idle time from 3 seconds to 5 seconds to improve user engagement.
* Updated minimum interactions required for showing the CTA toast from 2 to 3 to enhance user experience.
* feat: implement cooldown logic for CTA toast display
* Added functionality to track the last shown timestamp of the CTA toast using localStorage.
* Introduced a 7-day cooldown period to prevent the toast from being shown multiple times within a week.
* Updated context to reflect whether the CTA toast was shown recently, enhancing user experience.
* chore: update dependencies and add GitHub workflows for linting and type checking
* Updated package versions in package.json and pnpm-lock.yaml for better compatibility and performance.
* Added GitHub Actions workflows for ESLint and TypeScript type checking to ensure code quality and consistency.
* Enhanced buyer and seller management components with improved state management and type safety.
* feat: enhance invoice sharing and download tracking
* Added functionality to track the number of times invoices are shared via link and downloaded as PDF.
* Updated the app metadata structure to include and .
* Implemented logic to increment these counts upon sharing and downloading invoices, improving analytics and user engagement.
* refactor: update README and TODO for clarity and consistency
2026-02-24 18:53:24 +00:00
. getByRole ( "switch" , {
name : ` Show the 'Seller Tax Number' Field in the PDF ` ,
} )
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
. click ( ) ;
// Toggle Account Number visibility off
await sellerSection
feat: add QR code functionality to invoice templates and other improvements + bug fixes (#165)
* feat: add QR code functionality to invoice templates and enhance user experience
* Introduced QR code generation for invoices, allowing users to include a QR code with customizable descriptions.
* Updated invoice templates to display QR codes in both default and Stripe formats.
* Enhanced form components to support QR code data input and visibility toggles.
* Added utility functions for generating QR code data URLs.
* Updated tests and snapshots to cover new QR code features and ensure visual consistency across templates.
* Introduced a Code of Conduct document to promote a respectful community environment.
* feat: enhance error handling and metadata management in invoice application
* Updated error handling to reset invoice metadata to default upon error occurrence.
* Refactored invoice client page to utilize a constant for default mobile tab value.
* Improved metadata structure by including last visited mobile tab in the default metadata.
* Adjusted schema to allow optional item name field for better flexibility in invoice items.
* fix: downgrade react-pdf version and update mobile tab handling
* Downgraded react-pdf from version 10.1.0 to 9.2.1 for compatibility.
* Updated mobile tab handling to utilize the last visited tab from app metadata.
* Refactored invoice client page to improve metadata management and ensure proper tab state persistence.
* fix: remove redundant validation message for item name in invoice form
* chore: update TODO list and comment out scroll to top effect in AppPageClient
* Added a new issue link to the TODO.md for tracking.
* Commented out the scroll to top effect in page.client.tsx for potential future use.
* refactor: streamline viewport settings and restore scroll to top effect in AppPageClient
* Simplified viewport configuration by removing unnecessary properties.
* Restored the scroll to top effect in AppPageClient for improved user experience on initial render.
* revert viewport
* fix: prevent jumping on iOS when typing in textarea component
* Added resize-none class to the textarea to improve user experience on iOS devices by preventing layout shifts while typing.
* feat: reworked app logic, improved multi-page pdf layout, add/update e2e tests, improvements and bug fixes
* Enhanced README.md with new features, including multi-page PDF support, QR code functionality, and live preview demos.
* Added demo GIFs to showcase new features and improve user understanding.
* Updated key features section for clarity and added a news & updates section for version tracking.
* feat: add debounced error handling in invoice form component
* Introduced a debounced callback for showing form errors to improve user experience by preventing rapid toast notifications.
* Updated validation logic to utilize the new debounced error handling mechanism.
* chore: update e2e snapshots and improved form errors toast
* fix: improve PDF viewer and QR code layout in invoice templates
* Added state management for page numbers in the mobile PDF viewer to handle multi-page documents.
* Adjusted QR code positioning and size to prevent overlap with the fixed footer.
* Updated padding in the Stripe template styles to resolve overlapping issues with the footer.
* Updated TODO.md with additional context on preventing layout issues in PDF rendering.
* feat: enhance invoice sharing logic with validation error handling
* Added a new test to verify error toast visibility when the invoice form has validation errors.
* Implemented state management for form validation errors in the AppPageClient.
* Updated the InvoiceForm component to manage error states and trigger appropriate toasts for user feedback.
* Ensured that the share button behavior reflects the form's validation state, improving user experience.
* feat: enhance invoice template with authorized person fields
* Added fields for Person Authorized to Receive and Person Authorized to Issue in the default invoice template.
* Implemented visibility toggles for these fields in the invoice form.
* Updated tests to verify the correct behavior of these fields in both default and Stripe invoice templates.
* Enhanced PDF rendering to include names of authorized persons when applicable.
* feat: implement cooldown for CTA toasts and update UI elements
* Introduced a 5-minute cooldown for showing CTA toasts to enhance user experience.
* Updated toast management logic in various components to respect the new cooldown.
* Adjusted text color in the InvoiceClientPage for better visibility.
* Refined tooltip content in the invoice form to clarify functionality.
* Updated TODO.md to reflect changes in toast behavior.
* feat: add unit column switch to stripe invoice template
* Changed toggle labels from Show/hide to Show for various fields in the invoice forms and dialogs to enhance clarity.
* Updated related test cases to reflect the new label changes across buyer, seller, and invoice templates.
* Ensured consistency in user interface elements for better user experience.
* chore: adjust text size
* feat: update README and improve CTA toast logic
* Replaced the EasyInvoicePDF logo with a new design and adjusted its size for better visibility.
* Enhanced the call-to-action (CTA) toast functionality by refining the logic for showing toasts based on user interactions and session activity.
* Updated text in the invoice form to clarify user actions and improve overall user experience.
* Added a new logo image to the project assets.
* update readme
* refactor: improved mobile PDF viewer by importing the PDF worker directl, improve CTA toast logic, update readme
* Renamed sections in README for clarity, including Live Preview to Invoice PDF Live Preview and Instant Download to Instant PDF Download.
* Adjusted text in CTA toasts for better engagement.
* Updated minimum time on page and interactions required for showing CTA toasts to enhance user experience.
* Improved mobile PDF viewer by importing the PDF worker directly and addressing related issues in TODO.md.
* fix: adjust CTA toast display timing for improved user experience
* Updated the timeout for showing the CTA toast to 6 seconds after the invoice link notification, enhancing the visibility and timing of user prompts.
* feat: Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* Added a new command in package.json for running cloudflared tunnel.
* Updated tests to verify the visibility of the share invoice link description toast.
* Refined toast notifications in the AppPageClient to include new IDs for better tracking and user feedback.
* Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* feat: enhance toast notifications with unique IDs for better ux
* fix: adjust invoice item limit in tests and update translations for total excluding tax
* Reduced the maximum number of invoice items in the test from 20 to 15 to better align with URL limits.
* Updated translations in the PDF i18n schema and related files to include total excluding tax in multiple languages.
* Modified the invoice PDF template to display the total excluding tax using localized text.
* fix qr code race condition
* fix: update URL variable names and enhance sharing logic for better clarity
* Renamed variables for generated URLs to improve code readability.
* Updated sharing logic to ensure consistent use of the new variable names across mobile and desktop sharing methods.
* Enhanced toast notifications to dismiss previous messages and track share events more effectively.
* fix: update tax label helper message for clarity in invoice items
* readme upd
* fix: adjust idle time and minimum interactions for CTA toast display
* Increased idle time from 3 seconds to 5 seconds to improve user engagement.
* Updated minimum interactions required for showing the CTA toast from 2 to 3 to enhance user experience.
* feat: implement cooldown logic for CTA toast display
* Added functionality to track the last shown timestamp of the CTA toast using localStorage.
* Introduced a 7-day cooldown period to prevent the toast from being shown multiple times within a week.
* Updated context to reflect whether the CTA toast was shown recently, enhancing user experience.
* chore: update dependencies and add GitHub workflows for linting and type checking
* Updated package versions in package.json and pnpm-lock.yaml for better compatibility and performance.
* Added GitHub Actions workflows for ESLint and TypeScript type checking to ensure code quality and consistency.
* Enhanced buyer and seller management components with improved state management and type safety.
* feat: enhance invoice sharing and download tracking
* Added functionality to track the number of times invoices are shared via link and downloaded as PDF.
* Updated the app metadata structure to include and .
* Implemented logic to increment these counts upon sharing and downloading invoices, improving analytics and user engagement.
* refactor: update README and TODO for clarity and consistency
2026-02-24 18:53:24 +00:00
. getByRole ( "switch" , {
name : ` Show the 'Account Number' Field in the PDF ` ,
} )
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
. click ( ) ;
// Toggle SWIFT visibility off
await sellerSection
feat: add QR code functionality to invoice templates and other improvements + bug fixes (#165)
* feat: add QR code functionality to invoice templates and enhance user experience
* Introduced QR code generation for invoices, allowing users to include a QR code with customizable descriptions.
* Updated invoice templates to display QR codes in both default and Stripe formats.
* Enhanced form components to support QR code data input and visibility toggles.
* Added utility functions for generating QR code data URLs.
* Updated tests and snapshots to cover new QR code features and ensure visual consistency across templates.
* Introduced a Code of Conduct document to promote a respectful community environment.
* feat: enhance error handling and metadata management in invoice application
* Updated error handling to reset invoice metadata to default upon error occurrence.
* Refactored invoice client page to utilize a constant for default mobile tab value.
* Improved metadata structure by including last visited mobile tab in the default metadata.
* Adjusted schema to allow optional item name field for better flexibility in invoice items.
* fix: downgrade react-pdf version and update mobile tab handling
* Downgraded react-pdf from version 10.1.0 to 9.2.1 for compatibility.
* Updated mobile tab handling to utilize the last visited tab from app metadata.
* Refactored invoice client page to improve metadata management and ensure proper tab state persistence.
* fix: remove redundant validation message for item name in invoice form
* chore: update TODO list and comment out scroll to top effect in AppPageClient
* Added a new issue link to the TODO.md for tracking.
* Commented out the scroll to top effect in page.client.tsx for potential future use.
* refactor: streamline viewport settings and restore scroll to top effect in AppPageClient
* Simplified viewport configuration by removing unnecessary properties.
* Restored the scroll to top effect in AppPageClient for improved user experience on initial render.
* revert viewport
* fix: prevent jumping on iOS when typing in textarea component
* Added resize-none class to the textarea to improve user experience on iOS devices by preventing layout shifts while typing.
* feat: reworked app logic, improved multi-page pdf layout, add/update e2e tests, improvements and bug fixes
* Enhanced README.md with new features, including multi-page PDF support, QR code functionality, and live preview demos.
* Added demo GIFs to showcase new features and improve user understanding.
* Updated key features section for clarity and added a news & updates section for version tracking.
* feat: add debounced error handling in invoice form component
* Introduced a debounced callback for showing form errors to improve user experience by preventing rapid toast notifications.
* Updated validation logic to utilize the new debounced error handling mechanism.
* chore: update e2e snapshots and improved form errors toast
* fix: improve PDF viewer and QR code layout in invoice templates
* Added state management for page numbers in the mobile PDF viewer to handle multi-page documents.
* Adjusted QR code positioning and size to prevent overlap with the fixed footer.
* Updated padding in the Stripe template styles to resolve overlapping issues with the footer.
* Updated TODO.md with additional context on preventing layout issues in PDF rendering.
* feat: enhance invoice sharing logic with validation error handling
* Added a new test to verify error toast visibility when the invoice form has validation errors.
* Implemented state management for form validation errors in the AppPageClient.
* Updated the InvoiceForm component to manage error states and trigger appropriate toasts for user feedback.
* Ensured that the share button behavior reflects the form's validation state, improving user experience.
* feat: enhance invoice template with authorized person fields
* Added fields for Person Authorized to Receive and Person Authorized to Issue in the default invoice template.
* Implemented visibility toggles for these fields in the invoice form.
* Updated tests to verify the correct behavior of these fields in both default and Stripe invoice templates.
* Enhanced PDF rendering to include names of authorized persons when applicable.
* feat: implement cooldown for CTA toasts and update UI elements
* Introduced a 5-minute cooldown for showing CTA toasts to enhance user experience.
* Updated toast management logic in various components to respect the new cooldown.
* Adjusted text color in the InvoiceClientPage for better visibility.
* Refined tooltip content in the invoice form to clarify functionality.
* Updated TODO.md to reflect changes in toast behavior.
* feat: add unit column switch to stripe invoice template
* Changed toggle labels from Show/hide to Show for various fields in the invoice forms and dialogs to enhance clarity.
* Updated related test cases to reflect the new label changes across buyer, seller, and invoice templates.
* Ensured consistency in user interface elements for better user experience.
* chore: adjust text size
* feat: update README and improve CTA toast logic
* Replaced the EasyInvoicePDF logo with a new design and adjusted its size for better visibility.
* Enhanced the call-to-action (CTA) toast functionality by refining the logic for showing toasts based on user interactions and session activity.
* Updated text in the invoice form to clarify user actions and improve overall user experience.
* Added a new logo image to the project assets.
* update readme
* refactor: improved mobile PDF viewer by importing the PDF worker directl, improve CTA toast logic, update readme
* Renamed sections in README for clarity, including Live Preview to Invoice PDF Live Preview and Instant Download to Instant PDF Download.
* Adjusted text in CTA toasts for better engagement.
* Updated minimum time on page and interactions required for showing CTA toasts to enhance user experience.
* Improved mobile PDF viewer by importing the PDF worker directly and addressing related issues in TODO.md.
* fix: adjust CTA toast display timing for improved user experience
* Updated the timeout for showing the CTA toast to 6 seconds after the invoice link notification, enhancing the visibility and timing of user prompts.
* feat: Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* Added a new command in package.json for running cloudflared tunnel.
* Updated tests to verify the visibility of the share invoice link description toast.
* Refined toast notifications in the AppPageClient to include new IDs for better tracking and user feedback.
* Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* feat: enhance toast notifications with unique IDs for better ux
* fix: adjust invoice item limit in tests and update translations for total excluding tax
* Reduced the maximum number of invoice items in the test from 20 to 15 to better align with URL limits.
* Updated translations in the PDF i18n schema and related files to include total excluding tax in multiple languages.
* Modified the invoice PDF template to display the total excluding tax using localized text.
* fix qr code race condition
* fix: update URL variable names and enhance sharing logic for better clarity
* Renamed variables for generated URLs to improve code readability.
* Updated sharing logic to ensure consistent use of the new variable names across mobile and desktop sharing methods.
* Enhanced toast notifications to dismiss previous messages and track share events more effectively.
* fix: update tax label helper message for clarity in invoice items
* readme upd
* fix: adjust idle time and minimum interactions for CTA toast display
* Increased idle time from 3 seconds to 5 seconds to improve user engagement.
* Updated minimum interactions required for showing the CTA toast from 2 to 3 to enhance user experience.
* feat: implement cooldown logic for CTA toast display
* Added functionality to track the last shown timestamp of the CTA toast using localStorage.
* Introduced a 7-day cooldown period to prevent the toast from being shown multiple times within a week.
* Updated context to reflect whether the CTA toast was shown recently, enhancing user experience.
* chore: update dependencies and add GitHub workflows for linting and type checking
* Updated package versions in package.json and pnpm-lock.yaml for better compatibility and performance.
* Added GitHub Actions workflows for ESLint and TypeScript type checking to ensure code quality and consistency.
* Enhanced buyer and seller management components with improved state management and type safety.
* feat: enhance invoice sharing and download tracking
* Added functionality to track the number of times invoices are shared via link and downloaded as PDF.
* Updated the app metadata structure to include and .
* Implemented logic to increment these counts upon sharing and downloading invoices, improving analytics and user engagement.
* refactor: update README and TODO for clarity and consistency
2026-02-24 18:53:24 +00:00
. getByRole ( "switch" , {
name : ` Show the 'SWIFT/BIC' Field in the PDF ` ,
} )
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
. click ( ) ;
// update notes
await sellerSection
. getByRole ( "textbox" , { name : "Notes" } )
. fill ( "PLAYWRIGHT SELLER NOTES TEST" ) ;
// Toggle notes visibility on
const sellerNotesSwitch = sellerSection . getByTestId (
` sellerNotesInvoiceFormFieldVisibilitySwitch ` ,
) ;
await expect ( sellerNotesSwitch ) . toHaveRole ( "switch" ) ;
await expect ( sellerNotesSwitch ) . toBeChecked ( ) ;
/** UPDATE BUYER INFORMATION */
const buyerSection = page . getByTestId ( ` buyer-information-section ` ) ;
// Name field
await buyerSection
. getByRole ( "textbox" , { name : "Name" } )
. fill ( "PLAYWRIGHT BUYER TEST" ) ;
// // Address field
await buyerSection
. getByRole ( "textbox" , { name : "Address" } )
. fill ( "PLAYWRIGHT BUYER ADDRESS TEST" ) ;
// // Email field
await buyerSection
. getByRole ( "textbox" , { name : "Email" } )
. fill ( "TEST_BUYER_EMAIL@mail.com" ) ;
// update notes
await buyerSection
. getByRole ( "textbox" , { name : "Notes" } )
. fill ( "PLAYWRIGHT BUYER NOTES TEST" ) ;
// Toggle notes visibility on
const buyerNotesSwitch = buyerSection . getByTestId (
` buyerNotesInvoiceFormFieldVisibilitySwitch ` ,
) ;
await expect ( buyerNotesSwitch ) . toHaveRole ( "switch" ) ;
await expect ( buyerNotesSwitch ) . toBeChecked ( ) ;
const invoiceSection = page . getByTestId ( ` invoice-items-section ` ) ;
// Amount field
await invoiceSection
. getByRole ( "spinbutton" , { name : "Amount (Quantity)" } )
. fill ( "3" ) ;
// Net price field
await invoiceSection
. getByRole ( "spinbutton" , {
name : "Net Price (Rate or Unit Price)" ,
} )
. fill ( "1000" ) ;
// Toggle VAT Table Summary visibility off
await page
. getByRole ( "switch" , { name : ` Show "VAT Table Summary" in the PDF ` } )
. click ( ) ;
const notesFinalSection = page . getByTestId ( ` final-section ` ) ;
// for better debugging screenshots, we fill in the notes field with a test note =)
await notesFinalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: update pdf when invoice data changes ( ${ testInfo . project . name } ) ` ,
) ;
// Wait for PDF preview to regenerate after invoice data changes (debounce timeout)
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
const downloadPdfEnglishButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
await expect ( downloadPdfEnglishButton ) . toBeVisible ( ) ;
await expect ( downloadPdfEnglishButton ) . toBeEnabled ( ) ;
// Click the download button and wait for download
const [ download ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfEnglishButton . click ( ) ,
] ) ;
// Get the suggested filename
const suggestedFilename = download . suggestedFilename ( ) ;
// save the file to temporary directory
const pdfFilePath = path . join (
downloadDir ,
` ${ browserName } - ${ suggestedFilename } ` ,
) ;
await download . saveAs ( pdfFilePath ) ;
// Convert to absolute path and use proper file URL format
const absolutePath = path . resolve ( pdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( absolutePath ) ) . toBe ( true ) ;
/ * *
* RENDER PDF ON CANVAS AND TAKE SCREENSHOT OF IT
* /
const pdfBytes = fs . readFileSync ( absolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , pdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
` update-pdf-when-invoice-data-changes.png ` ,
) ;
// navigate back to the previous page
2026-02-25 14:21:34 +00:00
await page . goto ( "/" ) ;
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
// Wait for the download button to be ready after navigation
const newDownloadPdfButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
await expect ( newDownloadPdfButton ) . toBeVisible ( ) ;
await expect ( newDownloadPdfButton ) . toBeEnabled ( ) ;
/ * *
* Switch to Stripe template and download PDF in English with Stripe template
* /
await page
. getByRole ( "combobox" , { name : "Invoice Template" } )
. selectOption ( "stripe" ) ;
await page . waitForURL ( "/?template=stripe" ) ;
// Verify that the Stripe template is selected
const templateSelect = page . getByRole ( "combobox" , {
name : "Invoice Template" ,
} ) ;
await expect ( templateSelect ) . toHaveValue ( "stripe" ) ;
// for better debugging screenshots, we fill in the notes field with a test note =)
await notesFinalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: update pdf when invoice data changes with Stripe template ( ${ testInfo . project . name } ) ` ,
) ;
// wait for debounce timeout
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
const downloadPdfStripeButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
await expect ( downloadPdfStripeButton ) . toBeVisible ( ) ;
// Click the download button and wait for download
const [ stripeDownload ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfStripeButton . click ( ) ,
] ) ;
// Get the suggested filename
const stripeSuggestedFilename = stripeDownload . suggestedFilename ( ) ;
// save the file to temporary directory
const stripePdfFilePath = path . join (
downloadDir ,
` ${ browserName } -stripe- ${ stripeSuggestedFilename } ` ,
) ;
await stripeDownload . saveAs ( stripePdfFilePath ) ;
// Convert to absolute path and use proper file URL format
const stripeAbsolutePath = path . resolve ( stripePdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( stripeAbsolutePath ) ) . toBe ( true ) ;
const stripePdfBytes = fs . readFileSync ( stripeAbsolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , stripePdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
` update-pdf-when-invoice-data-changes-stripe-template.png ` ,
) ;
} ) ;
test ( "completes full invoice flow on mobile: tabs navigation, form editing and PDF download in French" , async ( {
page ,
browserName ,
downloadDir ,
} , testInfo ) = > {
// Set mobile viewport
await page . setViewportSize ( { width : 375 , height : 667 } ) ;
// Verify tabs are visible in mobile view
await expect ( page . getByRole ( "tab" , { name : "Edit Invoice" } ) ) . toBeVisible ( ) ;
await expect ( page . getByRole ( "tab" , { name : "Preview PDF" } ) ) . toBeVisible ( ) ;
// Download button in English is visible and enabled
const downloadPdfButtonEnglish = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
// Wait for download button to be visible
await expect ( downloadPdfButtonEnglish ) . toBeVisible ( ) ;
// Wait for download button to be enabled
await expect ( downloadPdfButtonEnglish ) . toBeEnabled ( ) ;
// Switch to French
await page
. getByRole ( "combobox" , { name : "Invoice PDF Language" } )
. selectOption ( "fr" ) ;
2026-03-08 16:36:02 +00:00
// Switch currency to GBP via combobox
const mobileCurrencyCombobox = page . getByRole ( "combobox" , {
name : "Currency" ,
} ) ;
await mobileCurrencyCombobox . click ( ) ;
await page . getByRole ( "option" , { name : /^GBP\s/ } ) . click ( ) ;
await expect ( mobileCurrencyCombobox ) . toContainText ( "GBP" ) ;
// check that value is saved in the hidden input
await expect ( page . locator ( 'input[name="currency"]' ) ) . toHaveValue ( "GBP" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
const invoiceNumberFieldset = page . getByRole ( "group" , {
name : "Invoice Number" ,
} ) ;
const invoiceNumberLabelInput = invoiceNumberFieldset . getByRole ( "textbox" , {
name : "Label" ,
} ) ;
const invoiceNumberValueInput = invoiceNumberFieldset . getByRole ( "textbox" , {
name : "Value" ,
} ) ;
await invoiceNumberLabelInput . fill ( "MOBILE-TEST-001:" ) ;
await invoiceNumberValueInput . fill ( "2/05-2024" ) ;
const finalSection = page . getByTestId ( "final-section" ) ;
// for better debugging screenshots, we fill in the notes field with a test note =)
await finalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: completes full invoice flow on mobile: tabs navigation, form editing and PDF download in French ( ${ testInfo . project . name } ) ` ,
) ;
// Fill in seller information
const sellerSection = page . getByTestId ( "seller-information-section" ) ;
await sellerSection
. getByRole ( "textbox" , { name : "Name" } )
. fill ( "Mobile Test Seller" ) ;
await sellerSection
. getByRole ( "textbox" , { name : "Address" } )
. fill ( "456 Mobile St" ) ;
// Fill in an invoice item
const invoiceItemsSection = page . getByTestId ( "invoice-items-section" ) ;
await invoiceItemsSection
. getByRole ( "spinbutton" , { name : "Amount (Quantity)" } )
. fill ( "3" ) ;
await invoiceItemsSection
. getByRole ( "spinbutton" , {
name : "Net Price (Rate or Unit Price)" ,
} )
. fill ( "50" ) ;
const taxSettingsFieldset = invoiceItemsSection . getByRole ( "group" , {
name : "Tax Settings" ,
} ) ;
await taxSettingsFieldset
2026-03-01 20:17:29 +00:00
. getByRole ( "textbox" , { name : "TVA Rate" , exact : true } )
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
. fill ( "23" ) ;
// wait for debounce timeout
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
// we wait until this button is visible and enabled, that means that the PDF preview has been regenerated
const downloadPdfFrenchBtn = page . getByRole ( "link" , {
name : "Download PDF in French" ,
} ) ;
// Wait for download button to be visible and enabled
await expect ( downloadPdfFrenchBtn ) . toBeVisible ( ) ;
await expect ( downloadPdfFrenchBtn ) . toBeEnabled ( ) ;
// Switch to preview tab
await page . getByRole ( "tab" , { name : "Preview PDF" } ) . click ( ) ;
// Verify preview tab is selected
await expect (
page . getByRole ( "tabpanel" , { name : "Preview PDF" } ) ,
) . toBeVisible ( ) ;
await expect (
page . getByRole ( "tabpanel" , { name : "Edit Invoice" } ) ,
) . toBeHidden ( ) ;
// Click the download button and wait for download
const [ download ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfFrenchBtn . click ( ) ,
] ) ;
// Get the suggested filename
const suggestedFilename = download . suggestedFilename ( ) ;
// save the file to temporary directory
const pdfFilePath = path . join (
downloadDir ,
` ${ browserName } - ${ suggestedFilename } ` ,
) ;
await download . saveAs ( pdfFilePath ) ;
// Verify toast appears after download
await expect ( page . getByTestId ( "download-pdf-toast" ) ) . toBeVisible ( ) ;
await expect (
page . getByRole ( "link" , { name : "Star on GitHub" } ) ,
) . toBeVisible ( ) ;
await expect ( page . getByTestId ( "toast-cta-btn" ) ) . toBeVisible ( ) ;
// Convert to absolute path and use proper file URL format
const absolutePath = path . resolve ( pdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( absolutePath ) ) . toBe ( true ) ;
/ * *
* RENDER PDF ON CANVAS AND TAKE SCREENSHOT OF IT
* /
const pdfBytes = fs . readFileSync ( absolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , pdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
` completes-full-invoice-flow-on-mobile.png ` ,
) ;
// Navigate back to the previous page
2026-02-25 14:21:34 +00:00
await page . goto ( "/" ) ;
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
// Set mobile viewport again
await page . setViewportSize ( { width : 375 , height : 667 } ) ;
// Switch back to form tab
await page . getByRole ( "tab" , { name : "Edit Invoice" } ) . click ( ) ;
// Verify form tab is selected and data persists
await expect (
page . getByRole ( "tabpanel" , { name : "Edit Invoice" } ) ,
) . toBeVisible ( ) ;
await expect (
page . getByRole ( "tabpanel" , { name : "Preview PDF" } ) ,
) . toBeHidden ( ) ;
// Verify form data persists
await expect ( invoiceNumberLabelInput ) . toHaveValue ( "MOBILE-TEST-001:" ) ;
await expect ( invoiceNumberValueInput ) . toHaveValue ( "2/05-2024" ) ;
await expect (
finalSection . getByRole ( "textbox" , { name : "Notes" , exact : true } ) ,
) . toHaveValue (
` Test: completes full invoice flow on mobile: tabs navigation, form editing and PDF download in French ( ${ testInfo . project . name } ) ` ,
) ;
// Verify seller information persists
await expect (
sellerSection . getByRole ( "textbox" , { name : "Name" } ) ,
) . toHaveValue ( "Mobile Test Seller" ) ;
await expect (
sellerSection . getByRole ( "textbox" , { name : "Address" } ) ,
) . toHaveValue ( "456 Mobile St" ) ;
// Verify invoice item persists
await expect (
invoiceItemsSection . getByRole ( "spinbutton" , {
name : "Amount (Quantity)" ,
} ) ,
) . toHaveValue ( "3" ) ;
await expect (
invoiceItemsSection . getByRole ( "spinbutton" , {
name : "Net Price (Rate or Unit Price)" ,
} ) ,
) . toHaveValue ( "50" ) ;
const newTaxSettingsFieldset = invoiceItemsSection . getByRole ( "group" , {
name : "Tax Settings" ,
} ) ;
await expect (
2026-03-01 20:17:29 +00:00
newTaxSettingsFieldset . getByRole ( "textbox" , {
name : "TVA Rate" ,
exact : true ,
} ) ,
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
) . toHaveValue ( "23" ) ;
// Verify calculations are correct
await expect (
invoiceItemsSection . getByRole ( "textbox" , {
name : "Net Amount" ,
exact : true ,
} ) ,
) . toHaveValue ( "150.00" ) ;
await expect (
invoiceItemsSection . getByRole ( "textbox" , {
name : "TVA Amount" ,
exact : true ,
} ) ,
) . toHaveValue ( "34.50" ) ;
await expect (
invoiceItemsSection . getByRole ( "textbox" , {
name : "Pre-tax Amount" ,
exact : true ,
} ) ,
) . toHaveValue ( "184.50" ) ;
/ * *
* Switch to Stripe template and download PDF in English with Stripe template
* /
await page
. getByRole ( "combobox" , { name : "Invoice Template" } )
. selectOption ( "stripe" ) ;
await page . waitForURL ( "/?template=stripe" ) ;
// Verify that the Stripe template is selected
const templateSelect = page . getByRole ( "combobox" , {
name : "Invoice Template" ,
} ) ;
await expect ( templateSelect ) . toHaveValue ( "stripe" ) ;
const newFinalSection = page . getByTestId ( ` final-section ` ) ;
// for better debugging screenshots, we fill in the notes field with a test note =)
await newFinalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: completes full invoice flow on mobile: tabs navigation, form editing and PDF download in French with Stripe template ( ${ testInfo . project . name } ) ` ,
) ;
// wait for debounce timeout
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
const downloadPdfStripeButton = page . getByRole ( "link" , {
name : "Download PDF in French" ,
} ) ;
await expect ( downloadPdfStripeButton ) . toBeVisible ( ) ;
// Click the download button and wait for download
const [ stripeDownload ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfStripeButton . click ( ) ,
] ) ;
// Get the suggested filename
const stripeSuggestedFilename = stripeDownload . suggestedFilename ( ) ;
// save the file to temporary directory
const stripePdfFilePath = path . join (
downloadDir ,
` ${ browserName } -stripe- ${ stripeSuggestedFilename } ` ,
) ;
await stripeDownload . saveAs ( stripePdfFilePath ) ;
// Convert to absolute path and use proper file URL format
const stripeAbsolutePath = path . resolve ( stripePdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( stripeAbsolutePath ) ) . toBe ( true ) ;
/ * *
* RENDER PDF ON CANVAS AND TAKE SCREENSHOT OF IT
* /
const stripePdfBytes = fs . readFileSync ( stripeAbsolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , stripePdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
` completes-full-invoice-flow-on-mobile-stripe-template.png ` ,
) ;
} ) ;
test ( "should display and persist invoice number in different languages" , async ( {
page ,
downloadDir ,
browserName ,
} , testInfo ) = > {
const generalInfoSection = page . getByTestId ( "general-information-section" ) ;
const invoiceNumberFieldset = generalInfoSection . getByRole ( "group" , {
name : "Invoice Number" ,
} ) ;
const invoiceNumberLabelInput = invoiceNumberFieldset . getByRole ( "textbox" , {
name : "Label" ,
} ) ;
const invoiceNumberValueInput = invoiceNumberFieldset . getByRole ( "textbox" , {
name : "Value" ,
} ) ;
await expect ( invoiceNumberLabelInput ) . toHaveValue (
INITIAL_INVOICE_DATA . invoiceNumberObject . label ,
) ;
// we mock the system time to a fixed date, so that the invoice number is consistent across tests
await expect ( invoiceNumberValueInput ) . toHaveValue ( "1/12-2025" ) ;
const languageSelect = page . getByRole ( "combobox" , {
name : "Invoice PDF Language" ,
} ) ;
await languageSelect . selectOption ( "pl" ) ;
await expect ( invoiceNumberLabelInput ) . toHaveValue (
` ${ INVOICE_PDF_TRANSLATIONS . pl . invoiceNumber } : ` ,
) ;
// we mock the system time to a fixed date, so that the invoice number is consistent across tests
await expect ( invoiceNumberValueInput ) . toHaveValue ( "1/12-2025" ) ;
// I can fill in a new invoice number
await invoiceNumberLabelInput . fill ( "Faktura TEST:" ) ;
// check that warning message appears
const switchToDefaultFormatButton = page . getByRole ( "button" , {
name : ` Switch to default label ("Faktura nr:") ` ,
} ) ;
await expect ( switchToDefaultFormatButton ) . toBeVisible ( ) ;
// switch to default format
await switchToDefaultFormatButton . click ( ) ;
// check that the invoice number is updated to the default format
await expect ( invoiceNumberLabelInput ) . toHaveValue ( ` Faktura nr: ` ) ;
// check that the switch to default format button is hidden
await expect ( switchToDefaultFormatButton ) . toBeHidden ( ) ;
// fill once again the invoice number
await invoiceNumberLabelInput . fill ( "Faktura TEST:" ) ;
2026-03-08 16:36:02 +00:00
// Switch currency to CHF via combobox
const currencyCombobox2 = page . getByRole ( "combobox" , { name : "Currency" } ) ;
await currencyCombobox2 . click ( ) ;
await page . getByRole ( "option" , { name : /^CHF\s/ } ) . click ( ) ;
await expect ( currencyCombobox2 ) . toContainText ( "CHF" ) ;
// check that value is saved in the hidden input
await expect ( page . locator ( 'input[name="currency"]' ) ) . toHaveValue ( "CHF" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
const notesFinalSection = page . getByTestId ( ` final-section ` ) ;
// for better debugging screenshots, we fill in the notes field with a test note =)
await notesFinalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: should display and persist invoice number in different languages ( ${ testInfo . project . name } ) ` ,
) ;
// we wait until this button is visible and enabled, that means that the PDF preview has been regenerated
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
// we reload the page to test that the invoice number is persisted after page reload
await page . reload ( ) ;
// Verify that the download PDF button is visible after page reload
const downloadPdfPlButton = page . getByRole ( "link" , {
name : "Download PDF in Polish" ,
} ) ;
await expect ( downloadPdfPlButton ) . toBeVisible ( ) ;
const newInvoiceNumberLabelInput = invoiceNumberFieldset . getByRole (
"textbox" ,
{
name : "Label" ,
} ,
) ;
// Verify that the invoice number is persisted after page reload
await expect ( newInvoiceNumberLabelInput ) . toHaveValue ( "Faktura TEST:" ) ;
const newLanguageSelect = page . getByRole ( "combobox" , {
name : "Invoice PDF Language" ,
} ) ;
// Verify that the language is persisted after page reload
await expect ( newLanguageSelect ) . toHaveValue ( "pl" ) ;
// switch to Portuguese
await newLanguageSelect . selectOption ( "pt" ) ;
await expect ( newInvoiceNumberLabelInput ) . toHaveValue (
` ${ INVOICE_PDF_TRANSLATIONS . pt . invoiceNumber } : ` ,
) ;
await newInvoiceNumberLabelInput . fill ( "Fatura TEST PORTUGUESE N°:" ) ;
await expect (
page . getByRole ( "button" , {
name : ` Switch to default label ("Fatura N°:") ` ,
} ) ,
) . toBeVisible ( ) ;
2026-03-08 16:36:02 +00:00
const newCurrencyCombobox = page . getByRole ( "combobox" , {
name : "Currency" ,
} ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
// Verify CHF currency is selected
2026-03-08 16:36:02 +00:00
await expect ( newCurrencyCombobox ) . toContainText ( "CHF" ) ;
// check that value is saved in the hidden input
await expect ( page . locator ( 'input[name="currency"]' ) ) . toHaveValue ( "CHF" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
// wait for debounce timeout
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
// we wait until this button is visible and enabled, that means that the PDF preview has been regenerated
const downloadPdfPtButton = page . getByRole ( "link" , {
name : "Download PDF in Portuguese" ,
} ) ;
await expect ( downloadPdfPtButton ) . toBeVisible ( ) ;
await expect ( downloadPdfPtButton ) . toBeEnabled ( ) ;
// Click the download button and wait for download
const [ download ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfPtButton . click ( ) ,
] ) ;
// Get the suggested filename
const suggestedFilename = download . suggestedFilename ( ) ;
// save the file to temporary directory
const pdfFilePath = path . join (
downloadDir ,
` ${ browserName } - ${ suggestedFilename } ` ,
) ;
await download . saveAs ( pdfFilePath ) ;
// Convert to absolute path and use proper file URL format
const absolutePath = path . resolve ( pdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( absolutePath ) ) . toBe ( true ) ;
/ * *
* RENDER PDF ON CANVAS AND TAKE SCREENSHOT OF IT
* /
const pdfBytes = fs . readFileSync ( absolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , pdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
` should-display-and-persist-invoice-number-in-different-languages.png ` ,
) ;
// navigate back to the previous page
2026-02-25 14:21:34 +00:00
await page . goto ( "/" ) ;
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
/ * *
* Switch to Stripe template and download PDF in English with Stripe template
* /
await page
. getByRole ( "combobox" , { name : "Invoice Template" } )
. selectOption ( "stripe" ) ;
await page . waitForURL ( "/?template=stripe" ) ;
// Verify that the Stripe template is selected
const templateSelect = page . getByRole ( "combobox" , {
name : "Invoice Template" ,
} ) ;
await expect ( templateSelect ) . toHaveValue ( "stripe" ) ;
// Currency should be CHF after navigating back to the previous page
2026-03-08 16:36:02 +00:00
const currencyCombobox3 = page . getByRole ( "combobox" , { name : "Currency" } ) ;
await expect ( currencyCombobox3 ) . toContainText ( "CHF" ) ;
// check that value is saved in the hidden input
await expect ( page . locator ( 'input[name="currency"]' ) ) . toHaveValue ( "CHF" ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
const newNotesFinalSection = page . getByTestId ( ` final-section ` ) ;
// for better debugging screenshots, we fill in the notes field with a test note =)
await newNotesFinalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: should display and persist invoice number in different languages with Stripe template ( ${ testInfo . project . name } ) ` ,
) ;
// wait for debounce timeout
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
const downloadPdfStripeButton = page . getByRole ( "link" , {
name : "Download PDF in Portuguese" ,
} ) ;
await expect ( downloadPdfStripeButton ) . toBeVisible ( ) ;
// Click the download button and wait for download
const [ stripeDownload ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfStripeButton . click ( ) ,
] ) ;
// Get the suggested filename
const stripeSuggestedFilename = stripeDownload . suggestedFilename ( ) ;
// save the file to temporary directory
const stripePdfFilePath = path . join (
downloadDir ,
` ${ browserName } -stripe- ${ stripeSuggestedFilename } ` ,
) ;
await stripeDownload . saveAs ( stripePdfFilePath ) ;
// Convert to absolute path and use proper file URL format
const stripeAbsolutePath = path . resolve ( stripePdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( stripeAbsolutePath ) ) . toBe ( true ) ;
/ * *
* RENDER PDF ON CANVAS AND TAKE SCREENSHOT OF IT
* /
const stripePdfBytes = fs . readFileSync ( stripeAbsolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , stripePdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
` should-display-and-persist-invoice-number-in-different-languages-stripe-template.png ` ,
) ;
} ) ;
feat: add QR code functionality to invoice templates and other improvements + bug fixes (#165)
* feat: add QR code functionality to invoice templates and enhance user experience
* Introduced QR code generation for invoices, allowing users to include a QR code with customizable descriptions.
* Updated invoice templates to display QR codes in both default and Stripe formats.
* Enhanced form components to support QR code data input and visibility toggles.
* Added utility functions for generating QR code data URLs.
* Updated tests and snapshots to cover new QR code features and ensure visual consistency across templates.
* Introduced a Code of Conduct document to promote a respectful community environment.
* feat: enhance error handling and metadata management in invoice application
* Updated error handling to reset invoice metadata to default upon error occurrence.
* Refactored invoice client page to utilize a constant for default mobile tab value.
* Improved metadata structure by including last visited mobile tab in the default metadata.
* Adjusted schema to allow optional item name field for better flexibility in invoice items.
* fix: downgrade react-pdf version and update mobile tab handling
* Downgraded react-pdf from version 10.1.0 to 9.2.1 for compatibility.
* Updated mobile tab handling to utilize the last visited tab from app metadata.
* Refactored invoice client page to improve metadata management and ensure proper tab state persistence.
* fix: remove redundant validation message for item name in invoice form
* chore: update TODO list and comment out scroll to top effect in AppPageClient
* Added a new issue link to the TODO.md for tracking.
* Commented out the scroll to top effect in page.client.tsx for potential future use.
* refactor: streamline viewport settings and restore scroll to top effect in AppPageClient
* Simplified viewport configuration by removing unnecessary properties.
* Restored the scroll to top effect in AppPageClient for improved user experience on initial render.
* revert viewport
* fix: prevent jumping on iOS when typing in textarea component
* Added resize-none class to the textarea to improve user experience on iOS devices by preventing layout shifts while typing.
* feat: reworked app logic, improved multi-page pdf layout, add/update e2e tests, improvements and bug fixes
* Enhanced README.md with new features, including multi-page PDF support, QR code functionality, and live preview demos.
* Added demo GIFs to showcase new features and improve user understanding.
* Updated key features section for clarity and added a news & updates section for version tracking.
* feat: add debounced error handling in invoice form component
* Introduced a debounced callback for showing form errors to improve user experience by preventing rapid toast notifications.
* Updated validation logic to utilize the new debounced error handling mechanism.
* chore: update e2e snapshots and improved form errors toast
* fix: improve PDF viewer and QR code layout in invoice templates
* Added state management for page numbers in the mobile PDF viewer to handle multi-page documents.
* Adjusted QR code positioning and size to prevent overlap with the fixed footer.
* Updated padding in the Stripe template styles to resolve overlapping issues with the footer.
* Updated TODO.md with additional context on preventing layout issues in PDF rendering.
* feat: enhance invoice sharing logic with validation error handling
* Added a new test to verify error toast visibility when the invoice form has validation errors.
* Implemented state management for form validation errors in the AppPageClient.
* Updated the InvoiceForm component to manage error states and trigger appropriate toasts for user feedback.
* Ensured that the share button behavior reflects the form's validation state, improving user experience.
* feat: enhance invoice template with authorized person fields
* Added fields for Person Authorized to Receive and Person Authorized to Issue in the default invoice template.
* Implemented visibility toggles for these fields in the invoice form.
* Updated tests to verify the correct behavior of these fields in both default and Stripe invoice templates.
* Enhanced PDF rendering to include names of authorized persons when applicable.
* feat: implement cooldown for CTA toasts and update UI elements
* Introduced a 5-minute cooldown for showing CTA toasts to enhance user experience.
* Updated toast management logic in various components to respect the new cooldown.
* Adjusted text color in the InvoiceClientPage for better visibility.
* Refined tooltip content in the invoice form to clarify functionality.
* Updated TODO.md to reflect changes in toast behavior.
* feat: add unit column switch to stripe invoice template
* Changed toggle labels from Show/hide to Show for various fields in the invoice forms and dialogs to enhance clarity.
* Updated related test cases to reflect the new label changes across buyer, seller, and invoice templates.
* Ensured consistency in user interface elements for better user experience.
* chore: adjust text size
* feat: update README and improve CTA toast logic
* Replaced the EasyInvoicePDF logo with a new design and adjusted its size for better visibility.
* Enhanced the call-to-action (CTA) toast functionality by refining the logic for showing toasts based on user interactions and session activity.
* Updated text in the invoice form to clarify user actions and improve overall user experience.
* Added a new logo image to the project assets.
* update readme
* refactor: improved mobile PDF viewer by importing the PDF worker directl, improve CTA toast logic, update readme
* Renamed sections in README for clarity, including Live Preview to Invoice PDF Live Preview and Instant Download to Instant PDF Download.
* Adjusted text in CTA toasts for better engagement.
* Updated minimum time on page and interactions required for showing CTA toasts to enhance user experience.
* Improved mobile PDF viewer by importing the PDF worker directly and addressing related issues in TODO.md.
* fix: adjust CTA toast display timing for improved user experience
* Updated the timeout for showing the CTA toast to 6 seconds after the invoice link notification, enhancing the visibility and timing of user prompts.
* feat: Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* Added a new command in package.json for running cloudflared tunnel.
* Updated tests to verify the visibility of the share invoice link description toast.
* Refined toast notifications in the AppPageClient to include new IDs for better tracking and user feedback.
* Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* feat: enhance toast notifications with unique IDs for better ux
* fix: adjust invoice item limit in tests and update translations for total excluding tax
* Reduced the maximum number of invoice items in the test from 20 to 15 to better align with URL limits.
* Updated translations in the PDF i18n schema and related files to include total excluding tax in multiple languages.
* Modified the invoice PDF template to display the total excluding tax using localized text.
* fix qr code race condition
* fix: update URL variable names and enhance sharing logic for better clarity
* Renamed variables for generated URLs to improve code readability.
* Updated sharing logic to ensure consistent use of the new variable names across mobile and desktop sharing methods.
* Enhanced toast notifications to dismiss previous messages and track share events more effectively.
* fix: update tax label helper message for clarity in invoice items
* readme upd
* fix: adjust idle time and minimum interactions for CTA toast display
* Increased idle time from 3 seconds to 5 seconds to improve user engagement.
* Updated minimum interactions required for showing the CTA toast from 2 to 3 to enhance user experience.
* feat: implement cooldown logic for CTA toast display
* Added functionality to track the last shown timestamp of the CTA toast using localStorage.
* Introduced a 7-day cooldown period to prevent the toast from being shown multiple times within a week.
* Updated context to reflect whether the CTA toast was shown recently, enhancing user experience.
* chore: update dependencies and add GitHub workflows for linting and type checking
* Updated package versions in package.json and pnpm-lock.yaml for better compatibility and performance.
* Added GitHub Actions workflows for ESLint and TypeScript type checking to ensure code quality and consistency.
* Enhanced buyer and seller management components with improved state management and type safety.
* feat: enhance invoice sharing and download tracking
* Added functionality to track the number of times invoices are shared via link and downloaded as PDF.
* Updated the app metadata structure to include and .
* Implemented logic to increment these counts upon sharing and downloading invoices, improving analytics and user engagement.
* refactor: update README and TODO for clarity and consistency
2026-02-24 18:53:24 +00:00
test ( "displays QR code in PDF when QR code data is provided" , async ( {
page ,
browserName ,
downloadDir ,
} , testInfo ) = > {
const QR_CODE_TEST_DATA = {
data : "https://easyinvoicepdf.com" ,
description : "QR Code Description" ,
} as const satisfies {
data : string ;
description : string ;
} ;
// verify that we are on the default template
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
const finalSection = page . getByTestId ( "final-section" ) ;
const qrCodeFieldset = finalSection . getByRole ( "group" , {
name : "QR Code" ,
} ) ;
await expect ( qrCodeFieldset ) . toBeVisible ( ) ;
// Verify that "Show QR Code in PDF" switch is on by default
const showQrCodeSwitch = qrCodeFieldset . getByRole ( "switch" , {
name : "Show QR Code in PDF" ,
} ) ;
await expect ( showQrCodeSwitch ) . toBeVisible ( ) ;
await expect ( showQrCodeSwitch ) . toBeEnabled ( ) ;
await expect ( showQrCodeSwitch ) . toBeChecked ( ) ;
// Fill in the QR code data field
await qrCodeFieldset
. getByRole ( "textbox" , { name : "Data" } )
. fill ( QR_CODE_TEST_DATA . data ) ;
// Fill in the QR code description field
await qrCodeFieldset
. getByRole ( "textbox" , { name : "Description (optional)" } )
. fill ( QR_CODE_TEST_DATA . description ) ;
// for better debugging screenshots, we fill in the notes field with a test note =)
await finalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill ( ` Test: ${ testInfo . title } ( ${ testInfo . project . name } ) ` ) ;
// Wait for debounce timeout
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
const downloadPdfEnglishButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
await expect ( downloadPdfEnglishButton ) . toBeVisible ( ) ;
await expect ( downloadPdfEnglishButton ) . toBeEnabled ( ) ;
// Click the download button and wait for download
const [ download ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfEnglishButton . click ( ) ,
] ) ;
// Get the suggested filename
const suggestedFilename = download . suggestedFilename ( ) ;
// save the file to temporary directory
const pdfFilePath = path . join (
downloadDir ,
` ${ browserName } - ${ suggestedFilename } ` ,
) ;
await download . saveAs ( pdfFilePath ) ;
// Convert to absolute path and use proper file URL format
const absolutePath = path . resolve ( pdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( absolutePath ) ) . toBe ( true ) ;
/ * *
* Render the PDF on a canvas and take a screenshot of it
* /
const pdfBytes = fs . readFileSync ( absolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , pdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
"displays-qr-code-in-pdf-default-template.png" ,
) ;
/ * *
* TURN OFF QR CODE IN PDF AND DOWNLOAD PDF AGAIN
* /
// navigate back to the previous page
2026-02-25 14:21:34 +00:00
await page . goto ( "/" ) ;
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
feat: add QR code functionality to invoice templates and other improvements + bug fixes (#165)
* feat: add QR code functionality to invoice templates and enhance user experience
* Introduced QR code generation for invoices, allowing users to include a QR code with customizable descriptions.
* Updated invoice templates to display QR codes in both default and Stripe formats.
* Enhanced form components to support QR code data input and visibility toggles.
* Added utility functions for generating QR code data URLs.
* Updated tests and snapshots to cover new QR code features and ensure visual consistency across templates.
* Introduced a Code of Conduct document to promote a respectful community environment.
* feat: enhance error handling and metadata management in invoice application
* Updated error handling to reset invoice metadata to default upon error occurrence.
* Refactored invoice client page to utilize a constant for default mobile tab value.
* Improved metadata structure by including last visited mobile tab in the default metadata.
* Adjusted schema to allow optional item name field for better flexibility in invoice items.
* fix: downgrade react-pdf version and update mobile tab handling
* Downgraded react-pdf from version 10.1.0 to 9.2.1 for compatibility.
* Updated mobile tab handling to utilize the last visited tab from app metadata.
* Refactored invoice client page to improve metadata management and ensure proper tab state persistence.
* fix: remove redundant validation message for item name in invoice form
* chore: update TODO list and comment out scroll to top effect in AppPageClient
* Added a new issue link to the TODO.md for tracking.
* Commented out the scroll to top effect in page.client.tsx for potential future use.
* refactor: streamline viewport settings and restore scroll to top effect in AppPageClient
* Simplified viewport configuration by removing unnecessary properties.
* Restored the scroll to top effect in AppPageClient for improved user experience on initial render.
* revert viewport
* fix: prevent jumping on iOS when typing in textarea component
* Added resize-none class to the textarea to improve user experience on iOS devices by preventing layout shifts while typing.
* feat: reworked app logic, improved multi-page pdf layout, add/update e2e tests, improvements and bug fixes
* Enhanced README.md with new features, including multi-page PDF support, QR code functionality, and live preview demos.
* Added demo GIFs to showcase new features and improve user understanding.
* Updated key features section for clarity and added a news & updates section for version tracking.
* feat: add debounced error handling in invoice form component
* Introduced a debounced callback for showing form errors to improve user experience by preventing rapid toast notifications.
* Updated validation logic to utilize the new debounced error handling mechanism.
* chore: update e2e snapshots and improved form errors toast
* fix: improve PDF viewer and QR code layout in invoice templates
* Added state management for page numbers in the mobile PDF viewer to handle multi-page documents.
* Adjusted QR code positioning and size to prevent overlap with the fixed footer.
* Updated padding in the Stripe template styles to resolve overlapping issues with the footer.
* Updated TODO.md with additional context on preventing layout issues in PDF rendering.
* feat: enhance invoice sharing logic with validation error handling
* Added a new test to verify error toast visibility when the invoice form has validation errors.
* Implemented state management for form validation errors in the AppPageClient.
* Updated the InvoiceForm component to manage error states and trigger appropriate toasts for user feedback.
* Ensured that the share button behavior reflects the form's validation state, improving user experience.
* feat: enhance invoice template with authorized person fields
* Added fields for Person Authorized to Receive and Person Authorized to Issue in the default invoice template.
* Implemented visibility toggles for these fields in the invoice form.
* Updated tests to verify the correct behavior of these fields in both default and Stripe invoice templates.
* Enhanced PDF rendering to include names of authorized persons when applicable.
* feat: implement cooldown for CTA toasts and update UI elements
* Introduced a 5-minute cooldown for showing CTA toasts to enhance user experience.
* Updated toast management logic in various components to respect the new cooldown.
* Adjusted text color in the InvoiceClientPage for better visibility.
* Refined tooltip content in the invoice form to clarify functionality.
* Updated TODO.md to reflect changes in toast behavior.
* feat: add unit column switch to stripe invoice template
* Changed toggle labels from Show/hide to Show for various fields in the invoice forms and dialogs to enhance clarity.
* Updated related test cases to reflect the new label changes across buyer, seller, and invoice templates.
* Ensured consistency in user interface elements for better user experience.
* chore: adjust text size
* feat: update README and improve CTA toast logic
* Replaced the EasyInvoicePDF logo with a new design and adjusted its size for better visibility.
* Enhanced the call-to-action (CTA) toast functionality by refining the logic for showing toasts based on user interactions and session activity.
* Updated text in the invoice form to clarify user actions and improve overall user experience.
* Added a new logo image to the project assets.
* update readme
* refactor: improved mobile PDF viewer by importing the PDF worker directl, improve CTA toast logic, update readme
* Renamed sections in README for clarity, including Live Preview to Invoice PDF Live Preview and Instant Download to Instant PDF Download.
* Adjusted text in CTA toasts for better engagement.
* Updated minimum time on page and interactions required for showing CTA toasts to enhance user experience.
* Improved mobile PDF viewer by importing the PDF worker directly and addressing related issues in TODO.md.
* fix: adjust CTA toast display timing for improved user experience
* Updated the timeout for showing the CTA toast to 6 seconds after the invoice link notification, enhancing the visibility and timing of user prompts.
* feat: Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* Added a new command in package.json for running cloudflared tunnel.
* Updated tests to verify the visibility of the share invoice link description toast.
* Refined toast notifications in the AppPageClient to include new IDs for better tracking and user feedback.
* Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* feat: enhance toast notifications with unique IDs for better ux
* fix: adjust invoice item limit in tests and update translations for total excluding tax
* Reduced the maximum number of invoice items in the test from 20 to 15 to better align with URL limits.
* Updated translations in the PDF i18n schema and related files to include total excluding tax in multiple languages.
* Modified the invoice PDF template to display the total excluding tax using localized text.
* fix qr code race condition
* fix: update URL variable names and enhance sharing logic for better clarity
* Renamed variables for generated URLs to improve code readability.
* Updated sharing logic to ensure consistent use of the new variable names across mobile and desktop sharing methods.
* Enhanced toast notifications to dismiss previous messages and track share events more effectively.
* fix: update tax label helper message for clarity in invoice items
* readme upd
* fix: adjust idle time and minimum interactions for CTA toast display
* Increased idle time from 3 seconds to 5 seconds to improve user engagement.
* Updated minimum interactions required for showing the CTA toast from 2 to 3 to enhance user experience.
* feat: implement cooldown logic for CTA toast display
* Added functionality to track the last shown timestamp of the CTA toast using localStorage.
* Introduced a 7-day cooldown period to prevent the toast from being shown multiple times within a week.
* Updated context to reflect whether the CTA toast was shown recently, enhancing user experience.
* chore: update dependencies and add GitHub workflows for linting and type checking
* Updated package versions in package.json and pnpm-lock.yaml for better compatibility and performance.
* Added GitHub Actions workflows for ESLint and TypeScript type checking to ensure code quality and consistency.
* Enhanced buyer and seller management components with improved state management and type safety.
* feat: enhance invoice sharing and download tracking
* Added functionality to track the number of times invoices are shared via link and downloaded as PDF.
* Updated the app metadata structure to include and .
* Implemented logic to increment these counts upon sharing and downloading invoices, improving analytics and user engagement.
* refactor: update README and TODO for clarity and consistency
2026-02-24 18:53:24 +00:00
// verify that we are on the default template
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
const newFinalSection = page . getByTestId ( "final-section" ) ;
const newQrCodeFieldset = newFinalSection . getByRole ( "group" , {
name : "QR Code" ,
} ) ;
await expect ( newQrCodeFieldset ) . toBeVisible ( ) ;
// Verify that "Show QR Code in PDF" switch is on by default
const newShowQrCodeSwitch = newQrCodeFieldset . getByRole ( "switch" , {
name : "Show QR Code in PDF" ,
} ) ;
await expect ( newShowQrCodeSwitch ) . toBeVisible ( ) ;
await expect ( newShowQrCodeSwitch ) . toBeEnabled ( ) ;
await expect ( newShowQrCodeSwitch ) . toBeChecked ( ) ;
// toggle the switch off
await newShowQrCodeSwitch . click ( ) ;
// verify that the switch is off
await expect ( newShowQrCodeSwitch ) . not . toBeChecked ( ) ;
// Verify QR Code Data field retains its value after toggling visibility off
const newQrCodeDataTextarea = newQrCodeFieldset . getByRole ( "textbox" , {
name : "Data" ,
} ) ;
await expect ( newQrCodeDataTextarea ) . toBeVisible ( ) ;
await expect ( newQrCodeDataTextarea ) . toHaveValue ( QR_CODE_TEST_DATA . data ) ;
// Verify QR Code Description field retains its value after toggling visibility off
const newQrCodeDescriptionTextarea = newQrCodeFieldset . getByRole (
"textbox" ,
{
name : "Description (optional)" ,
} ,
) ;
await expect ( newQrCodeDescriptionTextarea ) . toBeVisible ( ) ;
await expect ( newQrCodeDescriptionTextarea ) . toHaveValue (
QR_CODE_TEST_DATA . description ,
) ;
// for better debugging screenshots, we fill in the notes field with a test note =)
await newFinalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: ${ testInfo . title } - QR code hidden in PDF ( ${ testInfo . project . name } ) ` ,
) ;
// wait for debounce timeout
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
const newDownloadPdfEnglishButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
// Download the PDF again
const [ downloadPdfWithoutQrCode ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
newDownloadPdfEnglishButton . click ( ) ,
] ) ;
// Get the suggested filename
const suggestedFilenameWithoutQrCode =
downloadPdfWithoutQrCode . suggestedFilename ( ) ;
// save the file to temporary directory
const pdfFilePath2 = path . join (
downloadDir ,
` ${ browserName } - ${ suggestedFilenameWithoutQrCode } ` ,
) ;
await downloadPdfWithoutQrCode . saveAs ( pdfFilePath2 ) ;
/ * *
* Render the PDF on a canvas and take a screenshot to verify QR code is not displayed
* /
const pdfBytesWithoutQrCode = fs . readFileSync ( pdfFilePath2 ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , pdfBytesWithoutQrCode ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
"qr-code-hidden-in-pdf-default-template.png" ,
) ;
} ) ;
test ( "generates multi-page PDF when invoice has many items" , async ( {
page ,
browserName ,
downloadDir ,
} , testInfo ) = > {
// Verify we're on the default template
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
const invoiceItemsSection = page . getByTestId ( "invoice-items-section" ) ;
// Update tax label for the first item
const firstItemFieldset = invoiceItemsSection . getByRole ( "group" , {
name : "Item 1" ,
} ) ;
const firstItemTaxSettingsFieldset = firstItemFieldset . getByRole ( "group" , {
name : "Tax Settings" ,
} ) ;
await firstItemTaxSettingsFieldset
. getByRole ( "textbox" , { name : "Tax Label" } )
. fill ( "Sales Tax" ) ;
// Add additional invoice items to trigger multiple-page PDF
for ( let i = 0 ; i < 17 ; i ++ ) {
await invoiceItemsSection
. getByRole ( "button" , { name : "Add invoice item" } )
. click ( ) ;
// Fill minimal required fields for the new item
const itemFieldset = invoiceItemsSection . getByRole ( "group" , {
name : ` Item ${ i + 2 } ` , // Item numbers start at 1
} ) ;
await itemFieldset
. getByRole ( "textbox" , { name : "Name" } )
. fill (
` Item ${ i + 2 } . Some long item name that should be wrapped to the next line. Some long item name that should be wrapped to the next line. Some long item name that should be wrapped to the next line. ` ,
) ;
// Set VAT to 10% for each item
const taxSettingsFieldset = itemFieldset . getByRole ( "group" , {
name : "Tax Settings" ,
} ) ;
// Use different tax rates: 10%, 20%, or 50%
const taxRate =
// eslint-disable-next-line playwright/no-conditional-in-test
( i + 2 ) % 3 === 0 ? "50" : ( i + 2 ) % 2 === 0 ? "20" : "10" ;
await taxSettingsFieldset
2026-03-01 20:17:29 +00:00
. getByRole ( "textbox" , { name : "Sales Tax Rate" , exact : true } )
feat: add QR code functionality to invoice templates and other improvements + bug fixes (#165)
* feat: add QR code functionality to invoice templates and enhance user experience
* Introduced QR code generation for invoices, allowing users to include a QR code with customizable descriptions.
* Updated invoice templates to display QR codes in both default and Stripe formats.
* Enhanced form components to support QR code data input and visibility toggles.
* Added utility functions for generating QR code data URLs.
* Updated tests and snapshots to cover new QR code features and ensure visual consistency across templates.
* Introduced a Code of Conduct document to promote a respectful community environment.
* feat: enhance error handling and metadata management in invoice application
* Updated error handling to reset invoice metadata to default upon error occurrence.
* Refactored invoice client page to utilize a constant for default mobile tab value.
* Improved metadata structure by including last visited mobile tab in the default metadata.
* Adjusted schema to allow optional item name field for better flexibility in invoice items.
* fix: downgrade react-pdf version and update mobile tab handling
* Downgraded react-pdf from version 10.1.0 to 9.2.1 for compatibility.
* Updated mobile tab handling to utilize the last visited tab from app metadata.
* Refactored invoice client page to improve metadata management and ensure proper tab state persistence.
* fix: remove redundant validation message for item name in invoice form
* chore: update TODO list and comment out scroll to top effect in AppPageClient
* Added a new issue link to the TODO.md for tracking.
* Commented out the scroll to top effect in page.client.tsx for potential future use.
* refactor: streamline viewport settings and restore scroll to top effect in AppPageClient
* Simplified viewport configuration by removing unnecessary properties.
* Restored the scroll to top effect in AppPageClient for improved user experience on initial render.
* revert viewport
* fix: prevent jumping on iOS when typing in textarea component
* Added resize-none class to the textarea to improve user experience on iOS devices by preventing layout shifts while typing.
* feat: reworked app logic, improved multi-page pdf layout, add/update e2e tests, improvements and bug fixes
* Enhanced README.md with new features, including multi-page PDF support, QR code functionality, and live preview demos.
* Added demo GIFs to showcase new features and improve user understanding.
* Updated key features section for clarity and added a news & updates section for version tracking.
* feat: add debounced error handling in invoice form component
* Introduced a debounced callback for showing form errors to improve user experience by preventing rapid toast notifications.
* Updated validation logic to utilize the new debounced error handling mechanism.
* chore: update e2e snapshots and improved form errors toast
* fix: improve PDF viewer and QR code layout in invoice templates
* Added state management for page numbers in the mobile PDF viewer to handle multi-page documents.
* Adjusted QR code positioning and size to prevent overlap with the fixed footer.
* Updated padding in the Stripe template styles to resolve overlapping issues with the footer.
* Updated TODO.md with additional context on preventing layout issues in PDF rendering.
* feat: enhance invoice sharing logic with validation error handling
* Added a new test to verify error toast visibility when the invoice form has validation errors.
* Implemented state management for form validation errors in the AppPageClient.
* Updated the InvoiceForm component to manage error states and trigger appropriate toasts for user feedback.
* Ensured that the share button behavior reflects the form's validation state, improving user experience.
* feat: enhance invoice template with authorized person fields
* Added fields for Person Authorized to Receive and Person Authorized to Issue in the default invoice template.
* Implemented visibility toggles for these fields in the invoice form.
* Updated tests to verify the correct behavior of these fields in both default and Stripe invoice templates.
* Enhanced PDF rendering to include names of authorized persons when applicable.
* feat: implement cooldown for CTA toasts and update UI elements
* Introduced a 5-minute cooldown for showing CTA toasts to enhance user experience.
* Updated toast management logic in various components to respect the new cooldown.
* Adjusted text color in the InvoiceClientPage for better visibility.
* Refined tooltip content in the invoice form to clarify functionality.
* Updated TODO.md to reflect changes in toast behavior.
* feat: add unit column switch to stripe invoice template
* Changed toggle labels from Show/hide to Show for various fields in the invoice forms and dialogs to enhance clarity.
* Updated related test cases to reflect the new label changes across buyer, seller, and invoice templates.
* Ensured consistency in user interface elements for better user experience.
* chore: adjust text size
* feat: update README and improve CTA toast logic
* Replaced the EasyInvoicePDF logo with a new design and adjusted its size for better visibility.
* Enhanced the call-to-action (CTA) toast functionality by refining the logic for showing toasts based on user interactions and session activity.
* Updated text in the invoice form to clarify user actions and improve overall user experience.
* Added a new logo image to the project assets.
* update readme
* refactor: improved mobile PDF viewer by importing the PDF worker directl, improve CTA toast logic, update readme
* Renamed sections in README for clarity, including Live Preview to Invoice PDF Live Preview and Instant Download to Instant PDF Download.
* Adjusted text in CTA toasts for better engagement.
* Updated minimum time on page and interactions required for showing CTA toasts to enhance user experience.
* Improved mobile PDF viewer by importing the PDF worker directly and addressing related issues in TODO.md.
* fix: adjust CTA toast display timing for improved user experience
* Updated the timeout for showing the CTA toast to 6 seconds after the invoice link notification, enhancing the visibility and timing of user prompts.
* feat: Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* Added a new command in package.json for running cloudflared tunnel.
* Updated tests to verify the visibility of the share invoice link description toast.
* Refined toast notifications in the AppPageClient to include new IDs for better tracking and user feedback.
* Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.
* feat: enhance toast notifications with unique IDs for better ux
* fix: adjust invoice item limit in tests and update translations for total excluding tax
* Reduced the maximum number of invoice items in the test from 20 to 15 to better align with URL limits.
* Updated translations in the PDF i18n schema and related files to include total excluding tax in multiple languages.
* Modified the invoice PDF template to display the total excluding tax using localized text.
* fix qr code race condition
* fix: update URL variable names and enhance sharing logic for better clarity
* Renamed variables for generated URLs to improve code readability.
* Updated sharing logic to ensure consistent use of the new variable names across mobile and desktop sharing methods.
* Enhanced toast notifications to dismiss previous messages and track share events more effectively.
* fix: update tax label helper message for clarity in invoice items
* readme upd
* fix: adjust idle time and minimum interactions for CTA toast display
* Increased idle time from 3 seconds to 5 seconds to improve user engagement.
* Updated minimum interactions required for showing the CTA toast from 2 to 3 to enhance user experience.
* feat: implement cooldown logic for CTA toast display
* Added functionality to track the last shown timestamp of the CTA toast using localStorage.
* Introduced a 7-day cooldown period to prevent the toast from being shown multiple times within a week.
* Updated context to reflect whether the CTA toast was shown recently, enhancing user experience.
* chore: update dependencies and add GitHub workflows for linting and type checking
* Updated package versions in package.json and pnpm-lock.yaml for better compatibility and performance.
* Added GitHub Actions workflows for ESLint and TypeScript type checking to ensure code quality and consistency.
* Enhanced buyer and seller management components with improved state management and type safety.
* feat: enhance invoice sharing and download tracking
* Added functionality to track the number of times invoices are shared via link and downloaded as PDF.
* Updated the app metadata structure to include and .
* Implemented logic to increment these counts upon sharing and downloading invoices, improving analytics and user engagement.
* refactor: update README and TODO for clarity and consistency
2026-02-24 18:53:24 +00:00
. fill ( taxRate ) ;
await itemFieldset
. getByRole ( "spinbutton" , {
name : "Net Price (Rate or Unit Price)" ,
} )
. fill ( ` ${ 1000 * ( i + 1 ) } ` ) ;
}
const finalSection = page . getByTestId ( "final-section" ) ;
// for better debugging screenshots, we fill in the notes field with a test note
await finalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: generates multi-page PDF when invoice has many items ( ${ testInfo . project . name } ) ` ,
) ;
// Wait for PDF preview to regenerate after invoice data changes (debounce timeout)
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
const downloadPdfEnglishButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
await expect ( downloadPdfEnglishButton ) . toBeVisible ( ) ;
await expect ( downloadPdfEnglishButton ) . toBeEnabled ( ) ;
// Click the download button and wait for download
const [ download ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfEnglishButton . click ( ) ,
] ) ;
// Get the suggested filename
const suggestedFilename = download . suggestedFilename ( ) ;
// save the file to temporary directory
const pdfFilePath = path . join (
downloadDir ,
` ${ browserName } - ${ suggestedFilename } ` ,
) ;
await download . saveAs ( pdfFilePath ) ;
// Convert to absolute path and use proper file URL format
const absolutePath = path . resolve ( pdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( absolutePath ) ) . toBe ( true ) ;
/ * *
* RENDER ALL PDF PAGES ON A SINGLE CANVAS AND TAKE SCREENSHOT
* /
const pdfBytes = fs . readFileSync ( absolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderMultiPagePdfOnCanvas ( page , pdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
"default-template-multi-pages.png" ,
) ;
} ) ;
2026-03-09 21:55:16 +00:00
test ( "generates PDF with logo when using default template" , async ( {
page ,
browserName ,
downloadDir ,
} ) = > {
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
const generalInfoSection = page . getByTestId ( "general-information-section" ) ;
// Upload a valid logo
2026-03-29 22:11:50 +00:00
await uploadLogoFile ( page ) ;
2026-03-09 21:55:16 +00:00
// Verify logo preview is visible
await expect ( page . getByText ( "Logo uploaded successfully!" ) ) . toBeVisible ( ) ;
await expect (
generalInfoSection . getByAltText ( "Company logo preview" ) ,
) . toBeVisible ( ) ;
await expect (
generalInfoSection . getByText (
"Logo uploaded successfully. Click the X to remove it." ,
) ,
) . toBeVisible ( ) ;
// Wait for debounce timeout
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 800 ) ;
const downloadPDFButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
await expect ( downloadPDFButton ) . toBeVisible ( ) ;
await expect ( downloadPDFButton ) . toBeEnabled ( ) ;
// Click the download button and wait for download
const [ download ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPDFButton . click ( ) ,
] ) ;
const suggestedFilename = download . suggestedFilename ( ) ;
const pdfFilePath = path . join (
downloadDir ,
` ${ browserName } - ${ suggestedFilename } ` ,
) ;
await download . saveAs ( pdfFilePath ) ;
const absolutePath = path . resolve ( pdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( absolutePath ) ) . toBe ( true ) ;
const pdfBytes = fs . readFileSync ( absolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , pdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
"pdf-with-logo-default-template.png" ,
) ;
/ * *
* VERIFY LOGO PERSISTS AFTER NAVIGATING BACK TO DEFAULT TEMPLATE
* /
// Navigate back and switch to Stripe template to verify logo persists
await page . goto ( "/?template=default" ) ;
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
// Verify logo is still present after navigation
const newGeneralInfoSection = page . getByTestId (
"general-information-section" ,
) ;
await expect (
newGeneralInfoSection . getByAltText ( "Company logo preview" ) ,
) . toBeVisible ( ) ;
/ * *
* VERIFY LOGO PERSISTS AFTER SWITCHING TO STRIPE TEMPLATE
* /
// Switch to Stripe template
await page
. getByRole ( "combobox" , { name : "Invoice Template" } )
. selectOption ( "stripe" ) ;
await page . waitForURL ( "/?template=stripe" ) ;
// Verify logo persists after template switch
await expect (
newGeneralInfoSection . getByAltText ( "Company logo preview" ) ,
) . toBeVisible ( ) ;
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 800 ) ;
// Download PDF with Stripe template + logo
const stripeDownloadPDFButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
await expect ( stripeDownloadPDFButton ) . toBeVisible ( ) ;
await expect ( stripeDownloadPDFButton ) . toBeEnabled ( ) ;
const [ stripeDownload ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
stripeDownloadPDFButton . click ( ) ,
] ) ;
const stripeSuggestedFilename = stripeDownload . suggestedFilename ( ) ;
const stripePdfFilePath = path . join (
downloadDir ,
` ${ browserName } -stripe- ${ stripeSuggestedFilename } ` ,
) ;
await stripeDownload . saveAs ( stripePdfFilePath ) ;
const stripeAbsolutePath = path . resolve ( stripePdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( stripeAbsolutePath ) ) . toBe ( true ) ;
const stripePdfBytes = fs . readFileSync ( stripeAbsolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , stripePdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
"pdf-with-logo-stripe-template-after-switch.png" ,
) ;
} ) ;
feat: reworked seller/buyer sections, email visibility switch field, shared invoice indicator, improved Out-of-Date helper + minor things (#197)
* feat: add OutOfDateDatesHelper, Shared invoice badge, etc
* Introduced new markdown files for skills, covering typography, surfaces, animations, and performance to enhance interface design consistency.
* feat: add isSharedInvoice prop to InvoiceForm for shared invoice indication
* Introduced isSharedInvoice prop in InvoiceForm component to manage shared invoice state.
* Updated UI to display tooltips for shared seller and buyer information, enhancing user awareness of shared invoices.
* test: enhance invoice form tests with detailed validation for date fields and invoice number
* fix: update label styling in UI component for improved visual consistency
* Changed text class from text-balance to text-pretty in Label component to enhance design consistency across the application.
* feat: enhance email visibility functionality in buyer and seller dialogs
* Added email visibility toggle in BuyerDialog and SellerDialog components, allowing users to show or hide the email field in PDF outputs.
* Updated related tests to ensure proper functionality of the email visibility feature.
* Improved UI labels for required fields to enhance user experience and clarity.
* feat: implement email visibility toggle in PDF for invoice templates
* Added tests to verify email visibility toggles for both seller and buyer sections in the default and stripe invoice templates.
* Included functionality to capture screenshots of PDFs with emails hidden and visible based on user selections.
* Created new snapshot images for both email visibility states across different devices and browsers.
* formatting
* chore: update CI workflows to handle linting, type checking, and unit tests failures
* Added to linting, type checking, and unit tests steps to prevent workflow failure on errors.
* Modified email notification conditions to trigger only on failure of respective steps, improving error handling and notification accuracy.
* refactor: update email visibility toggle tests to use role-based queries
* refactor: simplify buyer and seller information forms by removing tooltip components and enhancing locked state visibility
* Removed tooltip components from Buyer and Seller information sections, replacing them with a locked banner for better user guidance.
* Updated input fields to reflect required status and improved accessibility by removing unnecessary aria attributes.
* Enhanced the content of shared seller and buyer tooltips in the InvoiceForm for clarity.
* refactor: remove isSharedInvoice prop and associated tooltips from Invoice components
* Eliminated the isSharedInvoice prop from InvoiceForm and its usage in InvoiceClientPage.
* Simplified the InvoicePageHeader content for shared invoices by replacing detailed tooltips with a concise message.
* Streamlined the code for better readability and maintainability.
* refactor: update locked banner visibility and improve invoice management UI
* Enhanced visibility of locked banners in Buyer and Seller management forms, providing clearer guidance for modifying details.
* Updated tests to verify the visibility and content of locked banners based on buyer and seller selection states.
* Simplified the Invoice components by removing unnecessary props and improving layout consistency across the application.
* refactor: improve error message layout and content in error handling components
* Updated the Error component to separate error messages for better clarity and user guidance.
* Enhanced the styling of the ErrorMessage component for improved readability and layout consistency.
2026-03-23 21:19:23 +00:00
test ( "toggles seller and buyer email visibility in PDF" , async ( {
page ,
browserName ,
downloadDir ,
} , testInfo ) = > {
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
/ *
* PHASE 1 : Fill inline form with email switch OFF - > PDF screenshot ( emails hidden )
* /
const sellerSection = page . getByTestId ( "seller-information-section" ) ;
const buyerSection = page . getByTestId ( "buyer-information-section" ) ;
// Fill seller fields inline (no saved seller selected, so switch is enabled)
await sellerSection
. getByRole ( "textbox" , { name : "Name (Required)" } )
. fill ( "Email Visibility Test Seller" ) ;
await sellerSection
. getByRole ( "textbox" , { name : "Address (Required)" } )
. fill ( "123 Seller Street\nSeller City, 10001" ) ;
await sellerSection
. getByRole ( "textbox" , { name : "Email" } )
. fill ( "VISIBLE-SELLER@test.com" ) ;
// Toggle seller email switch OFF via inline form
const sellerEmailSwitch = sellerSection . getByRole ( "switch" , {
name : "Show the 'Email' field in the PDF" ,
} ) ;
await expect ( sellerEmailSwitch ) . toBeChecked ( ) ;
await sellerEmailSwitch . click ( ) ;
await expect ( sellerEmailSwitch ) . not . toBeChecked ( ) ;
// Fill buyer fields inline (no saved buyer selected, so switch is enabled)
await buyerSection
. getByRole ( "textbox" , { name : "Name (Required)" } )
. fill ( "Email Visibility Test Buyer" ) ;
await buyerSection
. getByRole ( "textbox" , { name : "Address (Required)" } )
. fill ( "456 Buyer Avenue\nBuyer City, 20002" ) ;
await buyerSection
. getByRole ( "textbox" , { name : "Email" } )
. fill ( "VISIBLE-BUYER@test.com" ) ;
// Toggle buyer email switch OFF via inline form
const buyerEmailSwitch = buyerSection . getByRole ( "switch" , {
name : "Show the 'Email' field in the PDF" ,
} ) ;
await expect ( buyerEmailSwitch ) . toBeChecked ( ) ;
await buyerEmailSwitch . click ( ) ;
await expect ( buyerEmailSwitch ) . not . toBeChecked ( ) ;
const finalSection = page . getByTestId ( "final-section" ) ;
await finalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: ${ testInfo . title } - emails hidden ( ${ testInfo . project . name } ) ` ,
) ;
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
const downloadPdfButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
await expect ( downloadPdfButton ) . toBeVisible ( ) ;
await expect ( downloadPdfButton ) . toBeEnabled ( ) ;
// Download PDF with emails hidden (toggled off via inline form)
const [ download ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
downloadPdfButton . click ( ) ,
] ) ;
const pdfFilePath = path . join (
downloadDir ,
` ${ browserName } - ${ download . suggestedFilename ( ) } ` ,
) ;
await download . saveAs ( pdfFilePath ) ;
const absolutePath = path . resolve ( pdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( absolutePath ) ) . toBe ( true ) ;
const pdfBytes = fs . readFileSync ( absolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , pdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
"email-hidden-in-pdf-default-template.png" ,
) ;
/ *
* PHASE 2 : Save seller / buyer via dialog with email ON - > PDF screenshot ( emails visible )
* /
await page . goto ( "/?template=default" ) ;
await expect ( page ) . toHaveURL ( "/?template=default" ) ;
// Create seller via dialog with email visible
await page . getByRole ( "button" , { name : "New Seller" } ) . click ( ) ;
const manageSellerDialog = page . getByTestId ( "manage-seller-dialog" ) ;
await manageSellerDialog
. getByRole ( "textbox" , { name : "Name (Required)" } )
. fill ( "Email Visibility Test Seller" ) ;
await manageSellerDialog
. getByRole ( "textbox" , { name : "Address (Required)" } )
. fill ( "123 Seller Street\nSeller City, 10001" ) ;
await manageSellerDialog
. getByRole ( "textbox" , { name : "Email" } )
. fill ( "VISIBLE-SELLER@test.com" ) ;
// Verify email visibility switch is checked by default in dialog
const sellerEmailSwitchInDialog = manageSellerDialog . getByRole ( "switch" , {
name : "Show the 'Email' field in the PDF" ,
} ) ;
await expect ( sellerEmailSwitchInDialog ) . toBeVisible ( ) ;
await expect ( sellerEmailSwitchInDialog ) . toBeChecked ( ) ;
await manageSellerDialog
. getByRole ( "button" , { name : "Save Seller" } )
. click ( ) ;
await expect ( manageSellerDialog ) . toBeHidden ( ) ;
await expect (
page . getByText ( "Seller added and applied to invoice" , { exact : true } ) ,
) . toBeVisible ( ) ;
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
// Create buyer via dialog with email visible
await page . getByRole ( "button" , { name : "New Buyer" } ) . click ( ) ;
const manageBuyerDialog = page . getByTestId ( "manage-buyer-dialog" ) ;
await manageBuyerDialog
. getByRole ( "textbox" , { name : "Name (Required)" } )
. fill ( "Email Visibility Test Buyer" ) ;
await manageBuyerDialog
. getByRole ( "textbox" , { name : "Address (Required)" } )
. fill ( "456 Buyer Avenue\nBuyer City, 20002" ) ;
await manageBuyerDialog
. getByRole ( "textbox" , { name : "Email" } )
. fill ( "VISIBLE-BUYER@test.com" ) ;
// Verify email visibility switch is checked by default in dialog
const buyerEmailSwitchInDialog = manageBuyerDialog . getByRole ( "switch" , {
name : "Show the 'Email' field in the PDF" ,
} ) ;
await expect ( buyerEmailSwitchInDialog ) . toBeVisible ( ) ;
await expect ( buyerEmailSwitchInDialog ) . toBeChecked ( ) ;
await manageBuyerDialog . getByRole ( "button" , { name : "Save Buyer" } ) . click ( ) ;
await expect ( manageBuyerDialog ) . toBeHidden ( ) ;
await expect (
page . getByText ( "Buyer added and applied to invoice" , { exact : true } ) ,
) . toBeVisible ( ) ;
const newFinalSection = page . getByTestId ( "final-section" ) ;
await newFinalSection
. getByRole ( "textbox" , { name : "Notes" , exact : true } )
. fill (
` Test: ${ testInfo . title } - emails visible ( ${ testInfo . project . name } ) ` ,
) ;
// eslint-disable-next-line playwright/no-wait-for-timeout
await page . waitForTimeout ( 700 ) ;
const newDownloadPdfButton = page . getByRole ( "link" , {
name : "Download PDF in English" ,
} ) ;
await expect ( newDownloadPdfButton ) . toBeVisible ( ) ;
await expect ( newDownloadPdfButton ) . toBeEnabled ( ) ;
// Download PDF with emails visible (saved via dialog)
const [ downloadVisible ] = await Promise . all ( [
page . waitForEvent ( "download" ) ,
newDownloadPdfButton . click ( ) ,
] ) ;
const visiblePdfFilePath = path . join (
downloadDir ,
` ${ browserName } -visible- ${ downloadVisible . suggestedFilename ( ) } ` ,
) ;
await downloadVisible . saveAs ( visiblePdfFilePath ) ;
const visibleAbsolutePath = path . resolve ( visiblePdfFilePath ) ;
await expect . poll ( ( ) = > fs . existsSync ( visibleAbsolutePath ) ) . toBe ( true ) ;
const visiblePdfBytes = fs . readFileSync ( visibleAbsolutePath ) ;
await page . goto ( "about:blank" ) ;
await renderPdfOnCanvas ( page , visiblePdfBytes ) ;
await page . waitForFunction (
( ) = >
( window as unknown as { __PDF_RENDERED__ : boolean } )
. __PDF_RENDERED__ === true ,
) ;
await expect ( page . locator ( "canvas" ) ) . toHaveScreenshot (
"email-visible-in-pdf-default-template.png" ,
) ;
} ) ;
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label
* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.
* chore: update README and .env.example for clarity and new features
* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.
* refactor: rename VAT label to Tax label and update related components
* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.
* chore: update .env.example and package.json for dotenv integration
* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.
* feat: implement customizable Tax Number label in invoice forms
* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.
* feat: enhance Playwright testing and update project metadata
* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.
* refactor: update Playwright tests and improve screenshot handling
* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.
* minor fix
* chore: update Playwright configuration and GitHub Actions workflow
* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.
* chore: update e2e tests and GitHub Actions workflow
* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.
* update gh runner to macos-14
* chore: update e2e tests and GitHub Actions workflow
* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.
* chore: update e2e tests and Playwright configuration
* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.
* chore: update e2e workflow and PDF rendering imports
* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.
* chore: update Playwright configuration and enhance e2e tests
* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.
* chore: enhance Playwright configuration and update e2e tests
* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.
* chore: enhance PDF rendering utility with documentation and font face option
* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.
* chore: update PDF snapshots for invoice and template tests
* chore: increase timeout for visibility checks in Stripe invoice sharing tests
* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.
* chore: increase timeout for PDF download visibility checks in invoice tests
* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.
* chore: enhance PDF screenshot assertions in invoice tests
* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.
* chore: update PDF snapshots for invoice and template tests
* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.
* chore: configure tests to run in serial mode for invoice templates
* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.
* chore: adjust Playwright configuration and refine invoice template tests
* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.
* fix tests
* refactor: streamline Stripe invoice sharing tests
* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.
* test: enhance logo upload assertions in Stripe invoice template tests
* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.
* chore: update timeout and enhance tax label handling in invoice templates
* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.
* chore: update PDF font handling and app redirects
* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.
* style: enhance FeaturesSection layout and styling
* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.
* chore: update PDF snapshots
* chore: update package dependencies and CI configuration
* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.
* chore: downgrade @playwright/test dependency to version 1.56.1
* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.
* chore: restore dotenv dependency and update CI runner
* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.
* chore: update PDF test snapshots and remove obsolete images
* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.
* chore: refactor PDF font handling and update asset URLs
* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.
* fix pdf screenshot tests and cleanup
* feat: cleanup files and i18n translations
* chore: update e2e tests and CI configuration
* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files
* style: update README header and logo size
* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.
* chore: adjust CI worker settings for improved test stability
* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.
* chore: downgrade @playwright/test to version 1.56.1 for compatibility
* style: enhance README layout and content for clarity and engagement
* docs: update README to enhance user engagement and provide additional resources
* refactor: update asset URLs and improve footer links for consistency
* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.
* remove commented out code
* refactor: update video demo URLs and fallback image for consistency
* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.
* fix: append version query to video demo URL for cache busting
* chore: add test for static assets
* refactor: reorganize static asset tests and update asset URLs
* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.
* refactor: update video source and fallback image URLs for consistency
* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.
* refactor: enhance invoice item tax label helper text
* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 21:23:04 +00:00
} ) ;