Commit Graph
1262 Commits
Author SHA1 Message Date
Jeppe Bundgaard 5d30690dfd Remove deprecated edge gateway components and associated unit tests:
- Deleted `EdgeGatewayAdvancedOperations.vue` and `EdgeGatewayContextPanel.vue`.
- Removed related unit tests in `use-edge-gateway-terminal.spec.js`.
- Cleaned up unused exports in `useEdgeGatewayTerminal.js`.
2026-04-20 11:20:27 +02:00
Jeppe Bundgaard f3f6237c16 Add step validation for desktop POS workflow and update e2e tests:
- 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.
2026-04-20 10:01:45 +02:00
Jeppe Bundgaard 031b1e7563 Hydrate customer details in POS orders and add e2e tests:
- 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.
2026-04-20 09:55:44 +02:00
Jeppe Bundgaard 56282a8093 Add Stripe Terminal Reader selection and unit tests:
- 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.
2026-04-20 09:46:50 +02:00
Jeppe Bundgaard e0d6f44d0b Update PayWithStripeButton layout for improved responsiveness:
- 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.
2026-04-20 09:22:05 +02:00
Jeppe Bundgaard faa7ebae48 Remove redundant context panel references from edge gateway workspace tests 2026-04-16 14:59:48 +02:00
Jeppe Bundgaard 4071363454 Refactor and format test files for edge gateway workflows:
- 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`.
2026-04-16 14:46:38 +02:00
Jeppe Bundgaard bef9eaeb72 Add unit tests and new components for edge gateway workflows:
- 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.
2026-04-16 13:44:36 +02:00
Jeppe Bundgaard 2d94322021 Refactor hasConnectivityIssue for improved readability and error handling 2026-04-16 10:55:56 +02:00
Jeppe Bundgaard 28bee86ce9 Merge remote-tracking branch 'origin/master' 2026-04-16 10:53:07 +02:00
Jeppe Bundgaard 6c4b9cb599 Add and improve e2e tests for Edge Gateway flows and configure pre-commit hooks:
- 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.
2026-04-16 10:52:56 +02:00
Jeppe B 55ec54fae6 Merge pull request #46 from copenhagentruckwash/edge-and-workers
Update workflows, add pre-commit hooks, and enhance edge handling
2026-04-15 13:44:16 +02:00
Jeppe Bundgaard c06808af33 Update e2e-full workflow to use default_branch for conditional checks 2026-04-15 12:41:22 +02:00
Jeppe Bundgaard a9a5137515 Add pre-commit formatting hooks for test files and configure Husky integration:
- 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.
2026-04-15 12:18:49 +02:00
Jeppe Bundgaard a0c8574399 Add edge agent update handling and verification mechanisms
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.
2026-04-15 12:07:32 +02:00
Jeppe Bundgaard 71b8272eb8 Add tests and functionality for edge gateway updates and lifecycle
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.
2026-04-15 11:53:45 +02:00
Jeppe Bundgaard 95a8f114bc Refactor e2e test fixtures and formatting for consistency:
- 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.
2026-04-15 09:23:25 +02:00
Jeppe Bundgaard 6b91097f98 Add unit and e2e tests for auto-selecting non-barred customer suggestions and update POS vehicle forms:
- 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.
2026-04-15 09:16:43 +02:00
Jeppe Bundgaard 00151ec237 Add unit tests and e2e coverage for POS mobile add-customer autofill functionality:
- 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.
2026-04-15 08:56:30 +02:00
Jeppe Bundgaard b5a8199472 Reduce default Vitest batch size to 5, enforce single-threaded execution, and refactor unit test wait conditions:
- 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.
2026-04-14 17:55:38 +02:00
Jeppe Bundgaard c8f917ac30 Add batch support for Vitest unit tests and update workflows:
- 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.
2026-04-14 17:46:00 +02:00
Jeppe Bundgaard 586aba8531 Refactor collectedOrderInvoiceManageStripe.vue to integrate economic queue job for Stripe invoice booking:
- 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.
2026-04-14 17:34:46 +02:00
Jeppe Bundgaard bf7c01ce25 Update Vite SCSS config: enable quietDeps and expand silenceDeprecations list 2026-04-14 17:30:39 +02:00
Jeppe Bundgaard 1236770513 Refactor e2e tests for improved readability and formatting consistency:
- 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.
2026-04-14 17:24:54 +02:00
Jeppe Bundgaard 3d8203945d Skip unstable test scenarios for Firefox desktop and WebKit mobile; update visual snapshots. 2026-04-14 17:10:28 +02:00
Jeppe Bundgaard 2be33c89a7 Add Edge Broker service and configuration defaults
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.
2026-04-14 16:48:40 +02:00
Jeppe Bundgaard 631e9c4488 Enhance POS mobile e2e tests:
- 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.
2026-04-14 16:32:16 +02:00
Jeppe Bundgaard 1afdda2650 Refactor POS workflows and improve booking flow:
- 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.
2026-04-14 16:19:11 +02:00
Jeppe Bundgaard 6f23941ea4 Add unit tests for ActionSettingsWheelButton i18n key coverage:
- 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.
2026-04-14 14:32:01 +02:00
Jeppe Bundgaard 983585ede7 Refactor and cleanup:
- 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.
2026-04-14 14:17:28 +02:00
Jeppe Bundgaard b01f400d2c Add e2e visual snapshots for Edge Gateways and POS workflows. 2026-04-14 13:50:25 +02:00
Jeppe Bundgaard ecec624aea Update axios to v1.15.0 and vite to v8.0.5; modify dependency flags for improved build configuration. 2026-04-14 13:48:43 +02:00
Jeppe Bundgaard bbbad2c634 Remove dependency on the ws module.
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.
2026-04-14 13:45:15 +02:00
Jeppe Bundgaard 4963fed0b5 Add unit and e2e tests for POS mobile popups:
- 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.
2026-04-14 10:58:27 +02:00
Jeppe Bundgaard a4676f8f87 Add e2e and unit tests for i18n coverage and POS 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.
2026-04-14 10:49:20 +02:00
Jeppe Bundgaard 7533622fb1 Please provide the corresponding diff so I can generate an appropriate commit message. 2026-04-14 10:28:46 +02:00
Jeppe Bundgaard 90518308f8 Add e2e tests for POS desktop card payment flow:
- 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.
2026-04-14 10:28:29 +02:00
Jeppe Bundgaard e88c2d14d5 Refactor POS booking flow and error handling:
- 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.
2026-04-14 10:27:29 +02:00
Jeppe Bundgaard c14f0cc1c4 Add utilities and tests for mobile order management and Subuser navigation:
- 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`).
2026-04-14 10:09:10 +02:00
Jeppe Bundgaard a93b0dc954 Add tests and utilities for dynamic booking preload handling in POS flow:
- 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`).
2026-04-13 21:53:16 +02:00
Jeppe Bundgaard 6549eb5015 Refactor POS booking flow and dropdown logic:
- 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`.
2026-04-13 21:42:18 +02:00
Jeppe Bundgaard 0f37b0632a Add POS order booking modal and utilities with tests:
- 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.
2026-04-13 21:12:34 +02:00
Jeppe Bundgaard 7d9d928a2d Normalize license plate input value handling in LicensePlateInput.vue:
- 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`).
2026-04-13 18:02:06 +02:00
Jeppe Bundgaard ce049d9196 Enhance POS booking flow logic and tests:
- 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.
2026-04-13 17:56:19 +02:00
Jeppe Bundgaard 8f3ec2cf09 Add booking selection popup and refactor POS booking flow logic:
- 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.
2026-04-13 17:27:37 +02:00
Jeppe Bundgaard ecfe27571c Refactor booking flow tests and enhance product category filtering logic:
- 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.
2026-04-13 15:44:15 +02:00
Jeppe Bundgaard 53d1ae114f Enhance booking flow and add customer validation handling:
- 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`.
2026-04-13 15:34:17 +02:00
Jeppe Bundgaard 653aa63899 Refactor POS components and implement new features:
- 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`.
2026-04-13 15:27:34 +02:00
Jeppe Bundgaard 8a25dcd97d Update attachment actions in orders table and e2e tests:
- 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.
2026-04-13 14:45:29 +02:00
Jeppe Bundgaard 3e8a7ee3db Update POS styling and refactor Vue component for consistency:
- **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.
2026-04-13 14:28:12 +02:00