Merge main into feat/e2e-journey-tests, resolve conflict in smoke.spec.ts (keep single quotes)
This commit is contained in:
@@ -53,13 +53,4 @@ test.describe('J1: Registration and Login', () => {
|
|||||||
await expect(page).toHaveURL('http://localhost:5173/');
|
await expect(page).toHaveURL('http://localhost:5173/');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('shows error on login with wrong password', async ({ page }) => {
|
|
||||||
await page.goto('/login');
|
|
||||||
await page.fill('[placeholder="Email"]', 'nobody@cartsnitch.test');
|
|
||||||
await page.fill('[placeholder="Password"]', 'WrongPassword1!');
|
|
||||||
await page.click('button[type="submit"]');
|
|
||||||
|
|
||||||
// With VITE_MOCK_AUTH=false the catch block shows error
|
|
||||||
await expect(page.locator('.bg-red-50')).toBeVisible();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
+3
-1
@@ -1,6 +1,8 @@
|
|||||||
import { test, expect } from "./fixtures";
|
import { test, expect } from './fixtures';
|
||||||
|
|
||||||
test("app loads", async ({ page }) => {
|
test("app loads", async ({ page }) => {
|
||||||
await page.goto("/");
|
await page.goto("/");
|
||||||
await expect(page).toHaveTitle(/CartSnitch/);
|
await expect(page).toHaveTitle(/CartSnitch/);
|
||||||
|
// Unauthenticated users are redirected to login
|
||||||
|
await expect(page).toHaveURL(/\/login/);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user