Fix Playwright strict mode violations in template E2E tests

- template-card/list-item prefix selectors: use toHaveCount(8) instead of
  toBeVisible since the prefix selector matches all 8 template elements
- text=Overview: use role-based locator (tab) to disambiguate from heading
- text=Workspace: use label-based locator to disambiguate from nav link

https://claude.ai/code/session_01FjbPFPsxUAicLeX1HhnHaU
This commit is contained in:
Claude
2026-03-12 18:05:35 +00:00
parent 7326b3dad7
commit 965ea48b17

View File

@@ -37,7 +37,8 @@
"action": "expect",
"selector": "[data-testid^='template-card-']",
"assertion": {
"matcher": "toBeVisible"
"matcher": "toHaveCount",
"count": 8
}
}
]
@@ -97,7 +98,8 @@
"action": "expect",
"selector": "[data-testid^='template-list-item-']",
"assertion": {
"matcher": "toBeVisible"
"matcher": "toHaveCount",
"count": 8
}
},
{
@@ -109,7 +111,8 @@
"action": "expect",
"selector": "[data-testid^='template-card-']",
"assertion": {
"matcher": "toBeVisible"
"matcher": "toHaveCount",
"count": 8
}
}
]
@@ -137,7 +140,8 @@
{
"description": "Verify on detail page",
"action": "expect",
"selector": "text=Overview",
"role": "tab",
"text": "Overview",
"assertion": {
"matcher": "toBeVisible"
}
@@ -179,7 +183,7 @@
{
"description": "Verify workspace dropdown visible",
"action": "expect",
"selector": "text=Workspace",
"label": "Workspace",
"assertion": {
"matcher": "toBeVisible"
}