Skip to content

Commit

Permalink
Extend Element definition to assertVisible/assertNotVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
Fishbowler committed Feb 19, 2025
1 parent 088f6c4 commit b635df8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 101 deletions.
116 changes: 15 additions & 101 deletions schema/schema.v0.json
Original file line number Diff line number Diff line change
Expand Up @@ -664,60 +664,17 @@
],
"properties": {
"assertNotVisible": {
"oneOf": [
"description": "Assert that an element is not visible through an element selector",
"$ref": "#/$defs/Element",
"examples": [
"Loading Spinner",
{
"type": "string",
"description": "Assert that an element is not visible through text",
"minLength": 1
"text": "Error Message",
"checked": false
},
{
"description": "Assert that an element is not visible through an element selector",
"type": "object",
"additionalProperties": false,
"properties": {
"text": {
"type": "string"
},
"id": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"checked": {
"type": "boolean"
},
"focused": {
"type": "boolean"
},
"selected": {
"type": "boolean"
},
"index": {
"type": "integer"
},
"label": {
"title": "assertNotVisible.label",
"type": "string",
"description": "Description of the action to be performed."
},
"optional": {
"title": "assertNotVisible.optional",
"type": "boolean",
"description": "Indicates if the action is optional."
}
},
"examples": [
"Loading Spinner",
{
"text": "Error Message",
"checked": false
},
{
"id": "progress_bar",
"enabled": false
}
]
"id": "progress_bar",
"enabled": false
}
]
}
Expand Down Expand Up @@ -788,57 +745,14 @@
],
"properties": {
"assertVisible": {
"oneOf": [
{
"type": "string",
"description": "Assert that an element is visible through text",
"minLength": 1
},
"description": "Assert that an element is visible through an element selector",
"$ref": "#/$defs/Element",
"examples": [
"Login Button",
{
"description": "Assert that an element is visible through an element selector",
"type": "object",
"additionalProperties": false,
"properties": {
"text": {
"type": "string"
},
"id": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"checked": {
"type": "boolean"
},
"focused": {
"type": "boolean"
},
"selected": {
"type": "boolean"
},
"index": {
"type": "integer"
},
"label": {
"title": "assertVisible.label",
"type": "string",
"description": "Description of the action to be performed."
},
"optional": {
"title": "assertVisible.optional",
"type": "boolean",
"description": "Indicates if the action is optional."
}
},
"examples": [
"Login Button",
{
"text": "Sign In",
"id": "sign_in_button",
"focused": true
}
]
"text": "Sign In",
"id": "sign_in_button",
"focused": true
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions tests/examples/extreme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ onFlowComplete:
- assertNotVisible:
text: 'Form Test'
enabled: false
below: 'Some Text'
above:
text: 'Other Text'

- assertTrue: ${"test" == "test"}
- assertTrue:
Expand All @@ -54,6 +57,7 @@ onFlowComplete:
- assertVisible: 'Login'
- assertVisible:
text: 'Form Test'
below: 'Some Text'

- assertWithAI: 'Login and password text fields are visible.'
- assertWithAI:
Expand Down

0 comments on commit b635df8

Please sign in to comment.