Files
metabuilder/frontends/workflowui/playwright/auth.json
johndoe6345789 f646cfe9c0 fix(e2e): fix workflowui playwright test URLs and login style
auth.json:
- Change absolute URLs (/login, /register) to relative (login, register)
  so Playwright resolves them against baseURL /workflowui/ correctly
- Add switch-to-material click before auth-layout assertions, since
  login page defaults to Salesforce style

templates.json:
- Change absolute URLs (/templates, /templates/1) to relative
- Add waitForLoadState before category filter click

Root cause: basePath='/workflowui' + absolute URL '/login' resolves
to http://localhost:3000/login (404), not /workflowui/login

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 14:00:12 +00:00

248 lines
6.5 KiB
JSON

{
"$schema": "https://metabuilder.dev/schemas/package-playwright.schema.json",
"package": "workflowui-auth",
"description": "E2E tests for authentication pages migrated to FakeMUI",
"tests": [
{
"name": "login page displays correctly",
"tags": ["@migration", "@auth", "@login"],
"steps": [
{
"action": "navigate",
"url": "login"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Switch to Material Design style",
"action": "click",
"testId": "switch-to-material"
},
{
"description": "Verify auth layout visible",
"action": "expect",
"selector": "[data-testid='auth-layout']",
"assertion": {
"matcher": "toBeVisible"
}
},
{
"description": "Verify email input visible",
"action": "expect",
"selector": "[data-testid='email-input']",
"assertion": {
"matcher": "toBeVisible"
}
},
{
"description": "Verify password input visible",
"action": "expect",
"selector": "[data-testid='password-input']",
"assertion": {
"matcher": "toBeVisible"
}
},
{
"description": "Verify login button visible",
"action": "expect",
"selector": "[data-testid='login-button']",
"assertion": {
"matcher": "toBeVisible"
}
}
]
},
{
"name": "register page displays password strength indicator",
"tags": ["@migration", "@auth", "@register"],
"steps": [
{
"action": "navigate",
"url": "register"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Fill password field",
"action": "fill",
"selector": "[data-testid='password-input']",
"value": "Weak1"
},
{
"description": "Verify password strength indicator visible",
"action": "expect",
"selector": "[data-testid='password-strength-indicator']",
"assertion": {
"matcher": "toBeVisible"
}
},
{
"description": "Verify strength message visible",
"action": "expect",
"selector": "[data-testid='password-strength-message']",
"assertion": {
"matcher": "toBeVisible"
}
},
{
"description": "Verify hint text visible",
"action": "expect",
"selector": "[data-testid='password-strength-hint']",
"assertion": {
"matcher": "toBeVisible"
}
}
]
},
{
"name": "can fill and submit login form",
"tags": ["@migration", "@forms", "@auth"],
"steps": [
{
"action": "navigate",
"url": "login"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Switch to Material Design style",
"action": "click",
"testId": "switch-to-material"
},
{
"action": "fill",
"selector": "[data-testid='email-input']",
"value": "test@example.com"
},
{
"action": "fill",
"selector": "[data-testid='password-input']",
"value": "password123"
},
{
"action": "click",
"selector": "[data-testid='login-button']"
},
{
"action": "waitForLoadState",
"state": "networkidle"
}
]
},
{
"name": "register page footer link navigates to login",
"tags": ["@migration", "@navigation", "@auth"],
"steps": [
{
"action": "navigate",
"url": "register"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Click footer link to login",
"action": "click",
"selector": "[data-testid='auth-footer-link']"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Verify navigated to login page",
"action": "expect",
"selector": "text=Sign in to your account",
"assertion": {
"matcher": "toBeVisible"
}
}
]
},
{
"name": "404 page displays fail whale",
"tags": ["@migration", "@error"],
"steps": [
{
"action": "navigate",
"url": "nonexistent-page-12345"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Verify 404 state visible",
"action": "expect",
"selector": "[data-testid='not-found-state']",
"assertion": {
"matcher": "toBeVisible"
}
},
{
"description": "Verify fail whale illustration",
"action": "expect",
"selector": "[data-testid='fail-whale-illustration']",
"assertion": {
"matcher": "toBeVisible"
}
},
{
"description": "Verify error code displayed",
"action": "expect",
"selector": "[data-testid='error-code']",
"assertion": {
"matcher": "toHaveText",
"expected": "404"
}
},
{
"description": "Verify primary action button",
"action": "expect",
"selector": "[data-testid='primary-action']",
"assertion": {
"matcher": "toBeVisible"
}
}
]
},
{
"name": "header actions display correctly",
"tags": ["@migration", "@header"],
"steps": [
{
"action": "navigate",
"url": ""
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Verify header actions visible",
"action": "expect",
"selector": "[data-testid='header-actions']",
"assertion": {
"matcher": "toBeVisible"
}
},
{
"description": "Verify theme toggle button",
"action": "expect",
"selector": "[data-testid='toggle-theme-button']",
"assertion": {
"matcher": "toBeVisible"
}
}
]
}
]
}