feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
import { INITIAL_INVOICE_DATA } from "@/app/constants";
|
|
|
|
|
|
import { TRANSLATIONS } from "@/app/schema/translations";
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
import { expect, test } from "@playwright/test";
|
|
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
|
|
import fs from "fs";
|
|
|
|
|
|
import path from "path";
|
|
|
|
|
|
import pdf from "pdf-parse";
|
|
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
const PLAYWRIGHT_TEST_DOWNLOADS_DIR = "playwright-test-downloads";
|
|
|
|
|
|
|
|
|
|
|
|
const getDownloadDir = ({ browserName }: { browserName: string }) => {
|
|
|
|
|
|
const name = `pdf-downloads-${browserName}`;
|
|
|
|
|
|
|
|
|
|
|
|
return path.join(PLAYWRIGHT_TEST_DOWNLOADS_DIR, name);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const CURRENT_MONTH_AND_YEAR = dayjs().format("MM-YYYY");
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
const TODAY = dayjs().format("YYYY-MM-DD");
|
|
|
|
|
|
const LAST_DAY_OF_CURRENT_MONTH = dayjs().endOf("month").format("YYYY-MM-DD");
|
|
|
|
|
|
|
|
|
|
|
|
// Payment date is 14 days from today (by default)
|
|
|
|
|
|
const PAYMENT_DATE = dayjs().add(14, "day").format("YYYY-MM-DD");
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* We can't test the PDF preview because it's not supported in Playwright.
|
|
|
|
|
|
* https://github.com/microsoft/playwright/issues/7822
|
|
|
|
|
|
*
|
|
|
|
|
|
* we download pdf file and parse the content to verify the invoice data
|
|
|
|
|
|
*/
|
|
|
|
|
|
test.describe("PDF Preview", () => {
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
let downloadDir: string;
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
test.beforeAll(async ({ browserName }) => {
|
|
|
|
|
|
downloadDir = getDownloadDir({ browserName });
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
// Ensure browser-specific test-downloads directory exists
|
|
|
|
|
|
try {
|
|
|
|
|
|
await fs.promises.mkdir(downloadDir, { recursive: true });
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
} catch (error) {
|
|
|
|
|
|
// Handle specific error cases if needed
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
if ((error as NodeJS.ErrnoException).code !== "EEXIST") {
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
throw error;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
//
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
test.afterAll(async () => {
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
// Remove the parent playwright-test-downloads directory
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
try {
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
await fs.promises.rm(PLAYWRIGHT_TEST_DOWNLOADS_DIR, {
|
|
|
|
|
|
recursive: true,
|
|
|
|
|
|
force: true,
|
|
|
|
|
|
});
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
} catch (error) {
|
|
|
|
|
|
// Handle specific error cases if needed
|
|
|
|
|
|
// ENOENT means "no such file or directory" - ignore this expected error
|
|
|
|
|
|
if ((error as NodeJS.ErrnoException).code !== "ENOENT") {
|
|
|
|
|
|
throw error;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
|
|
|
|
await page.goto("/");
|
|
|
|
|
|
});
|
|
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
test("downloads PDF in English and verifies content", async ({
|
|
|
|
|
|
page,
|
|
|
|
|
|
browserName,
|
|
|
|
|
|
}) => {
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
// Set up download handler
|
|
|
|
|
|
const downloadPromise = page.waitForEvent("download");
|
|
|
|
|
|
|
|
|
|
|
|
const downloadButton = page.getByRole("link", {
|
|
|
|
|
|
name: "Download PDF in English",
|
|
|
|
|
|
});
|
|
|
|
|
|
// Wait for download button to be visible and enabled
|
|
|
|
|
|
await expect(downloadButton).toBeVisible();
|
|
|
|
|
|
await expect(downloadButton).toBeEnabled();
|
|
|
|
|
|
|
|
|
|
|
|
// Click the download button
|
|
|
|
|
|
await downloadButton.click();
|
|
|
|
|
|
|
|
|
|
|
|
// Wait for the download to start
|
|
|
|
|
|
const download = await downloadPromise;
|
|
|
|
|
|
|
|
|
|
|
|
// Get the suggested filename
|
|
|
|
|
|
const suggestedFilename = download.suggestedFilename();
|
|
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
// Save the file to a browser-specific temporary location
|
|
|
|
|
|
const tmpPath = path.join(
|
|
|
|
|
|
getDownloadDir({ browserName }),
|
2025-08-19 23:15:48 +00:00
|
|
|
|
suggestedFilename,
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
);
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
await download.saveAs(tmpPath);
|
|
|
|
|
|
|
|
|
|
|
|
// Read and verify PDF content using pdf-parse
|
|
|
|
|
|
const dataBuffer = await fs.promises.readFile(tmpPath);
|
|
|
|
|
|
const pdfData = await pdf(dataBuffer);
|
|
|
|
|
|
|
|
|
|
|
|
// Verify PDF content
|
|
|
|
|
|
expect(pdfData.text).toContain("Invoice No. of:");
|
|
|
|
|
|
expect(pdfData.text).toContain("Date of issue:");
|
|
|
|
|
|
|
|
|
|
|
|
expect(pdfData.text).toContain("Seller");
|
|
|
|
|
|
expect(pdfData.text).toContain("Buyer");
|
|
|
|
|
|
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
// Check invoice header details
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
expect(pdfData.text).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`Invoice No. of: 1/${CURRENT_MONTH_AND_YEAR}`,
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
);
|
|
|
|
|
|
expect(pdfData.text).toContain("Reverse Charge");
|
|
|
|
|
|
expect(pdfData.text).toContain(`Date of issue: ${TODAY}`);
|
|
|
|
|
|
expect(pdfData.text).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`Date of sales/of executing the service: ${LAST_DAY_OF_CURRENT_MONTH}`,
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
// Check seller details
|
|
|
|
|
|
expect(pdfData.text).toContain("Seller name");
|
|
|
|
|
|
expect(pdfData.text).toContain("Seller address");
|
|
|
|
|
|
expect(pdfData.text).toContain("VAT no: Seller vat number");
|
|
|
|
|
|
expect(pdfData.text).toContain("e-mail: seller@email.com");
|
|
|
|
|
|
expect(pdfData.text).toContain("Account Number - Seller account number");
|
|
|
|
|
|
expect(pdfData.text).toContain("SWIFT/BIC number: Seller swift bic");
|
|
|
|
|
|
|
|
|
|
|
|
// Check buyer details
|
|
|
|
|
|
expect(pdfData.text).toContain("Buyer name");
|
|
|
|
|
|
expect(pdfData.text).toContain("Buyer address");
|
|
|
|
|
|
expect(pdfData.text).toContain("VAT no: Buyer vat number");
|
|
|
|
|
|
expect(pdfData.text).toContain("e-mail: buyer@email.com");
|
|
|
|
|
|
|
|
|
|
|
|
// Check invoice item details
|
|
|
|
|
|
expect(pdfData.text).toContain("Item name");
|
|
|
|
|
|
expect(pdfData.text).toContain("1");
|
|
|
|
|
|
expect(pdfData.text).toContain("service");
|
|
|
|
|
|
expect(pdfData.text).toContain("0.00");
|
|
|
|
|
|
|
|
|
|
|
|
// Check payment details
|
|
|
|
|
|
expect(pdfData.text).toContain("Payment method: wire transfer");
|
|
|
|
|
|
expect(pdfData.text).toContain(`Payment date: ${PAYMENT_DATE}`);
|
|
|
|
|
|
|
|
|
|
|
|
// Check totals
|
|
|
|
|
|
expect(pdfData.text).toContain("To pay: 0.00 EUR");
|
|
|
|
|
|
expect(pdfData.text).toContain("Paid: 0.00 EUR");
|
|
|
|
|
|
expect(pdfData.text).toContain("Left to pay: 0.00 EUR");
|
|
|
|
|
|
expect(pdfData.text).toContain("Amount in words: zero EUR 00/100");
|
|
|
|
|
|
|
|
|
|
|
|
// Check footer
|
|
|
|
|
|
expect(pdfData.text).toContain("Person authorized to receive");
|
|
|
|
|
|
expect(pdfData.text).toContain("Person authorized to issue");
|
|
|
|
|
|
expect(pdfData.text).toContain("Reverse charge");
|
|
|
|
|
|
expect(pdfData.text).toContain("Created with https://easyinvoicepdf.com");
|
feat: stripe invoice template, new CTA toasts, cleanup landing page + other improvements (#118)
* feat: enhance Android PDF viewer with error handling and memoization
- Added error handling for PDF loading failures in AndroidPdfViewer, utilizing Sentry for logging and user-friendly toast notifications.
- Implemented memoization for the InvoicePdfTemplate to optimize rendering performance.
- Updated layout.tsx to include necessary CSS for PDF rendering.
- Adjusted index.tsx comments for clarity on viewer types.
* feat: add new toasts, cleanup landing page, add stripe template
* feat: enhance PDF footer and update tests for dynamic content
- Introduced a new InvoiceFooter component to modularize footer rendering in PDF templates, improving code organization and reusability.
- Updated PDF tests to verify dynamic content in footers, including current month/year and payment due date, ensuring accurate invoice representation.
- Added PROD_WEBSITE_URL to config for consistent URL usage across components.
- Improved Telegram message handling with cache control headers for better performance.
* feat: implement invoice sharing logic and logo handling for stripe template
- Added state management for sharing invoices, including validation for logos that exceed URL length limits.
- Updated the share invoice button to reflect sharing capabilities based on logo presence.
- Introduced logo upload functionality with validation for file type and size, enhancing user experience.
- Refactored invoice form to disable sharing when a logo is present in Stripe templates, ensuring compliance with URL constraints.
- Improved toast notifications for user feedback on sharing and logo upload actions.
* feat: update invoice descriptions and enhance date handling in PDF templates
- Updated invoice descriptions in multiple languages to clarify that the tool runs entirely in the browser.
- Refactored date handling in the Stripe template components to ensure accurate formatting based on the invoice's language settings.
- Introduced a new InvoiceBody component to modularize the PDF rendering process, improving code organization and reusability.
- Enhanced the StripeDueAmount and StripeFooter components to reflect the updated date logic and improve overall clarity in the invoice presentation.
- Added localization support for date formatting using dayjs across various components.
- Added new currencies
* chore: remove unused vercel.json and add new e2e tests for invoice sharing and PDF generation
- Deleted the unused vercel.json configuration file.
- Updated the about page test to reflect changes in the description for clarity.
- Removed redundant error message checks in the invoice form tests.
- Added new e2e tests for PDF generation and sharing logic specific to the Stripe template, ensuring comprehensive coverage of invoice functionalities.
* feat: enhance umami tracking with invoice template data and improve error handling
* refactor: improve tooltips text and design, improve error handling and test assertions in invoice form and logo upload utilities
- Enhanced error handling in the logo upload function to ensure input elements are present and base64 data is provided.
- Updated e2e tests for the invoice generator page to use more reliable URL assertions.
- Refactored invoice form logic to simplify sharing validation based on template and logo presence.
- Improved button accessibility and user experience by clarifying aria-disabled attributes in various components.
* refactor: update CTA toast logic and improve button components
- Changed the timer for showing the CTA toast from 30 seconds to 40 seconds.
* fix tests
* fix: update date formatting in general information section to respect locale settings
* feat: add changelog page with mdx support
- Added support for MDX files in the Next.js configuration, allowing for rich content in the changelog.
- Introduced a new changelog layout and page structure to display updates effectively.
- Implemented dynamic routing for individual changelog entries, improving navigation and user experience.
- Enhanced the footer component with subscription functionality and improved styling.
- Updated translations to include changelog links across multiple languages.
- Added new components for date formatting and project logo descriptions to enhance the changelog presentation.
* feat: add environment configuration and update social links in tests
- Created a new .env.example file to define environment variables for server and client configurations, including Sentry, Resend, Redis, and personal information for invoices.
- Updated e2e tests to utilize GITHUB_URL and TWITTER_URL from the config for social media links, enhancing maintainability and consistency across the application.
- Refactored footer and about page components to use dynamic URLs for GitHub and Twitter, improving code clarity and reducing hardcoded values.
* chore: update environment configuration and README for clarity
- Updated .env.example to set default values for Sentry and Google Drive API configurations, enhancing clarity for new developers.
- Modified env.ts to remove minimum length validation for environment variables, simplifying the setup process.
- Enhanced README with quick start instructions and service links for Resend, Upstash, Google Drive API, and Telegram Bot API, improving onboarding experience.
* chore: add localtunnel script to package.json and adjust input component styles
- Added a new script expose-to-internet in package.json for localtunnel to facilitate external access during development.
- Updated the Input component to conditionally adjust width for date type inputs, enhancing responsiveness and usability.
* fix: update tagline in various components for consistency
* refactor: enhance loading component layout and styling
* refactor: improve invoice form validation and template handling
- Enhanced the InvoiceForm component to validate data before saving to local storage using Zod.
- Updated GeneralInformation component to handle template-specific updates for date format and clear fields based on the selected template.
- Adjusted StripeSellerBuyerInfo component styles for better spacing and consistency.
- Improved InvoiceBody component to handle invoice total formatting more robustly.
- Updated translations for 'billTo' in multiple languages for better accuracy.
* footer fix
* refactor: standardize date formatting in invoice templates
- Introduced STRIPE_DEFAULT_DATE_FORMAT constant for consistent date formatting across invoice-related components.
- Updated template tests to utilize the new date format for improved maintainability.
- Adjusted GeneralInformation component to set date format based on the selected template, enhancing clarity and consistency.
2025-07-08 23:39:21 +00:00
|
|
|
|
|
|
|
|
|
|
// Check page footer and metadata
|
|
|
|
|
|
expect(pdfData.text).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`1/${CURRENT_MONTH_AND_YEAR}·€0.00 due ${PAYMENT_DATE}·Created with https://easyinvoicepdf.comPage 1 of 1`,
|
feat: stripe invoice template, new CTA toasts, cleanup landing page + other improvements (#118)
* feat: enhance Android PDF viewer with error handling and memoization
- Added error handling for PDF loading failures in AndroidPdfViewer, utilizing Sentry for logging and user-friendly toast notifications.
- Implemented memoization for the InvoicePdfTemplate to optimize rendering performance.
- Updated layout.tsx to include necessary CSS for PDF rendering.
- Adjusted index.tsx comments for clarity on viewer types.
* feat: add new toasts, cleanup landing page, add stripe template
* feat: enhance PDF footer and update tests for dynamic content
- Introduced a new InvoiceFooter component to modularize footer rendering in PDF templates, improving code organization and reusability.
- Updated PDF tests to verify dynamic content in footers, including current month/year and payment due date, ensuring accurate invoice representation.
- Added PROD_WEBSITE_URL to config for consistent URL usage across components.
- Improved Telegram message handling with cache control headers for better performance.
* feat: implement invoice sharing logic and logo handling for stripe template
- Added state management for sharing invoices, including validation for logos that exceed URL length limits.
- Updated the share invoice button to reflect sharing capabilities based on logo presence.
- Introduced logo upload functionality with validation for file type and size, enhancing user experience.
- Refactored invoice form to disable sharing when a logo is present in Stripe templates, ensuring compliance with URL constraints.
- Improved toast notifications for user feedback on sharing and logo upload actions.
* feat: update invoice descriptions and enhance date handling in PDF templates
- Updated invoice descriptions in multiple languages to clarify that the tool runs entirely in the browser.
- Refactored date handling in the Stripe template components to ensure accurate formatting based on the invoice's language settings.
- Introduced a new InvoiceBody component to modularize the PDF rendering process, improving code organization and reusability.
- Enhanced the StripeDueAmount and StripeFooter components to reflect the updated date logic and improve overall clarity in the invoice presentation.
- Added localization support for date formatting using dayjs across various components.
- Added new currencies
* chore: remove unused vercel.json and add new e2e tests for invoice sharing and PDF generation
- Deleted the unused vercel.json configuration file.
- Updated the about page test to reflect changes in the description for clarity.
- Removed redundant error message checks in the invoice form tests.
- Added new e2e tests for PDF generation and sharing logic specific to the Stripe template, ensuring comprehensive coverage of invoice functionalities.
* feat: enhance umami tracking with invoice template data and improve error handling
* refactor: improve tooltips text and design, improve error handling and test assertions in invoice form and logo upload utilities
- Enhanced error handling in the logo upload function to ensure input elements are present and base64 data is provided.
- Updated e2e tests for the invoice generator page to use more reliable URL assertions.
- Refactored invoice form logic to simplify sharing validation based on template and logo presence.
- Improved button accessibility and user experience by clarifying aria-disabled attributes in various components.
* refactor: update CTA toast logic and improve button components
- Changed the timer for showing the CTA toast from 30 seconds to 40 seconds.
* fix tests
* fix: update date formatting in general information section to respect locale settings
* feat: add changelog page with mdx support
- Added support for MDX files in the Next.js configuration, allowing for rich content in the changelog.
- Introduced a new changelog layout and page structure to display updates effectively.
- Implemented dynamic routing for individual changelog entries, improving navigation and user experience.
- Enhanced the footer component with subscription functionality and improved styling.
- Updated translations to include changelog links across multiple languages.
- Added new components for date formatting and project logo descriptions to enhance the changelog presentation.
* feat: add environment configuration and update social links in tests
- Created a new .env.example file to define environment variables for server and client configurations, including Sentry, Resend, Redis, and personal information for invoices.
- Updated e2e tests to utilize GITHUB_URL and TWITTER_URL from the config for social media links, enhancing maintainability and consistency across the application.
- Refactored footer and about page components to use dynamic URLs for GitHub and Twitter, improving code clarity and reducing hardcoded values.
* chore: update environment configuration and README for clarity
- Updated .env.example to set default values for Sentry and Google Drive API configurations, enhancing clarity for new developers.
- Modified env.ts to remove minimum length validation for environment variables, simplifying the setup process.
- Enhanced README with quick start instructions and service links for Resend, Upstash, Google Drive API, and Telegram Bot API, improving onboarding experience.
* chore: add localtunnel script to package.json and adjust input component styles
- Added a new script expose-to-internet in package.json for localtunnel to facilitate external access during development.
- Updated the Input component to conditionally adjust width for date type inputs, enhancing responsiveness and usability.
* fix: update tagline in various components for consistency
* refactor: enhance loading component layout and styling
* refactor: improve invoice form validation and template handling
- Enhanced the InvoiceForm component to validate data before saving to local storage using Zod.
- Updated GeneralInformation component to handle template-specific updates for date format and clear fields based on the selected template.
- Adjusted StripeSellerBuyerInfo component styles for better spacing and consistency.
- Improved InvoiceBody component to handle invoice total formatting more robustly.
- Updated translations for 'billTo' in multiple languages for better accuracy.
* footer fix
* refactor: standardize date formatting in invoice templates
- Introduced STRIPE_DEFAULT_DATE_FORMAT constant for consistent date formatting across invoice-related components.
- Updated template tests to utilize the new date format for improved maintainability.
- Adjusted GeneralInformation component to set date format based on the selected template, enhancing clarity and consistency.
2025-07-08 23:39:21 +00:00
|
|
|
|
);
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
test("downloads PDF in Polish and verifies translated content", async ({
|
|
|
|
|
|
page,
|
|
|
|
|
|
}) => {
|
|
|
|
|
|
// 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 downloadButton = page.getByRole("link", {
|
|
|
|
|
|
name: "Download PDF in Polish",
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
await expect(downloadButton).toBeVisible();
|
|
|
|
|
|
await expect(downloadButton).toBeEnabled();
|
|
|
|
|
|
|
|
|
|
|
|
// Set up download handler
|
|
|
|
|
|
const downloadPromise = page.waitForEvent("download");
|
|
|
|
|
|
|
|
|
|
|
|
// Click the download button
|
|
|
|
|
|
await downloadButton.click();
|
|
|
|
|
|
|
|
|
|
|
|
// Wait for the download to start
|
|
|
|
|
|
const download = await downloadPromise;
|
|
|
|
|
|
|
|
|
|
|
|
// Get the suggested filename
|
|
|
|
|
|
const suggestedFilename = download.suggestedFilename();
|
|
|
|
|
|
|
|
|
|
|
|
// Save the file to a temporary location
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
const tmpPath = path.join(downloadDir, suggestedFilename);
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
await download.saveAs(tmpPath);
|
|
|
|
|
|
|
|
|
|
|
|
// Read and verify PDF content using pdf-parse
|
|
|
|
|
|
const dataBuffer = await fs.promises.readFile(tmpPath);
|
|
|
|
|
|
const pdfData = await pdf(dataBuffer);
|
|
|
|
|
|
|
feat: stripe invoice template, new CTA toasts, cleanup landing page + other improvements (#118)
* feat: enhance Android PDF viewer with error handling and memoization
- Added error handling for PDF loading failures in AndroidPdfViewer, utilizing Sentry for logging and user-friendly toast notifications.
- Implemented memoization for the InvoicePdfTemplate to optimize rendering performance.
- Updated layout.tsx to include necessary CSS for PDF rendering.
- Adjusted index.tsx comments for clarity on viewer types.
* feat: add new toasts, cleanup landing page, add stripe template
* feat: enhance PDF footer and update tests for dynamic content
- Introduced a new InvoiceFooter component to modularize footer rendering in PDF templates, improving code organization and reusability.
- Updated PDF tests to verify dynamic content in footers, including current month/year and payment due date, ensuring accurate invoice representation.
- Added PROD_WEBSITE_URL to config for consistent URL usage across components.
- Improved Telegram message handling with cache control headers for better performance.
* feat: implement invoice sharing logic and logo handling for stripe template
- Added state management for sharing invoices, including validation for logos that exceed URL length limits.
- Updated the share invoice button to reflect sharing capabilities based on logo presence.
- Introduced logo upload functionality with validation for file type and size, enhancing user experience.
- Refactored invoice form to disable sharing when a logo is present in Stripe templates, ensuring compliance with URL constraints.
- Improved toast notifications for user feedback on sharing and logo upload actions.
* feat: update invoice descriptions and enhance date handling in PDF templates
- Updated invoice descriptions in multiple languages to clarify that the tool runs entirely in the browser.
- Refactored date handling in the Stripe template components to ensure accurate formatting based on the invoice's language settings.
- Introduced a new InvoiceBody component to modularize the PDF rendering process, improving code organization and reusability.
- Enhanced the StripeDueAmount and StripeFooter components to reflect the updated date logic and improve overall clarity in the invoice presentation.
- Added localization support for date formatting using dayjs across various components.
- Added new currencies
* chore: remove unused vercel.json and add new e2e tests for invoice sharing and PDF generation
- Deleted the unused vercel.json configuration file.
- Updated the about page test to reflect changes in the description for clarity.
- Removed redundant error message checks in the invoice form tests.
- Added new e2e tests for PDF generation and sharing logic specific to the Stripe template, ensuring comprehensive coverage of invoice functionalities.
* feat: enhance umami tracking with invoice template data and improve error handling
* refactor: improve tooltips text and design, improve error handling and test assertions in invoice form and logo upload utilities
- Enhanced error handling in the logo upload function to ensure input elements are present and base64 data is provided.
- Updated e2e tests for the invoice generator page to use more reliable URL assertions.
- Refactored invoice form logic to simplify sharing validation based on template and logo presence.
- Improved button accessibility and user experience by clarifying aria-disabled attributes in various components.
* refactor: update CTA toast logic and improve button components
- Changed the timer for showing the CTA toast from 30 seconds to 40 seconds.
* fix tests
* fix: update date formatting in general information section to respect locale settings
* feat: add changelog page with mdx support
- Added support for MDX files in the Next.js configuration, allowing for rich content in the changelog.
- Introduced a new changelog layout and page structure to display updates effectively.
- Implemented dynamic routing for individual changelog entries, improving navigation and user experience.
- Enhanced the footer component with subscription functionality and improved styling.
- Updated translations to include changelog links across multiple languages.
- Added new components for date formatting and project logo descriptions to enhance the changelog presentation.
* feat: add environment configuration and update social links in tests
- Created a new .env.example file to define environment variables for server and client configurations, including Sentry, Resend, Redis, and personal information for invoices.
- Updated e2e tests to utilize GITHUB_URL and TWITTER_URL from the config for social media links, enhancing maintainability and consistency across the application.
- Refactored footer and about page components to use dynamic URLs for GitHub and Twitter, improving code clarity and reducing hardcoded values.
* chore: update environment configuration and README for clarity
- Updated .env.example to set default values for Sentry and Google Drive API configurations, enhancing clarity for new developers.
- Modified env.ts to remove minimum length validation for environment variables, simplifying the setup process.
- Enhanced README with quick start instructions and service links for Resend, Upstash, Google Drive API, and Telegram Bot API, improving onboarding experience.
* chore: add localtunnel script to package.json and adjust input component styles
- Added a new script expose-to-internet in package.json for localtunnel to facilitate external access during development.
- Updated the Input component to conditionally adjust width for date type inputs, enhancing responsiveness and usability.
* fix: update tagline in various components for consistency
* refactor: enhance loading component layout and styling
* refactor: improve invoice form validation and template handling
- Enhanced the InvoiceForm component to validate data before saving to local storage using Zod.
- Updated GeneralInformation component to handle template-specific updates for date format and clear fields based on the selected template.
- Adjusted StripeSellerBuyerInfo component styles for better spacing and consistency.
- Improved InvoiceBody component to handle invoice total formatting more robustly.
- Updated translations for 'billTo' in multiple languages for better accuracy.
* footer fix
* refactor: standardize date formatting in invoice templates
- Introduced STRIPE_DEFAULT_DATE_FORMAT constant for consistent date formatting across invoice-related components.
- Updated template tests to utilize the new date format for improved maintainability.
- Adjusted GeneralInformation component to set date format based on the selected template, enhancing clarity and consistency.
2025-07-08 23:39:21 +00:00
|
|
|
|
expect((pdfData.info as { Title: string }).Title).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`Faktura nr: 1/${CURRENT_MONTH_AND_YEAR} | Created with https://easyinvoicepdf.com`,
|
feat: stripe invoice template, new CTA toasts, cleanup landing page + other improvements (#118)
* feat: enhance Android PDF viewer with error handling and memoization
- Added error handling for PDF loading failures in AndroidPdfViewer, utilizing Sentry for logging and user-friendly toast notifications.
- Implemented memoization for the InvoicePdfTemplate to optimize rendering performance.
- Updated layout.tsx to include necessary CSS for PDF rendering.
- Adjusted index.tsx comments for clarity on viewer types.
* feat: add new toasts, cleanup landing page, add stripe template
* feat: enhance PDF footer and update tests for dynamic content
- Introduced a new InvoiceFooter component to modularize footer rendering in PDF templates, improving code organization and reusability.
- Updated PDF tests to verify dynamic content in footers, including current month/year and payment due date, ensuring accurate invoice representation.
- Added PROD_WEBSITE_URL to config for consistent URL usage across components.
- Improved Telegram message handling with cache control headers for better performance.
* feat: implement invoice sharing logic and logo handling for stripe template
- Added state management for sharing invoices, including validation for logos that exceed URL length limits.
- Updated the share invoice button to reflect sharing capabilities based on logo presence.
- Introduced logo upload functionality with validation for file type and size, enhancing user experience.
- Refactored invoice form to disable sharing when a logo is present in Stripe templates, ensuring compliance with URL constraints.
- Improved toast notifications for user feedback on sharing and logo upload actions.
* feat: update invoice descriptions and enhance date handling in PDF templates
- Updated invoice descriptions in multiple languages to clarify that the tool runs entirely in the browser.
- Refactored date handling in the Stripe template components to ensure accurate formatting based on the invoice's language settings.
- Introduced a new InvoiceBody component to modularize the PDF rendering process, improving code organization and reusability.
- Enhanced the StripeDueAmount and StripeFooter components to reflect the updated date logic and improve overall clarity in the invoice presentation.
- Added localization support for date formatting using dayjs across various components.
- Added new currencies
* chore: remove unused vercel.json and add new e2e tests for invoice sharing and PDF generation
- Deleted the unused vercel.json configuration file.
- Updated the about page test to reflect changes in the description for clarity.
- Removed redundant error message checks in the invoice form tests.
- Added new e2e tests for PDF generation and sharing logic specific to the Stripe template, ensuring comprehensive coverage of invoice functionalities.
* feat: enhance umami tracking with invoice template data and improve error handling
* refactor: improve tooltips text and design, improve error handling and test assertions in invoice form and logo upload utilities
- Enhanced error handling in the logo upload function to ensure input elements are present and base64 data is provided.
- Updated e2e tests for the invoice generator page to use more reliable URL assertions.
- Refactored invoice form logic to simplify sharing validation based on template and logo presence.
- Improved button accessibility and user experience by clarifying aria-disabled attributes in various components.
* refactor: update CTA toast logic and improve button components
- Changed the timer for showing the CTA toast from 30 seconds to 40 seconds.
* fix tests
* fix: update date formatting in general information section to respect locale settings
* feat: add changelog page with mdx support
- Added support for MDX files in the Next.js configuration, allowing for rich content in the changelog.
- Introduced a new changelog layout and page structure to display updates effectively.
- Implemented dynamic routing for individual changelog entries, improving navigation and user experience.
- Enhanced the footer component with subscription functionality and improved styling.
- Updated translations to include changelog links across multiple languages.
- Added new components for date formatting and project logo descriptions to enhance the changelog presentation.
* feat: add environment configuration and update social links in tests
- Created a new .env.example file to define environment variables for server and client configurations, including Sentry, Resend, Redis, and personal information for invoices.
- Updated e2e tests to utilize GITHUB_URL and TWITTER_URL from the config for social media links, enhancing maintainability and consistency across the application.
- Refactored footer and about page components to use dynamic URLs for GitHub and Twitter, improving code clarity and reducing hardcoded values.
* chore: update environment configuration and README for clarity
- Updated .env.example to set default values for Sentry and Google Drive API configurations, enhancing clarity for new developers.
- Modified env.ts to remove minimum length validation for environment variables, simplifying the setup process.
- Enhanced README with quick start instructions and service links for Resend, Upstash, Google Drive API, and Telegram Bot API, improving onboarding experience.
* chore: add localtunnel script to package.json and adjust input component styles
- Added a new script expose-to-internet in package.json for localtunnel to facilitate external access during development.
- Updated the Input component to conditionally adjust width for date type inputs, enhancing responsiveness and usability.
* fix: update tagline in various components for consistency
* refactor: enhance loading component layout and styling
* refactor: improve invoice form validation and template handling
- Enhanced the InvoiceForm component to validate data before saving to local storage using Zod.
- Updated GeneralInformation component to handle template-specific updates for date format and clear fields based on the selected template.
- Adjusted StripeSellerBuyerInfo component styles for better spacing and consistency.
- Improved InvoiceBody component to handle invoice total formatting more robustly.
- Updated translations for 'billTo' in multiple languages for better accuracy.
* footer fix
* refactor: standardize date formatting in invoice templates
- Introduced STRIPE_DEFAULT_DATE_FORMAT constant for consistent date formatting across invoice-related components.
- Updated template tests to utilize the new date format for improved maintainability.
- Adjusted GeneralInformation component to set date format based on the selected template, enhancing clarity and consistency.
2025-07-08 23:39:21 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
// Verify PDF content
|
|
|
|
|
|
expect(pdfData.text).toContain("Faktura nr");
|
|
|
|
|
|
expect(pdfData.text).toContain("Data wystawienia");
|
|
|
|
|
|
|
|
|
|
|
|
expect(pdfData.text).toContain("Sprzedawca");
|
|
|
|
|
|
expect(pdfData.text).toContain("Nabywca");
|
|
|
|
|
|
|
|
|
|
|
|
expect(pdfData.text).toContain("Data wystawienia:");
|
|
|
|
|
|
|
|
|
|
|
|
const lastDayOfCurrentMonth = dayjs().endOf("month").format("YYYY-MM-DD");
|
|
|
|
|
|
expect(pdfData.text).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`Data sprzedaży / wykonania usługi: ${lastDayOfCurrentMonth}`,
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
expect(pdfData.text).toContain(`Razem do zapłaty: 0.00 EUR
|
|
|
|
|
|
Wpłacono: 0.00 EUR
|
|
|
|
|
|
Pozostało do zapłaty: 0.00 EUR
|
|
|
|
|
|
Kwota słownie: zero EUR 00/100`);
|
|
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
expect(pdfData.text).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`1/${CURRENT_MONTH_AND_YEAR}·0,00 € do zapłaty do ${PAYMENT_DATE}·Utworzono za pomocą https://easyinvoicepdf.comStrona 1 z 1`,
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
);
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
test("update pdf when invoice data changes", async ({
|
|
|
|
|
|
page,
|
|
|
|
|
|
browserName,
|
|
|
|
|
|
}) => {
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
const DATE_FORMAT = "MMMM D, YYYY";
|
|
|
|
|
|
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
// Switch to another currency
|
|
|
|
|
|
await page.getByRole("combobox", { name: "Currency" }).selectOption("GBP");
|
|
|
|
|
|
|
|
|
|
|
|
// Switch to another date format
|
|
|
|
|
|
await page
|
|
|
|
|
|
.getByRole("combobox", { name: "Date format" })
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
.selectOption(DATE_FORMAT);
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
|
|
|
|
|
|
await page
|
|
|
|
|
|
.getByRole("textbox", { name: "Invoice Type" })
|
|
|
|
|
|
.fill("HELLO FROM PLAYWRIGHT TEST!");
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
.getByRole("switch", { name: /Show in PDF/i })
|
|
|
|
|
|
.nth(0)
|
|
|
|
|
|
.click();
|
|
|
|
|
|
|
|
|
|
|
|
// Toggle Account Number visibility off
|
|
|
|
|
|
await sellerSection
|
|
|
|
|
|
.getByRole("switch", { name: /Show in PDF/i })
|
|
|
|
|
|
.nth(1)
|
|
|
|
|
|
.click();
|
|
|
|
|
|
|
|
|
|
|
|
// Toggle SWIFT visibility off
|
|
|
|
|
|
await sellerSection
|
|
|
|
|
|
.getByRole("switch", { name: /Show in PDF/i })
|
|
|
|
|
|
.nth(2)
|
|
|
|
|
|
.click();
|
|
|
|
|
|
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
// update notes
|
|
|
|
|
|
await sellerSection
|
|
|
|
|
|
.getByRole("textbox", { name: "Notes" })
|
|
|
|
|
|
.fill("PLAYWRIGHT SELLER NOTES TEST");
|
|
|
|
|
|
|
|
|
|
|
|
// Toggle notes visibility on
|
|
|
|
|
|
const sellerNotesSwitch = sellerSection.getByTestId(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`sellerNotesInvoiceFormFieldVisibilitySwitch`,
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await expect(sellerNotesSwitch).toHaveRole("switch");
|
|
|
|
|
|
await expect(sellerNotesSwitch).toBeChecked();
|
|
|
|
|
|
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
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");
|
|
|
|
|
|
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
// update notes
|
|
|
|
|
|
await buyerSection
|
|
|
|
|
|
.getByRole("textbox", { name: "Notes" })
|
|
|
|
|
|
.fill("PLAYWRIGHT BUYER NOTES TEST");
|
|
|
|
|
|
|
|
|
|
|
|
// Toggle notes visibility on
|
|
|
|
|
|
const buyerNotesSwitch = buyerSection.getByTestId(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`buyerNotesInvoiceFormFieldVisibilitySwitch`,
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await expect(buyerNotesSwitch).toHaveRole("switch");
|
|
|
|
|
|
await expect(buyerNotesSwitch).toBeChecked();
|
|
|
|
|
|
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
const invoiceSection = page.getByTestId(`invoice-items-section`);
|
|
|
|
|
|
|
|
|
|
|
|
// Amount field
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
await invoiceSection
|
|
|
|
|
|
.getByRole("spinbutton", { name: "Amount (Quantity)" })
|
|
|
|
|
|
.fill("3");
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
|
|
|
|
|
|
// Net price field
|
|
|
|
|
|
await invoiceSection
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
.getByRole("spinbutton", {
|
|
|
|
|
|
name: "Net Price (Rate or Unit Price)",
|
|
|
|
|
|
})
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
.fill("1000");
|
|
|
|
|
|
|
|
|
|
|
|
// Toggle VAT Table Summary visibility off
|
|
|
|
|
|
await page
|
|
|
|
|
|
.getByRole("switch", { name: `Show "VAT Table Summary" in the PDF` })
|
|
|
|
|
|
.click();
|
|
|
|
|
|
|
|
|
|
|
|
// Wait for PDF preview to regenerate after language change (debounce timeout)
|
|
|
|
|
|
// eslint-disable-next-line playwright/no-wait-for-timeout
|
|
|
|
|
|
await page.waitForTimeout(600);
|
|
|
|
|
|
|
|
|
|
|
|
// Set up download handler
|
|
|
|
|
|
const downloadPromise = page.waitForEvent("download");
|
|
|
|
|
|
|
|
|
|
|
|
const downloadButton = page.getByRole("link", {
|
|
|
|
|
|
name: "Download PDF in English",
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
await expect(downloadButton).toBeVisible();
|
|
|
|
|
|
await expect(downloadButton).toBeEnabled();
|
|
|
|
|
|
|
|
|
|
|
|
// Click the download button
|
|
|
|
|
|
await downloadButton.click();
|
|
|
|
|
|
|
|
|
|
|
|
// Wait for the download to start
|
|
|
|
|
|
const download = await downloadPromise;
|
|
|
|
|
|
|
|
|
|
|
|
// Get the suggested filename
|
|
|
|
|
|
const suggestedFilename = download.suggestedFilename();
|
|
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
// Save the file to a browser-specific temporary location
|
|
|
|
|
|
const tmpPath = path.join(
|
|
|
|
|
|
getDownloadDir({ browserName }),
|
2025-08-19 23:15:48 +00:00
|
|
|
|
suggestedFilename,
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
);
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
await download.saveAs(tmpPath);
|
|
|
|
|
|
|
|
|
|
|
|
// Read and verify PDF content using pdf-parse
|
|
|
|
|
|
const dataBuffer = await fs.promises.readFile(tmpPath);
|
|
|
|
|
|
const pdfData = await pdf(dataBuffer);
|
|
|
|
|
|
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
const today = dayjs().format(DATE_FORMAT);
|
|
|
|
|
|
const lastDayOfCurrentMonth = dayjs().endOf("month").format(DATE_FORMAT);
|
|
|
|
|
|
const paymentDate = dayjs().add(14, "day").format(DATE_FORMAT);
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
|
|
|
|
|
|
// Verify PDF content
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
// Check invoice header details
|
|
|
|
|
|
expect(pdfData.text).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`Invoice No. of: 1/${CURRENT_MONTH_AND_YEAR}`,
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
);
|
|
|
|
|
|
expect(pdfData.text).toContain("HELLO FROM PLAYWRIGHT TEST!");
|
|
|
|
|
|
expect(pdfData.text).toContain(`Date of issue: ${today}`);
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
expect(pdfData.text).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`Date of sales/of executing the service: ${lastDayOfCurrentMonth}`,
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
// Check seller details
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
expect(pdfData.text).toContain("PLAYWRIGHT SELLER TEST");
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
expect(pdfData.text).toContain("Seller address");
|
|
|
|
|
|
expect(pdfData.text).toContain("seller@email.com");
|
|
|
|
|
|
expect(pdfData.text).toContain("PLAYWRIGHT SELLER NOTES TEST");
|
|
|
|
|
|
|
|
|
|
|
|
// Check buyer details
|
|
|
|
|
|
expect(pdfData.text).toContain("PLAYWRIGHT BUYER TEST");
|
|
|
|
|
|
expect(pdfData.text).toContain("PLAYWRIGHT BUYER ADDRESS TEST");
|
|
|
|
|
|
expect(pdfData.text).toContain("Buyer vat number");
|
|
|
|
|
|
expect(pdfData.text).toContain("TEST_BUYER_EMAIL@mail.com");
|
|
|
|
|
|
expect(pdfData.text).toContain("PLAYWRIGHT BUYER NOTES TEST");
|
|
|
|
|
|
|
|
|
|
|
|
// Check invoice item details
|
|
|
|
|
|
expect(pdfData.text).toContain("Item name");
|
|
|
|
|
|
expect(pdfData.text).toContain("3");
|
|
|
|
|
|
expect(pdfData.text).toContain("service");
|
|
|
|
|
|
expect(pdfData.text).toContain("1 000.00");
|
|
|
|
|
|
expect(pdfData.text).toContain("3 000.00");
|
|
|
|
|
|
|
|
|
|
|
|
// Check payment details
|
|
|
|
|
|
expect(pdfData.text).toContain("Payment method: wire transfer");
|
|
|
|
|
|
expect(pdfData.text).toContain(`Payment date: ${paymentDate}`);
|
|
|
|
|
|
|
|
|
|
|
|
// Check totals
|
|
|
|
|
|
expect(pdfData.text).toContain("To pay: 3 000.00 GBP");
|
|
|
|
|
|
expect(pdfData.text).toContain("Paid: 0.00 GBP");
|
|
|
|
|
|
expect(pdfData.text).toContain("Left to pay: 3 000.00 GBP");
|
|
|
|
|
|
expect(pdfData.text).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
"Amount in words: three thousand GBP 00/100",
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
// Check footer
|
|
|
|
|
|
expect(pdfData.text).toContain("Person authorized to receive");
|
|
|
|
|
|
expect(pdfData.text).toContain("Person authorized to issue");
|
|
|
|
|
|
expect(pdfData.text).toContain("Reverse charge");
|
feat: stripe invoice template, new CTA toasts, cleanup landing page + other improvements (#118)
* feat: enhance Android PDF viewer with error handling and memoization
- Added error handling for PDF loading failures in AndroidPdfViewer, utilizing Sentry for logging and user-friendly toast notifications.
- Implemented memoization for the InvoicePdfTemplate to optimize rendering performance.
- Updated layout.tsx to include necessary CSS for PDF rendering.
- Adjusted index.tsx comments for clarity on viewer types.
* feat: add new toasts, cleanup landing page, add stripe template
* feat: enhance PDF footer and update tests for dynamic content
- Introduced a new InvoiceFooter component to modularize footer rendering in PDF templates, improving code organization and reusability.
- Updated PDF tests to verify dynamic content in footers, including current month/year and payment due date, ensuring accurate invoice representation.
- Added PROD_WEBSITE_URL to config for consistent URL usage across components.
- Improved Telegram message handling with cache control headers for better performance.
* feat: implement invoice sharing logic and logo handling for stripe template
- Added state management for sharing invoices, including validation for logos that exceed URL length limits.
- Updated the share invoice button to reflect sharing capabilities based on logo presence.
- Introduced logo upload functionality with validation for file type and size, enhancing user experience.
- Refactored invoice form to disable sharing when a logo is present in Stripe templates, ensuring compliance with URL constraints.
- Improved toast notifications for user feedback on sharing and logo upload actions.
* feat: update invoice descriptions and enhance date handling in PDF templates
- Updated invoice descriptions in multiple languages to clarify that the tool runs entirely in the browser.
- Refactored date handling in the Stripe template components to ensure accurate formatting based on the invoice's language settings.
- Introduced a new InvoiceBody component to modularize the PDF rendering process, improving code organization and reusability.
- Enhanced the StripeDueAmount and StripeFooter components to reflect the updated date logic and improve overall clarity in the invoice presentation.
- Added localization support for date formatting using dayjs across various components.
- Added new currencies
* chore: remove unused vercel.json and add new e2e tests for invoice sharing and PDF generation
- Deleted the unused vercel.json configuration file.
- Updated the about page test to reflect changes in the description for clarity.
- Removed redundant error message checks in the invoice form tests.
- Added new e2e tests for PDF generation and sharing logic specific to the Stripe template, ensuring comprehensive coverage of invoice functionalities.
* feat: enhance umami tracking with invoice template data and improve error handling
* refactor: improve tooltips text and design, improve error handling and test assertions in invoice form and logo upload utilities
- Enhanced error handling in the logo upload function to ensure input elements are present and base64 data is provided.
- Updated e2e tests for the invoice generator page to use more reliable URL assertions.
- Refactored invoice form logic to simplify sharing validation based on template and logo presence.
- Improved button accessibility and user experience by clarifying aria-disabled attributes in various components.
* refactor: update CTA toast logic and improve button components
- Changed the timer for showing the CTA toast from 30 seconds to 40 seconds.
* fix tests
* fix: update date formatting in general information section to respect locale settings
* feat: add changelog page with mdx support
- Added support for MDX files in the Next.js configuration, allowing for rich content in the changelog.
- Introduced a new changelog layout and page structure to display updates effectively.
- Implemented dynamic routing for individual changelog entries, improving navigation and user experience.
- Enhanced the footer component with subscription functionality and improved styling.
- Updated translations to include changelog links across multiple languages.
- Added new components for date formatting and project logo descriptions to enhance the changelog presentation.
* feat: add environment configuration and update social links in tests
- Created a new .env.example file to define environment variables for server and client configurations, including Sentry, Resend, Redis, and personal information for invoices.
- Updated e2e tests to utilize GITHUB_URL and TWITTER_URL from the config for social media links, enhancing maintainability and consistency across the application.
- Refactored footer and about page components to use dynamic URLs for GitHub and Twitter, improving code clarity and reducing hardcoded values.
* chore: update environment configuration and README for clarity
- Updated .env.example to set default values for Sentry and Google Drive API configurations, enhancing clarity for new developers.
- Modified env.ts to remove minimum length validation for environment variables, simplifying the setup process.
- Enhanced README with quick start instructions and service links for Resend, Upstash, Google Drive API, and Telegram Bot API, improving onboarding experience.
* chore: add localtunnel script to package.json and adjust input component styles
- Added a new script expose-to-internet in package.json for localtunnel to facilitate external access during development.
- Updated the Input component to conditionally adjust width for date type inputs, enhancing responsiveness and usability.
* fix: update tagline in various components for consistency
* refactor: enhance loading component layout and styling
* refactor: improve invoice form validation and template handling
- Enhanced the InvoiceForm component to validate data before saving to local storage using Zod.
- Updated GeneralInformation component to handle template-specific updates for date format and clear fields based on the selected template.
- Adjusted StripeSellerBuyerInfo component styles for better spacing and consistency.
- Improved InvoiceBody component to handle invoice total formatting more robustly.
- Updated translations for 'billTo' in multiple languages for better accuracy.
* footer fix
* refactor: standardize date formatting in invoice templates
- Introduced STRIPE_DEFAULT_DATE_FORMAT constant for consistent date formatting across invoice-related components.
- Updated template tests to utilize the new date format for improved maintainability.
- Adjusted GeneralInformation component to set date format based on the selected template, enhancing clarity and consistency.
2025-07-08 23:39:21 +00:00
|
|
|
|
|
|
|
|
|
|
expect(pdfData.text).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`1/${CURRENT_MONTH_AND_YEAR}·£3,000.00 due ${paymentDate}·Created with https://easyinvoicepdf.comPage 1 of 1`,
|
feat: stripe invoice template, new CTA toasts, cleanup landing page + other improvements (#118)
* feat: enhance Android PDF viewer with error handling and memoization
- Added error handling for PDF loading failures in AndroidPdfViewer, utilizing Sentry for logging and user-friendly toast notifications.
- Implemented memoization for the InvoicePdfTemplate to optimize rendering performance.
- Updated layout.tsx to include necessary CSS for PDF rendering.
- Adjusted index.tsx comments for clarity on viewer types.
* feat: add new toasts, cleanup landing page, add stripe template
* feat: enhance PDF footer and update tests for dynamic content
- Introduced a new InvoiceFooter component to modularize footer rendering in PDF templates, improving code organization and reusability.
- Updated PDF tests to verify dynamic content in footers, including current month/year and payment due date, ensuring accurate invoice representation.
- Added PROD_WEBSITE_URL to config for consistent URL usage across components.
- Improved Telegram message handling with cache control headers for better performance.
* feat: implement invoice sharing logic and logo handling for stripe template
- Added state management for sharing invoices, including validation for logos that exceed URL length limits.
- Updated the share invoice button to reflect sharing capabilities based on logo presence.
- Introduced logo upload functionality with validation for file type and size, enhancing user experience.
- Refactored invoice form to disable sharing when a logo is present in Stripe templates, ensuring compliance with URL constraints.
- Improved toast notifications for user feedback on sharing and logo upload actions.
* feat: update invoice descriptions and enhance date handling in PDF templates
- Updated invoice descriptions in multiple languages to clarify that the tool runs entirely in the browser.
- Refactored date handling in the Stripe template components to ensure accurate formatting based on the invoice's language settings.
- Introduced a new InvoiceBody component to modularize the PDF rendering process, improving code organization and reusability.
- Enhanced the StripeDueAmount and StripeFooter components to reflect the updated date logic and improve overall clarity in the invoice presentation.
- Added localization support for date formatting using dayjs across various components.
- Added new currencies
* chore: remove unused vercel.json and add new e2e tests for invoice sharing and PDF generation
- Deleted the unused vercel.json configuration file.
- Updated the about page test to reflect changes in the description for clarity.
- Removed redundant error message checks in the invoice form tests.
- Added new e2e tests for PDF generation and sharing logic specific to the Stripe template, ensuring comprehensive coverage of invoice functionalities.
* feat: enhance umami tracking with invoice template data and improve error handling
* refactor: improve tooltips text and design, improve error handling and test assertions in invoice form and logo upload utilities
- Enhanced error handling in the logo upload function to ensure input elements are present and base64 data is provided.
- Updated e2e tests for the invoice generator page to use more reliable URL assertions.
- Refactored invoice form logic to simplify sharing validation based on template and logo presence.
- Improved button accessibility and user experience by clarifying aria-disabled attributes in various components.
* refactor: update CTA toast logic and improve button components
- Changed the timer for showing the CTA toast from 30 seconds to 40 seconds.
* fix tests
* fix: update date formatting in general information section to respect locale settings
* feat: add changelog page with mdx support
- Added support for MDX files in the Next.js configuration, allowing for rich content in the changelog.
- Introduced a new changelog layout and page structure to display updates effectively.
- Implemented dynamic routing for individual changelog entries, improving navigation and user experience.
- Enhanced the footer component with subscription functionality and improved styling.
- Updated translations to include changelog links across multiple languages.
- Added new components for date formatting and project logo descriptions to enhance the changelog presentation.
* feat: add environment configuration and update social links in tests
- Created a new .env.example file to define environment variables for server and client configurations, including Sentry, Resend, Redis, and personal information for invoices.
- Updated e2e tests to utilize GITHUB_URL and TWITTER_URL from the config for social media links, enhancing maintainability and consistency across the application.
- Refactored footer and about page components to use dynamic URLs for GitHub and Twitter, improving code clarity and reducing hardcoded values.
* chore: update environment configuration and README for clarity
- Updated .env.example to set default values for Sentry and Google Drive API configurations, enhancing clarity for new developers.
- Modified env.ts to remove minimum length validation for environment variables, simplifying the setup process.
- Enhanced README with quick start instructions and service links for Resend, Upstash, Google Drive API, and Telegram Bot API, improving onboarding experience.
* chore: add localtunnel script to package.json and adjust input component styles
- Added a new script expose-to-internet in package.json for localtunnel to facilitate external access during development.
- Updated the Input component to conditionally adjust width for date type inputs, enhancing responsiveness and usability.
* fix: update tagline in various components for consistency
* refactor: enhance loading component layout and styling
* refactor: improve invoice form validation and template handling
- Enhanced the InvoiceForm component to validate data before saving to local storage using Zod.
- Updated GeneralInformation component to handle template-specific updates for date format and clear fields based on the selected template.
- Adjusted StripeSellerBuyerInfo component styles for better spacing and consistency.
- Improved InvoiceBody component to handle invoice total formatting more robustly.
- Updated translations for 'billTo' in multiple languages for better accuracy.
* footer fix
* refactor: standardize date formatting in invoice templates
- Introduced STRIPE_DEFAULT_DATE_FORMAT constant for consistent date formatting across invoice-related components.
- Updated template tests to utilize the new date format for improved maintainability.
- Adjusted GeneralInformation component to set date format based on the selected template, enhancing clarity and consistency.
2025-07-08 23:39:21 +00:00
|
|
|
|
);
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
test("completes full invoice flow on mobile: tabs navigation, form editing and PDF download in French", async ({
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
page,
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
browserName,
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
}) => {
|
|
|
|
|
|
// 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 downloadButtonEnglish = page.getByRole("link", {
|
|
|
|
|
|
name: "Download PDF in English",
|
|
|
|
|
|
});
|
|
|
|
|
|
// Wait for download button to be visible
|
|
|
|
|
|
await expect(downloadButtonEnglish).toBeVisible();
|
|
|
|
|
|
// Wait for download button to be enabled
|
|
|
|
|
|
await expect(downloadButtonEnglish).toBeEnabled();
|
|
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
// Switch to French
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
await page
|
|
|
|
|
|
.getByRole("combobox", { name: "Invoice PDF Language" })
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
.selectOption("fr");
|
|
|
|
|
|
|
|
|
|
|
|
// Switch currency to GBP
|
|
|
|
|
|
await page.getByRole("combobox", { name: "Currency" }).selectOption("GBP");
|
|
|
|
|
|
|
|
|
|
|
|
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");
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
|
feat: add notes for seller and buyer, seo improvements and other stuff (#95)
* test: enhance invoice form tests with URL validation and error handling
- Added a test to verify correct URL navigation on the Invoice Generator Page.
- Implemented a new test to check for user notifications when an invalid invoice link is accessed, ensuring proper error messaging and UI behavior.
- Updated the duration of error toast messages in the AppPageClient for improved user experience.
* test: enhance buyer and seller management tests with notes functionality
- Added tests for notes field visibility and content in buyer and seller management dialogs.
- Verified default state of notes visibility switches and their behavior during editing.
- Updated invoice form tests to ensure notes are correctly displayed and managed in the UI.
- Improved error handling and validation for notes input in both buyer and seller sections.
* feat: update localization messages for About page across multiple languages
- Enhanced metadata titles and descriptions for the About page in German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Russian, and Ukrainian.
- Improved clarity and consistency in titles and descriptions, emphasizing the free invoice generator and live preview features.
- Updated keywords for better SEO and user understanding across all supported languages.
* chore: upd cursor rules
* chore: update Sentry configuration to remove hardcoded DSN and ensure production environment checks
* chore: update Sentry configuration to use environment checks for DSN and enablement across client, edge, and server configurations
* chore: remove console logging from Sentry configuration files for cleaner production code
2025-04-23 13:22:00 +00:00
|
|
|
|
const finalSection = page.getByTestId("final-section");
|
|
|
|
|
|
await finalSection
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
.getByRole("textbox", { name: "Notes", exact: true })
|
|
|
|
|
|
.fill("Mobile test note");
|
|
|
|
|
|
|
|
|
|
|
|
// 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
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
.getByRole("spinbutton", { name: "Amount (Quantity)" })
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
.fill("3");
|
|
|
|
|
|
await invoiceItemsSection
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
.getByRole("spinbutton", {
|
|
|
|
|
|
name: "Net Price (Rate or Unit Price)",
|
|
|
|
|
|
})
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
.fill("50");
|
|
|
|
|
|
await invoiceItemsSection
|
|
|
|
|
|
.getByRole("textbox", { name: "VAT", exact: true })
|
|
|
|
|
|
.fill("23");
|
|
|
|
|
|
|
|
|
|
|
|
// we wait until this button is visible and enabled, that means that the PDF preview has been regenerated
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
const downloadButtonFrench = page.getByRole("link", {
|
|
|
|
|
|
name: "Download PDF in French",
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
});
|
|
|
|
|
|
// Wait for download button to be visible and enabled
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
await expect(downloadButtonFrench).toBeVisible();
|
|
|
|
|
|
await expect(downloadButtonFrench).toBeEnabled();
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
|
|
|
|
|
|
// Switch to preview tab
|
|
|
|
|
|
await page.getByRole("tab", { name: "Preview PDF" }).click();
|
|
|
|
|
|
|
|
|
|
|
|
// Verify preview tab is selected
|
|
|
|
|
|
await expect(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
page.getByRole("tabpanel", { name: "Preview PDF" }),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toBeVisible();
|
|
|
|
|
|
await expect(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
page.getByRole("tabpanel", { name: "Edit Invoice" }),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toBeHidden();
|
|
|
|
|
|
|
|
|
|
|
|
// Set up download handler
|
|
|
|
|
|
const downloadPromise = page.waitForEvent("download");
|
|
|
|
|
|
|
|
|
|
|
|
// Click the download button
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
await downloadButtonFrench.click();
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
|
|
|
|
|
|
// Wait for the download to start
|
|
|
|
|
|
const download = await downloadPromise;
|
|
|
|
|
|
|
|
|
|
|
|
// Get the suggested filename
|
|
|
|
|
|
const suggestedFilename = download.suggestedFilename();
|
|
|
|
|
|
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
// Save the file to a browser-specific temporary location
|
|
|
|
|
|
const tmpPath = path.join(
|
|
|
|
|
|
getDownloadDir({ browserName }),
|
2025-08-19 23:15:48 +00:00
|
|
|
|
suggestedFilename,
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
);
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
await download.saveAs(tmpPath);
|
|
|
|
|
|
|
|
|
|
|
|
// Read and verify PDF content using pdf-parse
|
|
|
|
|
|
const dataBuffer = await fs.promises.readFile(tmpPath);
|
|
|
|
|
|
const pdfData = await pdf(dataBuffer);
|
|
|
|
|
|
|
|
|
|
|
|
// Verify PDF content in Polish
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
expect(pdfData.text).toContain("MOBILE-TEST-001: 2/05-2024");
|
|
|
|
|
|
expect(pdfData.text).toContain("Date d'émission");
|
|
|
|
|
|
|
|
|
|
|
|
expect(pdfData.text).toContain("Vendeur");
|
|
|
|
|
|
expect(pdfData.text).toContain("Acheteur");
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
expect(pdfData.text).toContain("Mobile Test Seller");
|
|
|
|
|
|
expect(pdfData.text).toContain("456 Mobile St");
|
|
|
|
|
|
|
|
|
|
|
|
const lastDayOfCurrentMonth = dayjs().endOf("month").format("YYYY-MM-DD");
|
|
|
|
|
|
expect(pdfData.text).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`Date de vente/prestation de service: ${lastDayOfCurrentMonth}`,
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
// Verify calculations in Polish
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
expect(pdfData.text).toContain(`Total à payer: 184.50 GBP
|
|
|
|
|
|
Payé: 0.00 GBP
|
|
|
|
|
|
Reste à payer: 184.50 GBP
|
|
|
|
|
|
Montant en lettres: cent quatre-vingt-quatre GBP 50/100`);
|
|
|
|
|
|
|
|
|
|
|
|
// Verify toast appears after download
|
feat: stripe invoice template, new CTA toasts, cleanup landing page + other improvements (#118)
* feat: enhance Android PDF viewer with error handling and memoization
- Added error handling for PDF loading failures in AndroidPdfViewer, utilizing Sentry for logging and user-friendly toast notifications.
- Implemented memoization for the InvoicePdfTemplate to optimize rendering performance.
- Updated layout.tsx to include necessary CSS for PDF rendering.
- Adjusted index.tsx comments for clarity on viewer types.
* feat: add new toasts, cleanup landing page, add stripe template
* feat: enhance PDF footer and update tests for dynamic content
- Introduced a new InvoiceFooter component to modularize footer rendering in PDF templates, improving code organization and reusability.
- Updated PDF tests to verify dynamic content in footers, including current month/year and payment due date, ensuring accurate invoice representation.
- Added PROD_WEBSITE_URL to config for consistent URL usage across components.
- Improved Telegram message handling with cache control headers for better performance.
* feat: implement invoice sharing logic and logo handling for stripe template
- Added state management for sharing invoices, including validation for logos that exceed URL length limits.
- Updated the share invoice button to reflect sharing capabilities based on logo presence.
- Introduced logo upload functionality with validation for file type and size, enhancing user experience.
- Refactored invoice form to disable sharing when a logo is present in Stripe templates, ensuring compliance with URL constraints.
- Improved toast notifications for user feedback on sharing and logo upload actions.
* feat: update invoice descriptions and enhance date handling in PDF templates
- Updated invoice descriptions in multiple languages to clarify that the tool runs entirely in the browser.
- Refactored date handling in the Stripe template components to ensure accurate formatting based on the invoice's language settings.
- Introduced a new InvoiceBody component to modularize the PDF rendering process, improving code organization and reusability.
- Enhanced the StripeDueAmount and StripeFooter components to reflect the updated date logic and improve overall clarity in the invoice presentation.
- Added localization support for date formatting using dayjs across various components.
- Added new currencies
* chore: remove unused vercel.json and add new e2e tests for invoice sharing and PDF generation
- Deleted the unused vercel.json configuration file.
- Updated the about page test to reflect changes in the description for clarity.
- Removed redundant error message checks in the invoice form tests.
- Added new e2e tests for PDF generation and sharing logic specific to the Stripe template, ensuring comprehensive coverage of invoice functionalities.
* feat: enhance umami tracking with invoice template data and improve error handling
* refactor: improve tooltips text and design, improve error handling and test assertions in invoice form and logo upload utilities
- Enhanced error handling in the logo upload function to ensure input elements are present and base64 data is provided.
- Updated e2e tests for the invoice generator page to use more reliable URL assertions.
- Refactored invoice form logic to simplify sharing validation based on template and logo presence.
- Improved button accessibility and user experience by clarifying aria-disabled attributes in various components.
* refactor: update CTA toast logic and improve button components
- Changed the timer for showing the CTA toast from 30 seconds to 40 seconds.
* fix tests
* fix: update date formatting in general information section to respect locale settings
* feat: add changelog page with mdx support
- Added support for MDX files in the Next.js configuration, allowing for rich content in the changelog.
- Introduced a new changelog layout and page structure to display updates effectively.
- Implemented dynamic routing for individual changelog entries, improving navigation and user experience.
- Enhanced the footer component with subscription functionality and improved styling.
- Updated translations to include changelog links across multiple languages.
- Added new components for date formatting and project logo descriptions to enhance the changelog presentation.
* feat: add environment configuration and update social links in tests
- Created a new .env.example file to define environment variables for server and client configurations, including Sentry, Resend, Redis, and personal information for invoices.
- Updated e2e tests to utilize GITHUB_URL and TWITTER_URL from the config for social media links, enhancing maintainability and consistency across the application.
- Refactored footer and about page components to use dynamic URLs for GitHub and Twitter, improving code clarity and reducing hardcoded values.
* chore: update environment configuration and README for clarity
- Updated .env.example to set default values for Sentry and Google Drive API configurations, enhancing clarity for new developers.
- Modified env.ts to remove minimum length validation for environment variables, simplifying the setup process.
- Enhanced README with quick start instructions and service links for Resend, Upstash, Google Drive API, and Telegram Bot API, improving onboarding experience.
* chore: add localtunnel script to package.json and adjust input component styles
- Added a new script expose-to-internet in package.json for localtunnel to facilitate external access during development.
- Updated the Input component to conditionally adjust width for date type inputs, enhancing responsiveness and usability.
* fix: update tagline in various components for consistency
* refactor: enhance loading component layout and styling
* refactor: improve invoice form validation and template handling
- Enhanced the InvoiceForm component to validate data before saving to local storage using Zod.
- Updated GeneralInformation component to handle template-specific updates for date format and clear fields based on the selected template.
- Adjusted StripeSellerBuyerInfo component styles for better spacing and consistency.
- Improved InvoiceBody component to handle invoice total formatting more robustly.
- Updated translations for 'billTo' in multiple languages for better accuracy.
* footer fix
* refactor: standardize date formatting in invoice templates
- Introduced STRIPE_DEFAULT_DATE_FORMAT constant for consistent date formatting across invoice-related components.
- Updated template tests to utilize the new date format for improved maintainability.
- Adjusted GeneralInformation component to set date format based on the selected template, enhancing clarity and consistency.
2025-07-08 23:39:21 +00:00
|
|
|
|
await expect(page.getByTestId("download-pdf-toast")).toBeVisible();
|
|
|
|
|
|
|
2025-05-05 19:18:29 +00:00
|
|
|
|
await expect(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
page.getByRole("link", { name: "Star on GitHub" }),
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
).toBeVisible();
|
feat: stripe invoice template, new CTA toasts, cleanup landing page + other improvements (#118)
* feat: enhance Android PDF viewer with error handling and memoization
- Added error handling for PDF loading failures in AndroidPdfViewer, utilizing Sentry for logging and user-friendly toast notifications.
- Implemented memoization for the InvoicePdfTemplate to optimize rendering performance.
- Updated layout.tsx to include necessary CSS for PDF rendering.
- Adjusted index.tsx comments for clarity on viewer types.
* feat: add new toasts, cleanup landing page, add stripe template
* feat: enhance PDF footer and update tests for dynamic content
- Introduced a new InvoiceFooter component to modularize footer rendering in PDF templates, improving code organization and reusability.
- Updated PDF tests to verify dynamic content in footers, including current month/year and payment due date, ensuring accurate invoice representation.
- Added PROD_WEBSITE_URL to config for consistent URL usage across components.
- Improved Telegram message handling with cache control headers for better performance.
* feat: implement invoice sharing logic and logo handling for stripe template
- Added state management for sharing invoices, including validation for logos that exceed URL length limits.
- Updated the share invoice button to reflect sharing capabilities based on logo presence.
- Introduced logo upload functionality with validation for file type and size, enhancing user experience.
- Refactored invoice form to disable sharing when a logo is present in Stripe templates, ensuring compliance with URL constraints.
- Improved toast notifications for user feedback on sharing and logo upload actions.
* feat: update invoice descriptions and enhance date handling in PDF templates
- Updated invoice descriptions in multiple languages to clarify that the tool runs entirely in the browser.
- Refactored date handling in the Stripe template components to ensure accurate formatting based on the invoice's language settings.
- Introduced a new InvoiceBody component to modularize the PDF rendering process, improving code organization and reusability.
- Enhanced the StripeDueAmount and StripeFooter components to reflect the updated date logic and improve overall clarity in the invoice presentation.
- Added localization support for date formatting using dayjs across various components.
- Added new currencies
* chore: remove unused vercel.json and add new e2e tests for invoice sharing and PDF generation
- Deleted the unused vercel.json configuration file.
- Updated the about page test to reflect changes in the description for clarity.
- Removed redundant error message checks in the invoice form tests.
- Added new e2e tests for PDF generation and sharing logic specific to the Stripe template, ensuring comprehensive coverage of invoice functionalities.
* feat: enhance umami tracking with invoice template data and improve error handling
* refactor: improve tooltips text and design, improve error handling and test assertions in invoice form and logo upload utilities
- Enhanced error handling in the logo upload function to ensure input elements are present and base64 data is provided.
- Updated e2e tests for the invoice generator page to use more reliable URL assertions.
- Refactored invoice form logic to simplify sharing validation based on template and logo presence.
- Improved button accessibility and user experience by clarifying aria-disabled attributes in various components.
* refactor: update CTA toast logic and improve button components
- Changed the timer for showing the CTA toast from 30 seconds to 40 seconds.
* fix tests
* fix: update date formatting in general information section to respect locale settings
* feat: add changelog page with mdx support
- Added support for MDX files in the Next.js configuration, allowing for rich content in the changelog.
- Introduced a new changelog layout and page structure to display updates effectively.
- Implemented dynamic routing for individual changelog entries, improving navigation and user experience.
- Enhanced the footer component with subscription functionality and improved styling.
- Updated translations to include changelog links across multiple languages.
- Added new components for date formatting and project logo descriptions to enhance the changelog presentation.
* feat: add environment configuration and update social links in tests
- Created a new .env.example file to define environment variables for server and client configurations, including Sentry, Resend, Redis, and personal information for invoices.
- Updated e2e tests to utilize GITHUB_URL and TWITTER_URL from the config for social media links, enhancing maintainability and consistency across the application.
- Refactored footer and about page components to use dynamic URLs for GitHub and Twitter, improving code clarity and reducing hardcoded values.
* chore: update environment configuration and README for clarity
- Updated .env.example to set default values for Sentry and Google Drive API configurations, enhancing clarity for new developers.
- Modified env.ts to remove minimum length validation for environment variables, simplifying the setup process.
- Enhanced README with quick start instructions and service links for Resend, Upstash, Google Drive API, and Telegram Bot API, improving onboarding experience.
* chore: add localtunnel script to package.json and adjust input component styles
- Added a new script expose-to-internet in package.json for localtunnel to facilitate external access during development.
- Updated the Input component to conditionally adjust width for date type inputs, enhancing responsiveness and usability.
* fix: update tagline in various components for consistency
* refactor: enhance loading component layout and styling
* refactor: improve invoice form validation and template handling
- Enhanced the InvoiceForm component to validate data before saving to local storage using Zod.
- Updated GeneralInformation component to handle template-specific updates for date format and clear fields based on the selected template.
- Adjusted StripeSellerBuyerInfo component styles for better spacing and consistency.
- Improved InvoiceBody component to handle invoice total formatting more robustly.
- Updated translations for 'billTo' in multiple languages for better accuracy.
* footer fix
* refactor: standardize date formatting in invoice templates
- Introduced STRIPE_DEFAULT_DATE_FORMAT constant for consistent date formatting across invoice-related components.
- Updated template tests to utilize the new date format for improved maintainability.
- Adjusted GeneralInformation component to set date format based on the selected template, enhancing clarity and consistency.
2025-07-08 23:39:21 +00:00
|
|
|
|
|
|
|
|
|
|
await expect(page.getByTestId("toast-cta-btn")).toBeVisible();
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
|
|
|
|
|
|
// Switch back to form tab
|
|
|
|
|
|
await page.getByRole("tab", { name: "Edit Invoice" }).click();
|
|
|
|
|
|
|
|
|
|
|
|
// Verify form tab is selected and data persists
|
|
|
|
|
|
await expect(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
page.getByRole("tabpanel", { name: "Edit Invoice" }),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toBeVisible();
|
|
|
|
|
|
await expect(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
page.getByRole("tabpanel", { name: "Preview PDF" }),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toBeHidden();
|
|
|
|
|
|
|
|
|
|
|
|
// Verify form data persists
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
await expect(invoiceNumberLabelInput).toHaveValue("MOBILE-TEST-001:");
|
|
|
|
|
|
await expect(invoiceNumberValueInput).toHaveValue("2/05-2024");
|
|
|
|
|
|
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
await expect(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
finalSection.getByRole("textbox", { name: "Notes", exact: true }),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toHaveValue("Mobile test note");
|
|
|
|
|
|
|
|
|
|
|
|
// Verify seller information persists
|
|
|
|
|
|
await expect(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
sellerSection.getByRole("textbox", { name: "Name" }),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toHaveValue("Mobile Test Seller");
|
|
|
|
|
|
await expect(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
sellerSection.getByRole("textbox", { name: "Address" }),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toHaveValue("456 Mobile St");
|
|
|
|
|
|
|
|
|
|
|
|
// Verify invoice item persists
|
|
|
|
|
|
await expect(
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
invoiceItemsSection.getByRole("spinbutton", {
|
|
|
|
|
|
name: "Amount (Quantity)",
|
2025-08-19 23:15:48 +00:00
|
|
|
|
}),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toHaveValue("3");
|
|
|
|
|
|
await expect(
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
invoiceItemsSection.getByRole("spinbutton", {
|
|
|
|
|
|
name: "Net Price (Rate or Unit Price)",
|
2025-08-19 23:15:48 +00:00
|
|
|
|
}),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toHaveValue("50");
|
|
|
|
|
|
await expect(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
invoiceItemsSection.getByRole("textbox", { name: "VAT", exact: true }),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toHaveValue("23");
|
|
|
|
|
|
|
|
|
|
|
|
// Verify calculations are correct
|
|
|
|
|
|
await expect(
|
|
|
|
|
|
invoiceItemsSection.getByRole("textbox", {
|
|
|
|
|
|
name: "Net Amount",
|
|
|
|
|
|
exact: true,
|
2025-08-19 23:15:48 +00:00
|
|
|
|
}),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toHaveValue("150.00");
|
|
|
|
|
|
await expect(
|
|
|
|
|
|
invoiceItemsSection.getByRole("textbox", {
|
|
|
|
|
|
name: "VAT Amount",
|
|
|
|
|
|
exact: true,
|
2025-08-19 23:15:48 +00:00
|
|
|
|
}),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toHaveValue("34.50");
|
|
|
|
|
|
await expect(
|
|
|
|
|
|
invoiceItemsSection.getByRole("textbox", {
|
|
|
|
|
|
name: "Pre-tax Amount",
|
|
|
|
|
|
exact: true,
|
2025-08-19 23:15:48 +00:00
|
|
|
|
}),
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
).toHaveValue("184.50");
|
|
|
|
|
|
});
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
|
|
|
|
|
|
test("should display and persist invoice number in different languages", async ({
|
|
|
|
|
|
page,
|
|
|
|
|
|
}) => {
|
|
|
|
|
|
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(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
INITIAL_INVOICE_DATA.invoiceNumberObject.label,
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await expect(invoiceNumberValueInput).toHaveValue(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
INITIAL_INVOICE_DATA.invoiceNumberObject.value,
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const languageSelect = page.getByRole("combobox", {
|
|
|
|
|
|
name: "Invoice PDF Language",
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
await languageSelect.selectOption("pl");
|
|
|
|
|
|
|
|
|
|
|
|
await expect(invoiceNumberLabelInput).toHaveValue(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`${TRANSLATIONS.pl.invoiceNumber}:`,
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await expect(invoiceNumberValueInput).toHaveValue(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`1/${CURRENT_MONTH_AND_YEAR}`,
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
// 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:");
|
|
|
|
|
|
|
|
|
|
|
|
// 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(600);
|
|
|
|
|
|
|
|
|
|
|
|
// we reload the page to test that the invoice number is persisted after page reload
|
|
|
|
|
|
await page.reload();
|
|
|
|
|
|
|
|
|
|
|
|
// Verify that the invoice number is persisted after page reload
|
|
|
|
|
|
await expect(invoiceNumberLabelInput).toHaveValue("Faktura TEST:");
|
|
|
|
|
|
|
|
|
|
|
|
await languageSelect.selectOption("pt");
|
|
|
|
|
|
|
|
|
|
|
|
await expect(invoiceNumberLabelInput).toHaveValue(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`${TRANSLATIONS.pt.invoiceNumber}:`,
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await invoiceNumberLabelInput.fill("Fatura TEST PORTUGUESE N°:");
|
|
|
|
|
|
|
|
|
|
|
|
await expect(
|
|
|
|
|
|
page.getByRole("button", {
|
|
|
|
|
|
name: `Switch to default label ("Fatura N°:")`,
|
2025-08-19 23:15:48 +00:00
|
|
|
|
}),
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
).toBeVisible();
|
|
|
|
|
|
|
|
|
|
|
|
// we wait until this button is visible and enabled, that means that the PDF preview has been regenerated
|
|
|
|
|
|
const downloadButton = page.getByRole("link", {
|
|
|
|
|
|
name: "Download PDF in Portuguese",
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
await expect(downloadButton).toBeVisible();
|
|
|
|
|
|
await expect(downloadButton).toBeEnabled();
|
|
|
|
|
|
|
|
|
|
|
|
// Set up download handler
|
|
|
|
|
|
const downloadPromise = page.waitForEvent("download");
|
|
|
|
|
|
|
|
|
|
|
|
// Click the download button
|
|
|
|
|
|
await downloadButton.click();
|
|
|
|
|
|
|
|
|
|
|
|
// Wait for the download to start
|
|
|
|
|
|
const download = await downloadPromise;
|
|
|
|
|
|
|
|
|
|
|
|
// Get the suggested filename
|
|
|
|
|
|
const suggestedFilename = download.suggestedFilename();
|
|
|
|
|
|
|
|
|
|
|
|
// Save the file to a temporary location
|
|
|
|
|
|
const tmpPath = path.join(downloadDir, suggestedFilename);
|
|
|
|
|
|
await download.saveAs(tmpPath);
|
|
|
|
|
|
|
|
|
|
|
|
// Read and verify PDF content using pdf-parse
|
|
|
|
|
|
const dataBuffer = await fs.promises.readFile(tmpPath);
|
|
|
|
|
|
const pdfData = await pdf(dataBuffer);
|
|
|
|
|
|
|
|
|
|
|
|
// Verify PDF content
|
2025-05-05 19:18:29 +00:00
|
|
|
|
expect(pdfData.text).toContain(
|
2025-08-19 23:15:48 +00:00
|
|
|
|
`Fatura TEST PORTUGUESE N°: 1/${CURRENT_MONTH_AND_YEAR}`,
|
2025-05-05 19:18:29 +00:00
|
|
|
|
);
|
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: update README and refactor localization messages
- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.
* chore: change redirect to permanent: false in next.config.mjs
* feat: localize not-found page
* fix: languages
* refactor: update language handling and improve invoice form components
- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.
* chore: update .gitignore and .prettierignore for i18n files
- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.
* fix
* chore: update Playwright configuration and improve invoice form tests
- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.
* feat: enhance localization for About page and add new features
- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.
* feat: implement translation validation and enhance localization structure
- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.
* refactor: enhance button components and improve layout responsiveness
- Refactored button components in the About and App pages to utilize the prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.
* fix: e2e test
* minor fixes
* feat: add error handling component and enhance localization for error messages
- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.
* feat: enhance localization support and add new languages
- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.
* feat: enhance localization and error handling for About page
- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.
* refactor: improve layout and localization handling in About and App pages
- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.
* feat: enhance localization and add meta tags for About page
- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.
* feat: implement newsletter subscription feature with localization support
- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.
* feat: enhance localization for newsletter subscription messages
- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.
* feat: add robots and sitemap generation for SEO optimization
- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.
* feat: enhance subscription token verification with rate limiting and error handling
- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.
* fix: update email development script directory in package.json
- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.
* feat: enhance locale validation and static rendering in NotFound and layout components
- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.
* feat: enhance invoice form tests and localization messages
* fix: update invoice form test selectors and localization messages
- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.
* feat: refactor NotFound component and introduce locale-specific handling
- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.
* feat: add end-to-end tests for About page and Not Found page
- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.
* refactor: move Not Found page tests to a dedicated file
- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.
* feat: enhance About page tests and localization for newsletter subscription
- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.
* fix(ci): update Playwright report path in e2e workflow
* feat: enhance invoice form with dynamic invoice number handling and localization
- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.
* chore: update .gitignore and refactor PDF test download handling
- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.
* refactor: move default buyer and seller data to constants
- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.
* fix: improve invoice number handling in general information section
- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.
* fix: update invoice number suffix handling in general information section
- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format
* feat: integrate video demo functionality and update UI components
- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.
* fix: update video component and tests for better playback handling
- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.
* fix: enhance About page tests for language navigation
* fix: increase timeout for Playwright expect assertions to improve test reliability
* fix: increase Playwright retries and e2e workflow timeout for improved test stability
* feat: add loading skeleton component and About page loading state
- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.
* fix: update metadata titles and descriptions for localization
- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.
* feat: refactor invoice number handling to support object structure
- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.
* feat: enhance routing and SEO configurations
- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively
* feat: update ESLint rules and refactor navigation imports
- Enhanced ESLint configuration to restrict imports from and , directing to for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.
* fix: improve styles
* feat: add GitHub Actions workflow for E2E test failure notifications
- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.
* chore: remove GitHub Actions workflow for E2E test failure notifications
* chore: update E2E workflow to send email notifications and adjust URL in tests
- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.
* chore: enhance E2E workflow to calculate and report test duration
- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.
* ci improve
* ci improve
* ci improve
* chore: refactor project structure and add utility types
- Removed unused image file .
- Introduced new TypeScript utility types in for better type handling.
- Updated import paths in and to use the new directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in and Redis connection in .
- Cleaned up unused utility functions in .
* feat: add FAQ section to About page and update translations
- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.
* feat: integrate react-aria-components for enhanced disclosure functionality
- Added to the project dependencies for improved accessibility and UI interactions.
- Implemented a new component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.
* feat: enhance error handling for shared invoice URL
- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.
* feat: update translations for multi-language support and customization options
2025-04-19 17:56:32 +00:00
|
|
|
|
expect(pdfData.text).toContain("Data de emissão");
|
|
|
|
|
|
});
|
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components
- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.
* fix: Update language attribute for date input fields in invoice form components
* refactor: Improve layout and organization of invoice components
- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.
* feat: Integrate Playwright for end-to-end testing and enhance invoice form components
- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.
* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage
- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.
* chore: Enhance ESLint configuration for Playwright integration
- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.
* chore: Update Playwright configuration and improve test assertions
- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.
* chore: Update configuration and refactor invoice form components
- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.
* chore: Update Playwright configuration and enhance invoice form tests
- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.
* chore: Update Playwright installation command in GitHub Actions workflow
- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.
* chore: Update GitHub Actions E2E workflow for Playwright report handling
- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.
* chore: Update Playwright installation command in GitHub Actions workflow
- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.
* chore: Enhance E2E tests for seller and buyer management functionality
- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.
* chore: Pin versions of GitHub Actions in E2E workflow for stability
- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.
* chore: Add E2E test for accordion items visibility and localStorage state management
- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.
* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management
- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.
* chore: Refactor Playwright configuration and enhance invoice item validation tests
- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.
* chore: add pdf e2e tests
- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.
* chore: add eslint, knip, lint-staged
* chore: run prettier
* chore: minor improvements
* chore: add more test and improved e2e config
* minor fixes
* minor fixes
* chore: add new test
2025-03-27 20:41:55 +00:00
|
|
|
|
});
|