feat: update frontend paths to include trailing slashes for consistency
This commit is contained in:
@@ -36,7 +36,7 @@ async function waitForAppReady(page: Page) {
|
||||
|
||||
// Utility per fare login completo come validatore
|
||||
async function loginAsValidator(page: Page, validatorBadge: string = '0008988288') {
|
||||
await page.goto('/');
|
||||
await page.goto('/badge/');
|
||||
await waitForAppReady(page);
|
||||
|
||||
// Passo 1: Passa il badge
|
||||
@@ -69,7 +69,7 @@ async function loginAsValidator(page: Page, validatorBadge: string = '0008988288
|
||||
test.describe('Flusso Validatore', () => {
|
||||
|
||||
test('01 - mostra schermata attesa badge validatore', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await page.goto('/badge/');
|
||||
await waitForAppReady(page);
|
||||
|
||||
await expect(page.getByText(/passa.*badge/i)).toBeVisible();
|
||||
@@ -80,7 +80,7 @@ test.describe('Flusso Validatore', () => {
|
||||
});
|
||||
|
||||
test('02 - scansione badge mostra campo password', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await page.goto('/badge/');
|
||||
await waitForAppReady(page);
|
||||
|
||||
// Scansiona un badge
|
||||
@@ -106,7 +106,7 @@ test.describe('Flusso Validatore', () => {
|
||||
});
|
||||
|
||||
test('04 - password errata mostra errore', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await page.goto('/badge/');
|
||||
await waitForAppReady(page);
|
||||
|
||||
// Scansiona badge
|
||||
@@ -126,7 +126,7 @@ test.describe('Flusso Validatore', () => {
|
||||
});
|
||||
|
||||
test('05 - pulsante annulla torna a attesa badge', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await page.goto('/badge/');
|
||||
await waitForAppReady(page);
|
||||
|
||||
// Scansiona badge
|
||||
@@ -257,7 +257,7 @@ test.describe('Conferma Ingresso', () => {
|
||||
test.describe('Debug Page', () => {
|
||||
|
||||
test('11 - pagina debug accessibile', async ({ page }) => {
|
||||
await page.goto('/debug');
|
||||
await page.goto('/badge/debug');
|
||||
|
||||
await expect(page.getByRole('heading', { name: 'Debug RFID' })).toBeVisible();
|
||||
console.log('[E2E] ✓ Pagina debug accessibile');
|
||||
|
||||
@@ -20,7 +20,7 @@ export default defineConfig({
|
||||
|
||||
use: {
|
||||
// URL base del server (frontend servito su /badge)
|
||||
baseURL: 'http://localhost:8000/badge',
|
||||
baseURL: 'http://localhost:8000/',
|
||||
|
||||
// Rallenta le azioni per vedere cosa succede
|
||||
launchOptions: {
|
||||
@@ -55,7 +55,7 @@ export default defineConfig({
|
||||
// Server da avviare prima dei test
|
||||
webServer: {
|
||||
command: 'cd .. && ./dev.sh server -d backend-mock/data/users_test.json',
|
||||
url: 'http://localhost:8000',
|
||||
url: 'http://localhost:8000/badge/',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 30000,
|
||||
},
|
||||
|
||||
@@ -8,6 +8,7 @@ export default defineConfig({
|
||||
plugins: [react(), tailwindcss()],
|
||||
|
||||
// Base path per il frontend servito su /badge
|
||||
// NOTA: trailing slash importante per generare URL corretti degli asset
|
||||
base: '/badge/',
|
||||
|
||||
// Build nella cartella dist del frontend
|
||||
|
||||
Reference in New Issue
Block a user