Skip to content

Commit bce9053

Browse files
Merge pull request #4081 from aakashreddy-p/aakash/fix/nocode-path-validation-issue
Fix: path issue for false values SPRW-3040.
2 parents 1fe0022 + ba9752c commit bce9053

File tree

2 files changed

+6
-6
lines changed
  • packages/@sparrow-workspaces/src/features
    • rest-explorer/components/request-tests/sub-components/no-code
    • testflow-explorer/components/request-tests/sub-components/no-code

2 files changed

+6
-6
lines changed

packages/@sparrow-workspaces/src/features/rest-explorer/components/request-tests/sub-components/no-code/NoCode.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
typeof value === "boolean"
4040
) {
4141
return value;
42-
} else return "";
42+
} else return undefined;
4343
} catch (e) {
44-
return "";
44+
return undefined;
4545
}
4646
};
4747
@@ -638,7 +638,7 @@
638638
yet.
639639
</span>
640640
</div>
641-
{:else if getJsonPathValue(test.testPath, responseBody)}
641+
{:else if getJsonPathValue(test.testPath, responseBody) || getJsonPathValue(test.testPath, responseBody) === 0 || getJsonPathValue(test.testPath, responseBody) === -0 || getJsonPathValue(test.testPath, responseBody) === ""}
642642
<div
643643
class="text-fs-12 d-flex mt-1 ellipsis text-muted"
644644
>

packages/@sparrow-workspaces/src/features/testflow-explorer/components/request-tests/sub-components/no-code/NoCode.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
typeof value === "boolean"
6161
) {
6262
return value;
63-
} else return "";
63+
} else return undefined;
6464
} catch (e) {
65-
return "";
65+
return undefined;
6666
}
6767
};
6868
@@ -853,7 +853,7 @@
853853
yet.
854854
</span>
855855
</div>
856-
{:else if getJsonPathValue(test.testPath, responseBody)}
856+
{:else if getJsonPathValue(test.testPath, responseBody) || getJsonPathValue(test.testPath, responseBody) === 0 || getJsonPathValue(test.testPath, responseBody) === -0 || getJsonPathValue(test.testPath, responseBody) === ""}
857857
<div
858858
class="text-fs-12 d-flex mt-1 ellipsis text-muted"
859859
>

0 commit comments

Comments
 (0)