diff --git a/packages/bruno-cli/src/runner/run-single-request.js b/packages/bruno-cli/src/runner/run-single-request.js index 088f3dde7..f4e36e03a 100644 --- a/packages/bruno-cli/src/runner/run-single-request.js +++ b/packages/bruno-cli/src/runner/run-single-request.js @@ -352,6 +352,10 @@ const runSingleRequest = async function ( scriptingConfig ); testResults = get(result, 'results', []); + + if (result?.nextRequestName !== undefined) { + nextRequestName = result.nextRequestName; + } } if (testResults?.length) { diff --git a/packages/bruno-electron/src/ipc/network/index.js b/packages/bruno-electron/src/ipc/network/index.js index 825614a0f..49144d479 100644 --- a/packages/bruno-electron/src/ipc/network/index.js +++ b/packages/bruno-electron/src/ipc/network/index.js @@ -1047,6 +1047,10 @@ const registerNetworkIpc = (mainWindow) => { scriptingConfig ); + if (testResults?.nextRequestName !== undefined) { + nextRequestName = testResults.nextRequestName; + } + mainWindow.webContents.send('main:run-folder-event', { type: 'test-results', testResults: testResults.results, diff --git a/packages/bruno-js/src/runtime/test-runtime.js b/packages/bruno-js/src/runtime/test-runtime.js index ddafd513a..cd6f378f0 100644 --- a/packages/bruno-js/src/runtime/test-runtime.js +++ b/packages/bruno-js/src/runtime/test-runtime.js @@ -76,7 +76,8 @@ class TestRuntime { request, envVariables, runtimeVariables, - results: __brunoTestResults.getResults() + results: __brunoTestResults.getResults(), + nextRequestName: bru.nextRequest }; } @@ -147,7 +148,8 @@ class TestRuntime { request, envVariables: cleanJson(envVariables), runtimeVariables: cleanJson(runtimeVariables), - results: cleanJson(__brunoTestResults.getResults()) + results: cleanJson(__brunoTestResults.getResults()), + nextRequestName: bru.nextRequest }; } }