From 7a2b32069eb1ec7cc2afc2001875fa3bd825d509 Mon Sep 17 00:00:00 2001 From: Bharath B Date: Sat, 18 Mar 2023 12:06:20 +0530 Subject: [PATCH 1/2] bugfix/assertion-result-issue fixed the issue related to assertions still displayed in Tests tab after deletion#121 --- packages/bruno-electron/src/ipc/network/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/bruno-electron/src/ipc/network/index.js b/packages/bruno-electron/src/ipc/network/index.js index 2b29c2d83..a9d0a2f77 100644 --- a/packages/bruno-electron/src/ipc/network/index.js +++ b/packages/bruno-electron/src/ipc/network/index.js @@ -169,7 +169,6 @@ const registerNetworkIpc = (mainWindow, watcher, lastOpenedCollections) => { // run assertions const assertions = get(request, 'assertions'); - if(assertions && assertions.length) { const assertRuntime = new AssertRuntime(); const results = assertRuntime.runAssertions(assertions, request, response, envVars, collectionVariables, collectionPath); @@ -178,7 +177,6 @@ const registerNetworkIpc = (mainWindow, watcher, lastOpenedCollections) => { itemUid: item.uid, collectionUid }); - } // run tests const testFile = get(item, 'request.tests'); From 2b174e1c6095b37dc3e3f179cc85c680ea551ab8 Mon Sep 17 00:00:00 2001 From: Bharath B Date: Sat, 18 Mar 2023 13:43:16 +0530 Subject: [PATCH 2/2] added the indentation --- packages/bruno-electron/src/ipc/network/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/bruno-electron/src/ipc/network/index.js b/packages/bruno-electron/src/ipc/network/index.js index a9d0a2f77..de3d2d3b0 100644 --- a/packages/bruno-electron/src/ipc/network/index.js +++ b/packages/bruno-electron/src/ipc/network/index.js @@ -169,14 +169,14 @@ const registerNetworkIpc = (mainWindow, watcher, lastOpenedCollections) => { // run assertions const assertions = get(request, 'assertions'); - const assertRuntime = new AssertRuntime(); - const results = assertRuntime.runAssertions(assertions, request, response, envVars, collectionVariables, collectionPath); + const assertRuntime = new AssertRuntime(); + const results = assertRuntime.runAssertions(assertions, request, response, envVars, collectionVariables, collectionPath); - mainWindow.webContents.send('main:assertion-results', { - results: results, - itemUid: item.uid, - collectionUid - }); + mainWindow.webContents.send('main:assertion-results', { + results: results, + itemUid: item.uid, + collectionUid + }); // run tests const testFile = get(item, 'request.tests');