mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-02 09:45:00 +00:00
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>
191 lines
4.9 KiB
JSON
191 lines
4.9 KiB
JSON
{
|
|
"$schema": "https://metabuilder.dev/schemas/package-playwright.schema.json",
|
|
"package": "workflowui-templates",
|
|
"version": "1.0.0",
|
|
"description": "E2E tests for templates pages after FakeMUI migration",
|
|
"tests": [
|
|
{
|
|
"name": "should display templates listing page",
|
|
"tags": ["@migration", "@templates"],
|
|
"steps": [
|
|
{
|
|
"action": "navigate",
|
|
"url": "templates"
|
|
},
|
|
{
|
|
"action": "waitForLoadState",
|
|
"state": "networkidle"
|
|
},
|
|
{
|
|
"description": "Verify page header visible",
|
|
"action": "expect",
|
|
"selector": "text=Project Templates",
|
|
"assertion": {
|
|
"matcher": "toBeVisible"
|
|
}
|
|
},
|
|
{
|
|
"description": "Verify search box visible",
|
|
"action": "expect",
|
|
"selector": "[data-testid='template-search']",
|
|
"assertion": {
|
|
"matcher": "toBeVisible"
|
|
}
|
|
},
|
|
{
|
|
"description": "Verify template cards rendered",
|
|
"action": "expect",
|
|
"selector": "[data-testid^='template-card-']",
|
|
"assertion": {
|
|
"matcher": "toBeVisible"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "should filter templates by category",
|
|
"tags": ["@migration", "@templates", "@filters"],
|
|
"steps": [
|
|
{
|
|
"action": "navigate",
|
|
"url": "templates"
|
|
},
|
|
{
|
|
"action": "waitForLoadState",
|
|
"state": "networkidle"
|
|
},
|
|
{
|
|
"action": "click",
|
|
"selector": "[data-testid='template-category-automation']"
|
|
},
|
|
{
|
|
"action": "waitForLoadState",
|
|
"state": "networkidle"
|
|
},
|
|
{
|
|
"description": "Verify filtered results",
|
|
"action": "expect",
|
|
"selector": "text=Showing",
|
|
"assertion": {
|
|
"matcher": "toBeVisible"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "should switch between grid and list view",
|
|
"tags": ["@migration", "@templates", "@view-modes"],
|
|
"steps": [
|
|
{
|
|
"action": "navigate",
|
|
"url": "templates"
|
|
},
|
|
{
|
|
"action": "waitForLoadState",
|
|
"state": "networkidle"
|
|
},
|
|
{
|
|
"action": "click",
|
|
"selector": "[data-testid='template-list-view']"
|
|
},
|
|
{
|
|
"action": "waitForLoadState",
|
|
"state": "domcontentloaded"
|
|
},
|
|
{
|
|
"description": "Verify list items visible",
|
|
"action": "expect",
|
|
"selector": "[data-testid^='template-list-item-']",
|
|
"assertion": {
|
|
"matcher": "toBeVisible"
|
|
}
|
|
},
|
|
{
|
|
"action": "click",
|
|
"selector": "[data-testid='template-grid-view']"
|
|
},
|
|
{
|
|
"description": "Verify grid cards visible",
|
|
"action": "expect",
|
|
"selector": "[data-testid^='template-card-']",
|
|
"assertion": {
|
|
"matcher": "toBeVisible"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "should navigate to template detail page",
|
|
"tags": ["@migration", "@templates", "@navigation"],
|
|
"steps": [
|
|
{
|
|
"action": "navigate",
|
|
"url": "templates"
|
|
},
|
|
{
|
|
"action": "waitForLoadState",
|
|
"state": "networkidle"
|
|
},
|
|
{
|
|
"action": "click",
|
|
"selector": "[data-testid='template-card-1'] >> text=View Template"
|
|
},
|
|
{
|
|
"action": "waitForLoadState",
|
|
"state": "networkidle"
|
|
},
|
|
{
|
|
"description": "Verify on detail page",
|
|
"action": "expect",
|
|
"selector": "text=Overview",
|
|
"assertion": {
|
|
"matcher": "toBeVisible"
|
|
}
|
|
},
|
|
{
|
|
"description": "Verify template header visible",
|
|
"action": "expect",
|
|
"selector": "text=Included Workflows",
|
|
"assertion": {
|
|
"matcher": "toBeVisible"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "should open create project dialog",
|
|
"tags": ["@migration", "@templates", "@dialogs"],
|
|
"steps": [
|
|
{
|
|
"action": "navigate",
|
|
"url": "templates/1"
|
|
},
|
|
{
|
|
"action": "waitForLoadState",
|
|
"state": "networkidle"
|
|
},
|
|
{
|
|
"action": "click",
|
|
"selector": "text=Create Project from Template"
|
|
},
|
|
{
|
|
"description": "Verify dialog opens",
|
|
"action": "expect",
|
|
"selector": "text=Project Name",
|
|
"assertion": {
|
|
"matcher": "toBeVisible"
|
|
}
|
|
},
|
|
{
|
|
"description": "Verify workspace dropdown visible",
|
|
"action": "expect",
|
|
"selector": "text=Workspace",
|
|
"assertion": {
|
|
"matcher": "toBeVisible"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|