Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend Element definition to assertVisible/assertNotVisible #62

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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