mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
fix(conformance): g4 skips an input that names no field
jq splits an empty string into no segments, so reading the last one off an action typed at coordinates threw and took the rest of the run's steps with it. Such a step names nothing to check; the gate now passes over it and keeps checking the ones that do.
This commit is contained in:
1 parent
faa1a33a68
commit
f4b9ff1468
1 file changed
+6
-3
@@ -174,10 +174,13 @@ gate_no_doubled_text() {
|
||||
local verdict
|
||||
verdict="$(jq -s -r --arg redacted "[redacted]" '
|
||||
# Map a selector like "testTag:LoginScreen > testTag:LoginEmail" to its
|
||||
# target field id: the token after the final ":" of the last segment.
|
||||
# target field id: the token after the final ":" of the last segment. An
|
||||
# action typed at coordinates carries no selector, and jq splits an empty
|
||||
# string into no segments at all, so the fallbacks keep such a step from
|
||||
# aborting the whole analysis.
|
||||
def target_field(selector):
|
||||
(selector | split(">") | last | gsub("^\\s+|\\s+$";"")) as $last
|
||||
| ($last | split(":") | last);
|
||||
((selector | split(">") | last // "") | gsub("^\\s+|\\s+$";"")) as $last
|
||||
| ($last | split(":") | last // "");
|
||||
|
||||
def self_doubled(value):
|
||||
(value | length) as $n
|
||||
|
||||
Reference in new issue
Block a user