-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: ADDON-59948 Added test cases for Multi-level menu (#657)
* ci: update agreements CLA to 1.3 (#650) * test: ADDON-59948 Added test cases for multilevel menu * test: simplify test samples --------- Co-authored-by: Artem Rys <rysartem@gmail.com>
- Loading branch information
1 parent
c1c4e49
commit b86426f
Showing
5 changed files
with
673 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
204 changes: 204 additions & 0 deletions
204
tests/unit/testdata/invalid_config_inputs_multilevel_menu_duplicate_groups.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
{ | ||
"pages": { | ||
"configuration": { | ||
"tabs": [ | ||
{ | ||
"name": "logging", | ||
"entity": [ | ||
{ | ||
"type": "singleSelect", | ||
"label": "Log level", | ||
"options": { | ||
"disableSearch": true, | ||
"autoCompleteFields": [ | ||
{ | ||
"value": "DEBUG", | ||
"label": "DEBUG" | ||
}, | ||
{ | ||
"value": "INFO", | ||
"label": "INFO" | ||
}, | ||
{ | ||
"value": "WARNING", | ||
"label": "WARNING" | ||
}, | ||
{ | ||
"value": "ERROR", | ||
"label": "ERROR" | ||
}, | ||
{ | ||
"value": "CRITICAL", | ||
"label": "CRITICAL" | ||
} | ||
] | ||
}, | ||
"defaultValue": "INFO", | ||
"field": "loglevel" | ||
} | ||
], | ||
"title": "Logging" | ||
} | ||
], | ||
"title": "Configuration", | ||
"description": "Set up your add-on" | ||
}, | ||
"inputs": { | ||
"services": [ | ||
{ | ||
"hook": { | ||
"src": "Hook" | ||
}, | ||
"name": "example_input_one", | ||
"entity": [ | ||
{ | ||
"type": "text", | ||
"label": "Name", | ||
"validators": [ | ||
{ | ||
"type": "regex", | ||
"errorMsg": "Input Name must begin with a letter and consist exclusively of alphanumeric characters and underscores.", | ||
"pattern": "^[a-zA-Z]\\w*$" | ||
}, | ||
{ | ||
"type": "string", | ||
"errorMsg": "Length of input name should be between 1 and 100", | ||
"minLength": 1, | ||
"maxLength": 100 | ||
} | ||
], | ||
"field": "name", | ||
"help": "A unique name for the data input.", | ||
"required": true | ||
} | ||
], | ||
"title": "Example Input One" | ||
}, | ||
{ | ||
"name": "example_input_two", | ||
"entity": [ | ||
{ | ||
"type": "text", | ||
"label": "Name", | ||
"validators": [ | ||
{ | ||
"type": "regex", | ||
"errorMsg": "Input Name must begin with a letter and consist exclusively of alphanumeric characters and underscores.", | ||
"pattern": "^[a-zA-Z]\\w*$" | ||
}, | ||
{ | ||
"type": "string", | ||
"errorMsg": "Length of input name should be between 1 and 100", | ||
"minLength": 1, | ||
"maxLength": 100 | ||
} | ||
], | ||
"field": "name", | ||
"help": "A unique name for the data input.", | ||
"required": true | ||
} | ||
], | ||
"title": "Example Input Two" | ||
} | ||
], | ||
"title": "Inputs", | ||
"description": "Manage your data inputs", | ||
"table": { | ||
"actions": [ | ||
"edit", | ||
"enable", | ||
"delete", | ||
"clone" | ||
], | ||
"header": [ | ||
{ | ||
"label": "Name", | ||
"field": "name" | ||
}, | ||
{ | ||
"label": "Account Name", | ||
"field": "account" | ||
}, | ||
{ | ||
"label": "Interval", | ||
"field": "interval" | ||
}, | ||
{ | ||
"label": "Index", | ||
"field": "index" | ||
}, | ||
{ | ||
"label": "Status", | ||
"field": "disabled" | ||
} | ||
], | ||
"moreInfo": [ | ||
{ | ||
"label": "Name", | ||
"field": "name" | ||
}, | ||
{ | ||
"label": "Interval", | ||
"field": "interval" | ||
}, | ||
{ | ||
"label": "Index", | ||
"field": "index" | ||
}, | ||
{ | ||
"label": "Status", | ||
"field": "disabled", | ||
"mapping": { | ||
"true": "Disabled", | ||
"false": "Enabled" | ||
} | ||
}, | ||
{ | ||
"label": "Example Account", | ||
"field": "account" | ||
}, | ||
{ | ||
"label": "Object", | ||
"field": "object" | ||
}, | ||
{ | ||
"label": "Object Fields", | ||
"field": "object_fields" | ||
}, | ||
{ | ||
"label": "Order By", | ||
"field": "order_by" | ||
}, | ||
{ | ||
"label": "Query Start Date", | ||
"field": "start_date" | ||
}, | ||
{ | ||
"label": "Limit", | ||
"field": "limit" | ||
} | ||
] | ||
}, | ||
"groupsMenu": [ | ||
{ | ||
"groupName": "group_one", | ||
"groupTitle": "Group One", | ||
"groupServices": ["example_input_one", "example_input_two"] | ||
}, | ||
{ | ||
"groupName": "group_one", | ||
"groupTitle": "Group One", | ||
"groupServices": ["example_input_one", "example_input_two"] | ||
} | ||
] | ||
|
||
} | ||
}, | ||
"meta": { | ||
"apiVersion": "3.2.0", | ||
"name": "Splunk_TA_UCCExample", | ||
"restRoot": "splunk_ta_uccexample", | ||
"version": "1.0.0", | ||
"displayName": "Splunk UCC test Add-on" | ||
} | ||
} |
Oops, something went wrong.