- Introduced `orders-draft-count-refresh.spec.js` for testing `Orders` navigation hooks on customer changes and order deletions.
- Enhanced `use-draft-transaction-customer.spec.js` with tests for clearing cached fallback customers.
- Updated POS mobile components with accessibility labels and localization for image viewer and customer suggestion buttons.
- Added support for `vehicleCustomerSuggestionsGet` handling in e2e mocks and tests.
- Implemented end-to-end test cases for validating `AssignDraftOrderCustomerModal` workflows, including error handling and behavior consistency.
- Introduced test harness in `change-customer-modal.html` and `change-customer-modal.ts` to facilitate testing of modal interactions.
- Added supporting unit tests for modal behavior and integration with session data.
- Introduced support for managing Stripe invoices in `DepartmentPosOrder.vue`, including helper functions for status handling, action visibility, and cancellation.
- Added `isStripeHostedInvoiceOpen` and `shouldShowStripeInvoiceAction` checks to control panel visibility.
- Enhanced `fetchSuperUserBookingCounts` with a new endpoint for department-scoped booking totals and streamlined logic for grouped counts.
- Updated e2e tests to reflect booking badge tooltips and streamlined department-based count requests.
- Introduced `AssignDraftOrderCustomerModal` component with supporting localization for managing customer assignments.
- Added e2e harness for modal testing in `assign-draft-order-customer-modal.html` and `assign-draft-order-customer-modal.ts`.
- Implemented e2e test cases for customer assignment workflows in `assign-draft-order-modal-create.spec.ts` and `assign-draft-order-modal-layout.spec.ts`.
- Deleted `EdgeGatewayManager.vue` alongside its components, templates, styles, and functionality.
- Added tests for `fetchDepartmentOrderBookingCount`.
- Introduced `adminBookingCount.js` for department booking count logic.
- Introduced `repairText` and `containsSuspiciousEncoding` utilities for handling corrupted text encodings.
- Added unit tests (`encoding-repair.spec.js`) to validate encoding repair and encoding marker detection.
- Integrated encoding check into unit test workflows (`text:check-encoding` and `text:fix-encoding` scripts).
- Replaced corrupted strings across multiple components and locales with proper UTF-8 encodings.
- Deleted `EdgeGatewayAdvancedOperations.vue` and `EdgeGatewayContextPanel.vue`.
- Removed related unit tests in `use-edge-gateway-terminal.spec.js`.
- Cleaned up unused exports in `useEdgeGatewayTerminal.js`.
- Added `isDesktopStep1Active` computed property to validate step context in `SelectVehicleFormPOS.vue`.
- Updated booking state resolution methods and watchers to respect step validation.
- Extended e2e tests in `pos-desktop-card-payments.spec.js` to validate order reference visibility.
- Updated `POSDepartmentProcess.vue` to resolve and hydrate customer details during order processing.
- Added validation and fallback logic for customer state management.
- Introduced new e2e test cases to ensure customer data persists after reloading.
- Introduced `StripeTerminalReaderSelect` component for terminal reader management.
- Implemented utility functions for normalizing, sorting, and selecting Stripe readers.
- Added unit tests for reader status mapping, normalization, and preferred reader selection.
- Updated `PayWithStripeButton` with new reader selection logic and localization.
- Added `is-full` and `is-fullwidth` classes to columns and buttons for consistent spacing and alignment.
- Improved readability and visual hierarchy within payment flow states and action buttons.
- Improved readability for conditional expressions and multiline function calls in `network.js`.
- Reformatted unit tests in `edge-gateway-workspace.spec.js` for consistent string handling and clarity.
- Enhanced e2e smoke test descriptions and multiline parameter formatting in `edge-gateways.smoke.spec.js`.
- Introduced unit tests for edge gateway workflow helpers, including workflow step resolution, incident action mapping, relay health row formatting, and workspace state merging.
- Added new components for advanced operations, configuration panel, context panel, fleet rail, and health summary.
- Enhanced gateway management UI with support for advanced actions, fallback operations, relay health visualization, and device binding features.
- Introduced live smoke tests for Edge Gateways, verifying gateway routes and destructive-action prevention.
- Added e2e scenarios for deep-link navigation, unavailable gateway recovery, token rotation, and background page refresh.
- Refactored test helpers for streamlined functional validation in gateway scenarios.
- Updated `EdgeGatewayTerminal.vue` with test IDs for enhanced testability.
- Added and configured Husky pre-commit hooks for automated test file formatting and validation.
- Added Husky pre-commit hook to enforce formatting on JavaScript and TypeScript test files.
- Implemented `pre-commit-format-tests.mjs` to check for unstaged changes, format test files using Prettier, and re-stage them.
- Included `prepare-husky.mjs` to verify Husky installation in the git worktree.
- Updated `package-lock.json` to include `husky` as a dependency.
Refactored the edge agent to include robust update handling, verification, and rollback procedures. Enhanced test coverage for critical update flows and introduced support for background edge gateway refresh without disrupting current user actions.
This commit introduces unit tests, E2E tests, and implementation updates related to edge gateway lifecycle management, including update handling, artifact validation, and rollback mechanisms. It also refines routing, component interaction, and backend methods to improve update tracking, status transitions, and artifact management.
- Removed unnecessary string quotes from numeric keys in `cvrSearchResponses` across `mobilePos.js` and related test files.
- Reformatted multiline function chaining and object initialization for improved readability.
- Enhanced fixture setup logic to ensure consistent mock data handling across test scenarios.
- Implemented unit tests for `VehicleCustomerSuggestionsPos` to validate auto-selection and manual override behaviors.
- Added e2e scenarios to verify auto-application of non-barred customer suggestions in desktop POS.
- Refactored customer suggestion handling logic to support new `selectionSource`.
- Updated POS and booking components to improve multi-department booking handling and prevent cross-department conflicts.
- Enhanced booking match validation and streamlined customer suggestion methods.
- Added unit tests for `applyPosAddCustomerSearchResult` to handle autofill field updates, manual overrides, and stale response rejection.
- Implemented a new e2e scenario for preserving manual edits during autofill updates and ignoring stale delayed responses.
- Refactored `mobilePos.js` fixture setup to include CVR search and customer registration mock logic.
- Added and integrated `PosDesktopCustomerConflictModal.vue` for UI handling of customer conflicts.
- Adjusted `run-vitest-unit-batches.mjs` to lower default batch size from 10 to 5 and enforce single-threaded execution for more predictable test behavior.
- Updated GitHub workflows to align with new batch size defaults.
- Introduced `waitForCondition` helper in unit tests to replace arbitrary delays with predicate-based waiting.
- Refactored `useEdgeGatewayTerminal` for improved session handling, including idle delay for shell polling and cleanup of request queuing logic.
- Introduced `run-vitest-unit-batches.mjs` script for running unit tests in batches with configurable batch size.
- Updated `package.json` to replace `test:unit` command with the batch runner and added `test:unit:single` for direct execution.
- Tweaked GitHub workflows (`tests.yml`, `code_quality.yml`) to use updated actions and support batch testing.
- Minor formatting improvements in Vue components and workflows for consistent style.
- Replaced refs with computed properties for status determination (paid, draft, booked, etc.).
- Integrated `useEconomicQueueJob` for stripe transfer management, including enqueue, retry, and transport error handling.
- Streamlined Stripe payment data mapping with `computed` for enhanced maintainability.
- Updated template to include improved UI elements for transfer status and error feedback.
- Added progress indicators and notifications for queue operations.
- Reformatted callback and function parameters across booking flow, POS, and visual test files.
- Enhanced readability by aligning multiline arguments with consistent indentation.
- Updated test messages for clarity and better context.
Introduced the Edge Broker service in the Docker Compose setup, configured to run on port 4300. Updated `.env.example` to include default environment variables for the Edge Broker and adjusted tests to validate the new configuration. Updated visual snapshot tests to reflect related UI changes.
- Added fallback actions to handle missing customer selection and attachment toggles.
- Introduced visibility checks for crucial elements (e.g., "Take Picture" and "Close" actions).
- Updated visual test snapshots for duplicate warnings on desktop.
- Updated `PayWithStripeButton` to handle setup requirements and improved error state handling.
- Enhanced POS mobile popup completion flow with added callback support and fallback actions.
- Introduced booking safety seal and improved step navigation logic.
- Added new e2e tests for booking confirmation, order completion, and error scenarios.
- Adjusted POS e2e and visual tests for updated workflows and UI changes.
- Refactored POS component logic for consistency and improved readability.
- Introduced validation to ensure all literal translation keys in the component are present across active locales.
- Enhanced coverage by integrating locale JSONs and adding missing key detection.
- Refactored button test setup with extracted `SETTINGS_WHEEL_TRANSLATION_KEYS` and reusable helper methods.
- Migrate postinstall script to `postinstall-sync-playwright-root-links.mjs` for streamlined path resolution.
- Replace `axios` v1.15.0 with v1.13.5 and downgrade `vite` from v8.0.5 to v7.1.11.
- Update testing code for consistent formatting and enhanced readability (e.g., `poll` and `catch` calls).
- Remove unused or redundant dependency flags and align `package-lock.json` with new configuration.
Deleted the entire `ws` library and its associated files. This likely reflects a move away from the WebSocket library, possibly signaling an alternate implementation or unused/legacy code cleanup.
- Introduced `headerCloseTestId` and `showHeaderClose` properties in visible-header popups for improved testability.
- Added unit tests to validate header close button behavior across popups.
- Enhanced e2e tests to verify popup visibility and header close functionality in mobile workflows.
- Introduced i18n key usage validation with `tests/e2e/i18n.views.spec.ts` for deterministic locale coverage.
- Added `viewI18nKeyScanner` utility to scan and validate view translation keys.
- Created `PosDepartmentStep1` unit tests for duplicate warnings and booking selection flow.
- Enhanced POS mobile popup with `SelectOrderBookingPopupProps` and new header close options.
- Updated e2e tests with scenarios to verify booking selections, duplicate handling, and locale alignment.
- Added new `test:e2e:i18n:views` npm script for targeted i18n test execution.
- Added tests for handling misconfigured terminal locations with superuser and operator guidance.
- Verified behavior for zero readers, existing payment intents (`requires_capture` and `succeeded`), and happy path payment flows.
- Introduced `bootDesktopCardPayment` helper for streamlined test setup.
- Improved error state management with `normalizeErrorState` and `clearErrorState` utilities.
- Enhanced Stripe payment flow with clear status messaging and support for terminal setup requirements.
- Updated POS component templates (`PosDepartmentStep3.vue`, `PayWithStripeButton.vue`) for better error messages and UX.
- Added `pos-step-4` navigation and tests in e2e flows.
- Introduced utility `toPositiveInteger` for robust numeric validation in bookings.
- Introduced `mobileOrderCompletion.js` for mobile order metadata handling with safety seal syncing, metadata persistence, and booking linking utilities.
- Added tests for Subuser navigation menu (`navigation-menu-items-user-subusers.spec.js`) to validate links and permission gating.
- Created unit and end-to-end tests for Subuser grant permissions and management, including permission nodes and invites (`subuser-grant-permission-nodes.spec.js`, `subuser-management.spec.ts`).
- Implemented `SubuserCompleteRegistrationPage.vue` with validation, token handling, and registration flow for Subuser setup.
- Enhanced Playwright e2e tests for Subuser features (`subuserCompleteRegistration.spec.ts`).
- Introduced logic and utilities to fetch exact plate bookings beyond initial preload (`ensureVehiclePlateBookingsLoaded`, `mergePendingBookings`).
- Enhanced booking dropdown and chooser to handle dynamically loaded data for desktop POS.
- Updated e2e tests (`pos-flow.spec.js`) with scenarios for exact and partial plate matches in booking preload handling.
- Refactored `network.js` to support paginated and filtered responses for bookings based on registration fields.
- Improved UX and display logic in booking selectors (`LicensePlateReg1Input.vue`, `PosDepartmentProcess.vue`).
- Enhanced order booking sorting with improved date handling and validation (`getOrderBookingSortDateValue`, `hasOrderBookingSortDateValue`).
- Updated dropdown interaction in `LicensePlateReg1Input.vue` for better selection behavior and UX.
- Revamped test data and assertions in e2e tests with added coverage for new booking scenarios.
- Improved dropdown styling and responsiveness in `LicensePlateReg1Input.vue`.
- Introduced `PosDesktopOrderBookingSelectorModal.vue` to streamline booking selection for desktop POS.
- Added `orderBookingDisplay.js` utility for handling booking display and reference value normalization.
- Created unit test `select-vehicle-form-pos.spec.js` to validate booking selection flow and registration matching.
- Implemented `run-playwright-ci-parallel.mjs` script to optimize Playwright CI with parallel testing.
- Updated styles and responsiveness for enhanced booking modal UX.
- Ensured input field values are updated consistently with `props.actualValue`.
- Replaced raw `newValue` usage with normalized string values for better data integrity.
- Improved checks for synchronization and validation logic (`checkLicensePlateValid`, `searchCustomerRegistrationNumbers`).
- Added support for trailers (`reg_2`) in booking selection and vehicle matching logic.
- Implemented logic to prioritize bookings from registered vehicles and trailers.
- Enhanced booking dropdown with date labels and validation for booked vehicles.
- Improved e2e tests to cover booking date, trailer registration, and vehicle-search scenarios.
- Refactored Vue components for consistency in booking handling and dropdown interaction.
- Introduced `PosDepartmentStepMobilePopupSelectOrderBooking.vue` for mobile booking selection.
- Refactored vehicle and booking handling in `SelectVehicleFormPOS.vue` with better plate matching, booking persistence, and customer association logic.
- Updated `PosVehicle` object type to include booking matches.
- Enhanced POS transaction history and booking views with improved readability, functionality, and `data-testid` attributes.
- Adjusted `PosPopup.vue` components to support the new booking popup.
- Improved vehicle type selection handling with better validation and polling in `bookingFlow.ts`.
- Updated product card selectors for enhanced visibility and interaction in booking flow tests.
- Added `matchesProductCategory` utility in `network.js` for flexible and accurate product category filtering.
- Introduced `ensureVehicleTypeSelection` utility to streamline vehicle type selection in `bookingFlow.ts`.
- Updated booking flow to conditionally handle vehicle type selection for desktop wizards.
- Added customer number validation logic in `network.js` to simulate backend responses for `/guest/validation/customer-number`.
- Replaced `POSOrderReference.vue` with `OrderAttachmentsActionButton.vue` and added new features like attachment preview, upload, and management.
- Introduced `POSOrderCustomerWishes.vue` for handling customer wishes fields with autosave behavior.
- Added Playwright global setup/teardown scripts for managing dev server lifecycle during tests.
- Enhanced booking flow test utilities and adjusted visibility rules in `bookingFlow.ts`.
- Modified attachment controls to display "+" button when no attachments exist and ensured proper alignment with settings button.
- Refactored `shouldShowOrderAttachmentsButton` logic for improved clarity and access determination.
- Enhanced Vue component (`ordersTable.vue`) to handle attachment addition and visibility, adding support for dynamic labels and icons.
- Updated e2e tests (`admin-pos-orders.spec.ts`) to verify alignment, visibility, and interaction of attachment controls in desktop order list.
- Added CSS rules to improve positioning and responsiveness of order actions.
- **CSS Enhancements:** Added `.pos-registration-control` class, improved styling for registration fields, and enhanced responsiveness for `.pos-order-items--order-detail`.
- **Vue Refactor:** Standardized imports, object keys, and quotes in `ActionSettingsWheelButton.vue` to align with consistent formatting and readability.
- Added `PosOrderRegistrationField.vue` for managing inline registration field inputs with autosave behavior.
- Introduced `useOrderMetadataAutosave.js` composable for seamless value normalization, dirty tracking, and delayed persistence.
- Refactored mobile and desktop POS components to integrate `useOrderMetadataAutosave` for improved field management (e.g., `POSOrderReference.vue`, `PosOrderLicensePlates.vue`).
- Updated e2e tests to cover registration field scenarios, including input normalization and persistence (`pos-mobile-order-flow.spec.js`, `admin-pos-orders.spec.ts`).
- Enhanced styling and responsiveness for registration fields in `pos.css`.
- Added `completeBookingCreationFlow` utility to streamline booking creation logic in `bookingFlow.ts`.
- Refactored `userBookings.spec.ts` to replace inline booking creation steps with the new utility for improved readability and consistency.
- Applied `data-testid` attributes across booking-related components for enhanced testability and test coverage.
- Enhanced Playwright navigation error handling with `isBenignNavigationError` and `settleAuthenticatedNavigation` utilities to improve resilience and test robustness.
- **Internationalization:** Added end-to-end test `i18n.smoke.spec.ts` to validate Danish locale translations. Ensured normalization and removed unexpected strings in the `da` locale file.
- **Orders Table:** Created unit test `orders-table.spec.js` to verify sparse data handling, invoice collection preloading, and rendering correctness.
- **Error Handling:** Enhanced connectivity issue UI (`ConnectivityIssue.vue`) with `data-testid` attributes for improved testability.
- **E2E Playwright Tests:** Updated and simplified e2e test utilities. Replaced `seedAuthenticatedState` with `primeMockSession` for session preparation. Added new tests for `/user/orders` and `/user/invoices` pages focusing on edge cases and maintaining structure consistency.
- Improved structure and layout in `PosDesktopOrderWorkspace.vue` with refined column handling and responsiveness.
- Added `resolveNormalizedPhoneNumber` utility in `POSDepartmentProcess.vue` for consistent phone number normalization across customer records.
- Updated e2e tests to validate layout changes and phone handling behavior.
- Upgraded Playwright to version 1.58.2 and adjusted related configurations.
- Ensured consistent formatting and added `postinstall` script for syncing Playwright root links.
- Strengthened POS customer rule tests with edge case validations for phone number objects.
- Introduced `.prettierrc.json` to enforce consistent code formatting across the project.
- Updated unit and e2e test files to address formatting issues, improve readability, and ensure alignment with the new Prettier configuration.
- Replaced repetitive department module URL logic with `buildDepartmentModulePath` utility in `DepartmentModulesDisplay.vue`.
- Enhanced layouts and responsive behavior across components, including `PosDepartmentStep1MobileTransactionHistory.vue` and `DepartmentDailyReport.vue`.
- Removed unused `SuperuserInvoicingLocalStore.vue` and refactored to `SuperuserInvoicingLocalStore.ts`.
- Updated media query handling and card layout adjustments in `DepartmentDailyReport.vue`.
- Added new Playwright configurations (`playwright.prod.config.ts` and `playwright.live.config.ts`) for e2e release workflows.
- Extended e2e and unit test coverage for mobile POS and department modules.