Files
metabuilder/packages/user_manager/playwright/tests.json
copilot-swe-agent[bot] d63df61958 refactor: scope tests to correct functional packages
- Moved auth tests: packages/auth → packages/ui_auth
- Moved CRUD tests: packages/crud → packages/user_manager
- Moved package tests: packages/package_tests → packages/package_manager
- Moved pagination tests: packages/pagination → packages/data_table
- Merged navigation tests into packages/ui_home (navigation belongs to home page)
- Removed standalone test packages (crud, auth, package_tests, navigation, pagination)
- Tests now properly belong to the functional packages they test
- Updated TEST_STORY_CONVERSION.md with final package mapping
- api_tests and smoke_tests remain as cross-cutting integration test packages

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-16 19:28:20 +00:00

636 lines
16 KiB
JSON

{
"$schema": "https://metabuilder.dev/schemas/package-playwright.schema.json",
"package": "crud",
"version": "1.0.0",
"description": "CRUD operations E2E tests - converted from e2e/crud.spec.ts, e2e/crud/user-management.spec.ts, and e2e/crud/complete-flow.spec.ts",
"tests": [
{
"name": "should have landing page with navigation options",
"tags": ["@crud", "@interface"],
"steps": [
{
"description": "Navigate to home page",
"action": "navigate",
"url": "/"
},
{
"description": "Wait for page to load",
"action": "waitForLoadState",
"state": "domcontentloaded"
},
{
"description": "Verify sign in button is visible",
"action": "expect",
"role": "button",
"text": "sign in",
"assertion": {
"matcher": "toBeVisible"
}
}
]
},
{
"name": "should navigate to login when clicking sign in",
"tags": ["@crud", "@navigation"],
"steps": [
{
"action": "navigate",
"url": "/"
},
{
"description": "Click sign in button",
"action": "click",
"role": "button",
"text": "sign in"
},
{
"description": "Verify username field appears",
"action": "expect",
"label": "username",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should have descriptive content on landing page",
"tags": ["@crud", "@content"],
"steps": [
{
"action": "navigate",
"url": "/"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Check body has content",
"action": "expect",
"selector": "body",
"assertion": {
"matcher": "toBeVisible"
}
}
]
},
{
"name": "should have username and password fields in login",
"tags": ["@crud", "@login"],
"steps": [
{
"action": "navigate",
"url": "/"
},
{
"action": "click",
"role": "button",
"text": "sign in"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Check for username field",
"action": "expect",
"label": "username",
"assertion": {
"matcher": "toBeVisible"
}
},
{
"description": "Check for password field",
"action": "expect",
"label": "password",
"assertion": {
"matcher": "toBeVisible"
}
}
]
},
{
"name": "should have submit button on login form",
"tags": ["@crud", "@login"],
"steps": [
{
"action": "navigate",
"url": "/"
},
{
"action": "click",
"role": "button",
"text": "sign in"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Check for login button",
"action": "expect",
"role": "button",
"text": "login",
"assertion": {
"matcher": "toBeVisible"
}
}
]
},
{
"name": "should display entity list",
"tags": ["@crud", "@list", "@flow"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Check if list view is visible",
"action": "expect",
"role": "heading",
"text": "list",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
},
{
"description": "Check if table or list container exists",
"action": "expect",
"selector": "table, [role=\"table\"], .entity-list",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should have create button in entity list",
"tags": ["@crud", "@list"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Check for create/new button",
"action": "expect",
"role": "button",
"text": "create",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should navigate to create form",
"tags": ["@crud", "@create"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Click create button",
"action": "click",
"role": "button",
"text": "create"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Should see create form",
"action": "expect",
"role": "heading",
"text": "create",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should show form fields in create form",
"tags": ["@crud", "@create"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/create"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Should have at least one input field",
"action": "expect",
"selector": "input, textarea, select",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should have submit button in create form",
"tags": ["@crud", "@create"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/create"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Should have submit/save/create button",
"action": "expect",
"role": "button",
"text": "submit",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should show validation errors for empty required fields",
"tags": ["@crud", "@create", "@validation"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/create"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Try to submit without filling required fields",
"action": "click",
"role": "button",
"text": "submit"
},
{
"description": "Should show validation error",
"action": "expect",
"text": "required",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should display entity details",
"tags": ["@crud", "@read"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/test-user-123"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Should show detail view",
"action": "expect",
"role": "heading",
"text": "detail",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should have edit button in detail view",
"tags": ["@crud", "@update"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/test-user-123"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Should have edit button",
"action": "expect",
"role": "button",
"text": "edit",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should have delete button in detail view",
"tags": ["@crud", "@delete"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/test-user-123"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Should have delete button",
"action": "expect",
"role": "button",
"text": "delete",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should show 404 for non-existent entity",
"tags": ["@crud", "@error-handling"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/non-existent-id-999"
},
{
"action": "waitForLoadState",
"state": "domcontentloaded"
},
{
"description": "Should show 404 or not found message",
"action": "expect",
"text": "not found",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should navigate to edit form",
"tags": ["@crud", "@update"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/test-user-123"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Click edit button",
"action": "click",
"role": "button",
"text": "edit"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Should see edit form",
"action": "expect",
"role": "heading",
"text": "edit",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should show pre-filled form fields in edit form",
"tags": ["@crud", "@update"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/test-user-123/edit"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Form fields should have values",
"action": "expect",
"selector": "input[type=\"text\"], input[type=\"email\"]",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should have update button in edit form",
"tags": ["@crud", "@update"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/test-user-123/edit"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Should have update/save button",
"action": "expect",
"role": "button",
"text": "update",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should show confirmation before delete",
"tags": ["@crud", "@delete"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/test-user-123"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Click delete button",
"action": "click",
"role": "button",
"text": "delete"
},
{
"description": "Should show confirmation dialog",
"action": "expect",
"role": "button",
"text": "confirm",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should have cancel option in delete confirmation",
"tags": ["@crud", "@delete"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/test-user-123"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Click delete button",
"action": "click",
"role": "button",
"text": "delete"
},
{
"description": "Should have cancel button",
"action": "expect",
"role": "button",
"text": "cancel",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should show pagination controls when list is large",
"tags": ["@crud", "@pagination"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Look for pagination controls",
"action": "expect",
"selector": "[role=\"navigation\"], .pagination, nav",
"assertion": {
"matcher": "toBeVisible"
}
}
]
},
{
"name": "should have filter/search input",
"tags": ["@crud", "@filter"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Look for search or filter input",
"action": "expect",
"selector": "input[type=\"search\"], input[placeholder*=\"search\" i]",
"assertion": {
"matcher": "toBeVisible"
}
}
]
},
{
"name": "should restrict access based on user level",
"tags": ["@crud", "@permissions"],
"steps": [
{
"action": "navigate",
"url": "/default/admin/system_config"
},
{
"action": "waitForLoadState",
"state": "domcontentloaded"
},
{
"description": "Should see access denied or redirect to login",
"action": "expect",
"text": "access denied",
"assertion": {
"matcher": "toBeVisible",
"timeout": 5000
}
}
]
},
{
"name": "should show breadcrumb trail on detail pages",
"tags": ["@crud", "@navigation"],
"steps": [
{
"action": "navigate",
"url": "/default/dashboard/users/test-user-123"
},
{
"action": "waitForLoadState",
"state": "networkidle"
},
{
"description": "Look for breadcrumb",
"action": "expect",
"selector": "nav[aria-label*=\"breadcrumb\" i], .breadcrumb, [role=\"navigation\"]",
"assertion": {
"matcher": "toBeVisible"
}
}
]
}
]
}