From 0831b610cfb186feb1d8623261591bd405dfbc3d Mon Sep 17 00:00:00 2001 From: Pooja Belaramani Date: Tue, 17 Dec 2024 21:19:34 +0530 Subject: [PATCH] fix: assertion clear value --- .../components/RequestPane/Assertions/AssertionRow/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/bruno-app/src/components/RequestPane/Assertions/AssertionRow/index.js b/packages/bruno-app/src/components/RequestPane/Assertions/AssertionRow/index.js index 953db9e8..8c9b2a83 100644 --- a/packages/bruno-app/src/components/RequestPane/Assertions/AssertionRow/index.js +++ b/packages/bruno-app/src/components/RequestPane/Assertions/AssertionRow/index.js @@ -166,7 +166,7 @@ const AssertionRow = ({ handleAssertionChange( { target: { - value: `${op} ${value}` + value: isUnaryOperator(op) ? op : `${op} ${value}` } }, assertion, @@ -182,7 +182,7 @@ const AssertionRow = ({ theme={storedTheme} readOnly={true} onSave={onSave} - onChange={(newValue) => + onChange={(newValue) => { handleAssertionChange( { target: { @@ -192,6 +192,7 @@ const AssertionRow = ({ assertion, 'value' ) + } } onRun={handleRun} collection={collection}