Files
pleno-vue/tests/e2e/userMyWashStart.spec.ts
T
Jeppe Bundgaard 60742bf947 Refactor and migrate Playwright E2E tests:
- Remove `playwright.config.js` to clean up configuration.
- Add new E2E test suites (`admin-pos-orders`, `admin-module-goals`, `admin-module-pos-mobile-order-flow`) to structure Admin module tests.
- Introduce reusable authentication and data seeding utilities in `fixtures` for streamlined test flows and maintainability.
2026-03-19 12:46:47 +01:00

56 lines
1.5 KiB
TypeScript

import { test, expect } from '@playwright/test';
import {
userCredentials,
subuserPhoneCredentials,
subuserUsernameCredentials,
operatorCredentials,
customerRegistrationData,
driverRegistrationData,
invalidCredentials,
loginAsUser,
loginAsSubuserByPhone,
loginAsSubuserByUsername,
loginAsOperator,
goToUserLogin,
goToSubuserLogin,
goToOperatorLogin,
vehicleTestData,
} from './fixtures';
/** My wash start tests */
/**
* Test that the dynamic machine status image loads successfully after lane selection.
* Fails if ERR_BLOCKED_BY_ORB or other load error hides the image.
*/
test('dynamic machine status image renders after lane selection @smoke', async ({ browser }) => {
// Mock geolocation to Copenhagen area for nearest department with lanes
const context = await browser.newContext({
geolocation: {
latitude: 55.6761,
longitude: 12.5683
},
permissions: ['geolocation']
});
const page = await context.newPage();
await loginAsUser(page);
await page.goto('/user/wash/start');
await page.waitForLoadState('networkidle');
// Wait for lane options to load
await expect(page.locator('b-radio-button')).toBeVisible({ timeout: 45000 });
// Select the second radio (first lane, skip 'Any')
await page.locator('b-radio-button').nth(1).click();
// Wait a bit for watch/effect
await page.waitForTimeout(1000);
// Assert dynamic image loads and is visible
await expect(page.locator('img[alt="Machine status"]')).toBeVisible({ timeout: 15000 });
await context.close();
});