- Public QR menu: BFF proxy endpoints (no auth), PosDataService public methods - Revenue analytics + staff performance: Dapper queries, validators, BFF proxy - Playwright E2E tests: 8 spec files covering auth, admin, 5 POS verticals, reports - Observability: Grafana dashboard (HTTP metrics, infra, business), Prometheus alert rules - Fixes: validator frozen-date bug (Must vs LessThanOrEqualTo), PublicMenuController logging + CancellationToken Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
101 lines
4.3 KiB
TypeScript
101 lines
4.3 KiB
TypeScript
/**
|
|
* EN: Shared test constants, credentials, and route definitions.
|
|
* VI: Cac hang so test dung chung, thong tin dang nhap, va dinh nghia route.
|
|
*/
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Credentials
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export const ADMIN_USER = {
|
|
email: 'admin@goodgo.vn',
|
|
password: 'Admin@123',
|
|
};
|
|
|
|
export const MERCHANT_USER = {
|
|
email: 'merchant@goodgo.vn',
|
|
password: 'Merchant@123',
|
|
};
|
|
|
|
export const STAFF_USER = {
|
|
email: 'staff@goodgo.vn',
|
|
password: 'Staff@123',
|
|
};
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Test Shop / IDs (deterministic UUIDs for seeded data)
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export const TEST_SHOP_ID = '00000000-0000-0000-0000-000000000001';
|
|
export const TEST_ROOM_ID = '00000000-0000-0000-0000-000000000010';
|
|
export const TEST_TABLE_ID = '00000000-0000-0000-0000-000000000020';
|
|
export const TEST_PRODUCT_ID = '00000000-0000-0000-0000-000000000030';
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Routes — Auth
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export const ROUTES = {
|
|
// Auth
|
|
LOGIN: '/auth/login',
|
|
LOGIN_ADMIN: '/auth/login/admin',
|
|
LOGIN_STAFF: '/auth/login/staff',
|
|
LOGIN_CUSTOMER: '/auth/login/customer',
|
|
REGISTER: '/register',
|
|
FORGOT_PASSWORD: '/forgot-password',
|
|
OTP_VERIFY: '/auth/otp-verify',
|
|
TWO_FACTOR: '/auth/two-factor',
|
|
|
|
// Admin
|
|
ADMIN_DASHBOARD: '/admin',
|
|
ADMIN_STORES: '/admin/stores',
|
|
ADMIN_USERS: '/admin/users',
|
|
ADMIN_ROLES: '/admin/roles',
|
|
ADMIN_SETTINGS: '/admin/settings',
|
|
ADMIN_EOD_REPORT: '/admin/reports/eod',
|
|
ADMIN_SPA_THERAPISTS: '/admin/spa/therapists',
|
|
ADMIN_SPA_APPOINTMENTS: '/admin/spa/appointments',
|
|
|
|
// POS — parameterised with TEST_SHOP_ID
|
|
posKaraoke: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/karaoke`,
|
|
posKaraokeRoomSelect: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/karaoke/room-select`,
|
|
posKaraokeRoomSession: (shopId = TEST_SHOP_ID, roomId = TEST_ROOM_ID) =>
|
|
`/pos/${shopId}/karaoke/room-session/${roomId}`,
|
|
posKaraokeOrderFnb: (shopId = TEST_SHOP_ID, roomId = TEST_ROOM_ID) =>
|
|
`/pos/${shopId}/karaoke/order-fnb/${roomId}`,
|
|
|
|
posRestaurant: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/restaurant`,
|
|
posRestaurantTableMap: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/restaurant/table-map`,
|
|
posRestaurantTableDetail: (shopId = TEST_SHOP_ID, tableId = TEST_TABLE_ID) =>
|
|
`/pos/${shopId}/restaurant/table-detail/${tableId}`,
|
|
posRestaurantKitchenDisplay: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/restaurant/kitchen-display`,
|
|
posRestaurantEodReport: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/restaurant/eod-report`,
|
|
|
|
posCafe: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/cafe`,
|
|
posCafeBaristaQueue: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/cafe/barista-queue`,
|
|
posCafeLoyaltyStamp: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/cafe/loyalty-stamp`,
|
|
posCafeDailyReport: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/cafe/daily-report`,
|
|
|
|
posRetail: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/retail`,
|
|
posRetailProductSearch: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/retail/product-search`,
|
|
posRetailStockCheck: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/retail/stock-check`,
|
|
posRetailReturnExchange: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/retail/return-exchange`,
|
|
|
|
posSpa: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/spa`,
|
|
posSpaAppointmentBook: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/spa/appointment-book`,
|
|
posSpaStaffAssign: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/spa/staff-assign`,
|
|
posSpaJourney: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/spa/spa-journey`,
|
|
|
|
// Shared POS
|
|
posPaymentMethodSelect: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/payment/method-select`,
|
|
posPaymentCash: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/payment/cash`,
|
|
posPaymentSuccess: (shopId = TEST_SHOP_ID) => `/pos/${shopId}/payment/success`,
|
|
} as const;
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// Blazor WASM loading helpers
|
|
// ---------------------------------------------------------------------------
|
|
|
|
/** Maximum time (ms) to wait for the Blazor WASM runtime to finish loading. */
|
|
export const BLAZOR_LOAD_TIMEOUT = 30_000;
|