123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- [
- {
- "desc": "FreeText with wildcard shall be invalid if disallowWildcard is true",
- "query": "freeTextWith*",
- "additionalConfig": {
- "disallowWildcard": true
- },
- "result": [
- {
- "type": "spaces",
- "value": ""
- },
- {
- "type": "freeText",
- "value": "freeTextWith*",
- "quoted": false,
- "invalid": {
- "type": "wildcard-not-allowed",
- "reason": "Wildcards not supported in search"
- }
- },
- {
- "type": "spaces",
- "value": ""
- }
- ]
- },
- {
- "desc": "List value with wildcard shall be invalid if disallowWildcard is true",
- "query": "release:[*]",
- "additionalConfig": {
- "disallowWildcard": true
- },
- "result": [
- {
- "type": "spaces",
- "value": ""
- },
- {
- "type": "filter",
- "filter": "textIn",
- "invalid": {
- "type": "wildcard-not-allowed",
- "reason": "Wildcards not supported in search"
- },
- "key": {
- "type": "keySimple",
- "value": "release",
- "quoted": false
- },
- "operator": "",
- "negated": false,
- "value": {
- "items": [
- {
- "separator": "",
- "value": {
- "quoted": false,
- "type": "valueText",
- "value": "*"
- }
- }
- ],
- "type": "valueTextList"
- }
- },
- {
- "type": "spaces",
- "value": ""
- }
- ]
- },
- {
- "desc": "Value shall be invalid if disallowWildcard is true",
- "query": "release:*",
- "additionalConfig": {
- "disallowWildcard": true
- },
- "result": [
- {
- "type": "spaces",
- "value": ""
- },
- {
- "type": "filter",
- "filter": "text",
- "negated": false,
- "key": {
- "type": "keySimple",
- "value": "release",
- "quoted": false
- },
- "operator": "",
- "value": {
- "type": "valueText",
- "value": "*",
- "quoted": false
- },
- "invalid": {
- "type": "wildcard-not-allowed",
- "reason": "Wildcards not supported in search"
- }
- },
- {
- "type": "spaces",
- "value": ""
- }
- ]
- },
- {
- "desc": "Key shall be invalid if not in supportedTags",
- "query": "release*:1",
- "additionalConfig": {
- "disallowWildcard": true,
- "supportedTags": {
- "release": {
- "key": "release",
- "kind": "field"
- }
- }
- },
- "result": [
- {
- "type": "spaces",
- "value": ""
- },
- {
- "type": "freeText",
- "value": "release*:1",
- "quoted": false,
- "invalid": {
- "type": "wildcard-not-allowed",
- "reason": "Wildcards not supported in search"
- }
- },
- {
- "type": "spaces",
- "value": ""
- }
- ]
- },
- {
- "desc": "If disallowWildcard is true and a custom reason is provided, it shall be shown",
- "query": "rele*ase",
- "additionalConfig": {
- "disallowWildcard": true,
- "invalidMessages": {
- "wildcard-not-allowed": "Release queries don't support wildcards"
- }
- },
- "result": [
- {
- "type": "spaces",
- "value": ""
- },
- {
- "type": "freeText",
- "value": "rele*ase",
- "quoted": false,
- "invalid": {
- "type": "wildcard-not-allowed",
- "reason": "Release queries don't support wildcards"
- }
- },
- {
- "type": "spaces",
- "value": ""
- }
- ]
- },
- {
- "desc": "If disallowWildcard is true and a custom reason is provided, it shall be shown",
- "query": "rele*ase",
- "additionalConfig": {
- "disallowWildcard": true,
- "invalidMessages": {
- "wildcard-not-allowed": "Release queries don't support wildcards"
- }
- },
- "result": [
- {"type": "spaces", "value": ""},
- {
- "type": "freeText",
- "value": "rele*ase",
- "quoted": false,
- "invalid": {
- "type": "wildcard-not-allowed",
- "reason": "Release queries don't support wildcards"
- }
- },
- {"type": "spaces", "value": ""}
- ]
- }
- ]
|