mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-26 14:54:55 +00:00
schema: Enhance tests_schema.json for component and DOM testing
- Add DOM assertion types (toBeVisible, toBeInTheDocument, toHaveTextContent, toHaveAttribute, toHaveClass, toBeDisabled, toBeEnabled, toHaveValue) - Add DOM query properties (selector, role, text) - Extend act phase with render, click, fill, select, hover, focus, blur, waitFor actions - Support component rendering with props and DOM interactions
This commit is contained in:
@@ -305,15 +305,35 @@
|
|||||||
"function_call",
|
"function_call",
|
||||||
"api_request",
|
"api_request",
|
||||||
"event_trigger",
|
"event_trigger",
|
||||||
|
"render",
|
||||||
|
"click",
|
||||||
|
"fill",
|
||||||
|
"select",
|
||||||
|
"hover",
|
||||||
|
"focus",
|
||||||
|
"blur",
|
||||||
|
"waitFor",
|
||||||
"custom"
|
"custom"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"target": {
|
"target": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Function/endpoint/event to test"
|
"description": "Function/endpoint/event/component/selector to test"
|
||||||
|
},
|
||||||
|
"selector": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "CSS selector for DOM interaction"
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "ARIA role for query (e.g., 'button', 'link')"
|
||||||
|
},
|
||||||
|
"text": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Text content for interaction or button label"
|
||||||
},
|
},
|
||||||
"input": {
|
"input": {
|
||||||
"description": "Input data/parameters"
|
"description": "Input data/parameters/value to enter"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -445,6 +465,14 @@
|
|||||||
"instanceOf",
|
"instanceOf",
|
||||||
"hasProperty",
|
"hasProperty",
|
||||||
"hasLength",
|
"hasLength",
|
||||||
|
"toBeVisible",
|
||||||
|
"toBeInTheDocument",
|
||||||
|
"toHaveTextContent",
|
||||||
|
"toHaveAttribute",
|
||||||
|
"toHaveClass",
|
||||||
|
"toBeDisabled",
|
||||||
|
"toBeEnabled",
|
||||||
|
"toHaveValue",
|
||||||
"custom"
|
"custom"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -458,6 +486,18 @@
|
|||||||
"expected": {
|
"expected": {
|
||||||
"description": "Expected value"
|
"description": "Expected value"
|
||||||
},
|
},
|
||||||
|
"selector": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "CSS selector for DOM query (alternative to actual)"
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "ARIA role for query (e.g., 'button', 'link')"
|
||||||
|
},
|
||||||
|
"text": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Text content matcher"
|
||||||
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Custom assertion failure message"
|
"description": "Custom assertion failure message"
|
||||||
|
|||||||
Reference in New Issue
Block a user