Add unit tests and services for Self-Serve Vehicle Step and Excel export:
- Introduce `TableExcelExportService` with functions for workbook creation and export (`normalizeExcelValue`, `createWorkbookFromRows`, `downloadWorkbook`). - Add unit tests for `SelfServeVehicleStep` to test vehicle selection persistence, registration normalization, and emission behavior. - Extend logic and tests for Self-Serve vehicle management with error handling, dynamic state updates, and step transitions (`MyWashStart.vue`). - Integrate Excel export in `PaginatedList.vue` with user-defined transformations and error resilience.
This commit is contained in:
@@ -45,7 +45,7 @@ async function fillRegistration(page, value) {
|
||||
|
||||
async function selectVehicleType(page, vehicleTypeId = 2) {
|
||||
await page.getByTestId(`self-serve-vehicle-type-${vehicleTypeId}`).click();
|
||||
await expect(page.getByTestId("self-serve-selected-vehicle-type")).toContainText(/Truck|Van|Car/);
|
||||
await expect(page.getByTestId("self-serve-vehicle-selector-description")).toContainText(/Truck|Van|Car/);
|
||||
}
|
||||
|
||||
function buildSavedProgress(overrides = {}) {
|
||||
@@ -315,7 +315,7 @@ test.describe("Self-serve wash", () => {
|
||||
await fillRegistration(page, "ab12345");
|
||||
await selectVehicleType(page, 2);
|
||||
await expect(page.getByTestId("self-serve-nav-next")).toBeVisible();
|
||||
await expect(page.getByTestId("self-serve-selected-vehicle-type")).toContainText("Truck");
|
||||
await expect(page.getByTestId("self-serve-vehicle-selector-description")).toContainText("Truck");
|
||||
});
|
||||
|
||||
test("admin preview modal reuses shared question/task rendering", async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user