mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 14:25:02 +00:00
getByLabel('Workspace') fails because FakeMUI Select renders a custom
div-based dropdown without a real <input id>, so Playwright cannot resolve
the label→control association. Use :text-is('Workspace') to match the
FormLabel element directly with exact text, avoiding substring match on
the breadcrumb 'Workspaces' link.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
195 lines
5.0 KiB
JSON
195 lines
5.0 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": "toHaveCount",
|
|
"count": 8
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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": "toHaveCount",
|
|
"count": 8
|
|
}
|
|
},
|
|
{
|
|
"action": "click",
|
|
"selector": "[data-testid='template-grid-view']"
|
|
},
|
|
{
|
|
"description": "Verify grid cards visible",
|
|
"action": "expect",
|
|
"selector": "[data-testid^='template-card-']",
|
|
"assertion": {
|
|
"matcher": "toHaveCount",
|
|
"count": 8
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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-email-automation'] >> text=View Template"
|
|
},
|
|
{
|
|
"action": "waitForLoadState",
|
|
"state": "networkidle"
|
|
},
|
|
{
|
|
"description": "Verify on detail page",
|
|
"action": "expect",
|
|
"role": "tab",
|
|
"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/email-automation"
|
|
},
|
|
{
|
|
"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-is('Workspace')",
|
|
"assertion": {
|
|
"matcher": "toBeVisible"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|