mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-01-25 02:08:11 +00:00
chore(ui): upgrade zod v4, zustand v5, and ai sdk v5 (#8801)
This commit is contained in:
@@ -48,7 +48,10 @@ test.describe("Login Flow", () => {
|
||||
test("should handle empty form submission", async ({ page }) => {
|
||||
// Submit empty form
|
||||
await submitLoginForm(page);
|
||||
|
||||
// Should show both email and password validation errors
|
||||
await verifyLoginError(page, ERROR_MESSAGES.INVALID_EMAIL);
|
||||
await verifyLoginError(page, ERROR_MESSAGES.PASSWORD_REQUIRED);
|
||||
|
||||
// Verify we're still on login page
|
||||
await expect(page).toHaveURL(URLS.LOGIN);
|
||||
@@ -63,6 +66,18 @@ test.describe("Login Flow", () => {
|
||||
await expect(page).toHaveURL(URLS.LOGIN);
|
||||
});
|
||||
|
||||
test("should require password when email is filled", async ({ page }) => {
|
||||
// Fill only email, leave password empty
|
||||
await page.getByLabel("Email").fill(TEST_CREDENTIALS.VALID.email);
|
||||
await submitLoginForm(page);
|
||||
|
||||
// Should show password required error
|
||||
await verifyLoginError(page, ERROR_MESSAGES.PASSWORD_REQUIRED);
|
||||
|
||||
// Verify we're still on login page
|
||||
await expect(page).toHaveURL(URLS.LOGIN);
|
||||
});
|
||||
|
||||
test("should toggle SAML SSO mode", async ({ page }) => {
|
||||
// Toggle to SAML mode
|
||||
await toggleSamlMode(page);
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Page, expect } from "@playwright/test";
|
||||
export const ERROR_MESSAGES = {
|
||||
INVALID_CREDENTIALS: "Invalid email or password",
|
||||
INVALID_EMAIL: "Please enter a valid email address.",
|
||||
PASSWORD_REQUIRED: "Password is required.",
|
||||
} as const;
|
||||
|
||||
export const URLS = {
|
||||
|
||||
Reference in New Issue
Block a user