Files
metabuilder/frontends/pastebin/tests/e2e/inspect-btn.json
2026-03-09 22:30:41 +00:00

34 lines
1.5 KiB
JSON

{
"$schema": "../../../schemas/package-schemas/playwright.schema.json",
"package": "pastebin",
"version": "1.0.0",
"description": "Button inspection tests for styling, cursor, and visibility",
"suite": "Button Inspection",
"tests": [
{
"name": "create button has correct styling",
"steps": [
{ "action": "navigate", "url": "" },
{ "action": "waitForSelector", "selector": "[data-testid='snippet-create-menu-trigger'],[data-testid='empty-state-create-menu']", "timeout": 10000 },
{ "action": "evalExpect", "name": "getComputedStyle", "args": { "selector": "[data-testid='snippet-create-menu-trigger'],[data-testid='empty-state-create-menu']", "property": "cursor" }, "assertion": { "matcher": "toBeTruthy" } }
]
},
{
"name": "buttons have pointer cursor",
"steps": [
{ "action": "navigate", "url": "" },
{ "action": "waitForSelector", "selector": "[data-testid='navigation-toggle-btn']", "timeout": 10000 },
{ "action": "evalExpect", "name": "getComputedStyle", "args": { "selector": "[data-testid='navigation-toggle-btn']", "property": "cursor" }, "assertion": { "matcher": "toBeTruthy" } }
]
},
{
"name": "action buttons are visible",
"steps": [
{ "action": "navigate", "url": "" },
{ "action": "waitForLoadState", "state": "domcontentloaded" },
{ "action": "expect", "selector": "button", "nth": 0, "assertion": { "matcher": "toBeVisible" } }
]
}
]
}