Refactor evaluator functions in JSON examples to use URL pattern matching. Update expected URL formats to regex patterns for better validation in chrome evaluation examples.
This commit is contained in:
@@ -44,37 +44,35 @@
|
||||
],
|
||||
"evaluator": {
|
||||
"func": [
|
||||
"exact_match",
|
||||
"exact_match"
|
||||
"is_expected_url_pattern_match",
|
||||
"is_expected_url_pattern_match"
|
||||
],
|
||||
"conj": "or",
|
||||
"result": [
|
||||
{
|
||||
"type": "url_dashPart",
|
||||
"goto_prefix": "https://www.",
|
||||
"partIndex": -1,
|
||||
"needDeleteId": false,
|
||||
"returnType": "string"
|
||||
"type": "active_url_from_accessTree",
|
||||
"goto_prefix": "https://www."
|
||||
},
|
||||
{
|
||||
"type": "url_dashPart",
|
||||
"goto_prefix": "https://www.",
|
||||
"partIndex": -1,
|
||||
"needDeleteId": false,
|
||||
"returnType": "string"
|
||||
"type": "active_url_from_accessTree",
|
||||
"goto_prefix": "https://www."
|
||||
}
|
||||
],
|
||||
"expected": [
|
||||
{
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expected": "tamiflu.html#side-effects"
|
||||
"expected": [
|
||||
"^https://(www\\.)?drugs\\.com/tamiflu\\.html#side-effects"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"expected": "tamiflu-side-effects.html"
|
||||
"expected": [
|
||||
"^https://(www\\.)?drugs\\.com/sfx/tamiflu-side-effects\\.html"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user