Allow bru.setNextRequest() on Test Scripts (#2155) (#2552)

Co-authored-by: Alcaraz, Bruno <Bruno.Alcaraz@ulgroup.com>
This commit is contained in:
BruAlcaraz 2024-07-25 08:27:55 -03:00 committed by GitHub
parent 073c1aae12
commit c99da3a581
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 2 deletions

View File

@ -352,6 +352,10 @@ const runSingleRequest = async function (
scriptingConfig scriptingConfig
); );
testResults = get(result, 'results', []); testResults = get(result, 'results', []);
if (result?.nextRequestName !== undefined) {
nextRequestName = result.nextRequestName;
}
} }
if (testResults?.length) { if (testResults?.length) {

View File

@ -1047,6 +1047,10 @@ const registerNetworkIpc = (mainWindow) => {
scriptingConfig scriptingConfig
); );
if (testResults?.nextRequestName !== undefined) {
nextRequestName = testResults.nextRequestName;
}
mainWindow.webContents.send('main:run-folder-event', { mainWindow.webContents.send('main:run-folder-event', {
type: 'test-results', type: 'test-results',
testResults: testResults.results, testResults: testResults.results,

View File

@ -76,7 +76,8 @@ class TestRuntime {
request, request,
envVariables, envVariables,
runtimeVariables, runtimeVariables,
results: __brunoTestResults.getResults() results: __brunoTestResults.getResults(),
nextRequestName: bru.nextRequest
}; };
} }
@ -147,7 +148,8 @@ class TestRuntime {
request, request,
envVariables: cleanJson(envVariables), envVariables: cleanJson(envVariables),
runtimeVariables: cleanJson(runtimeVariables), runtimeVariables: cleanJson(runtimeVariables),
results: cleanJson(__brunoTestResults.getResults()) results: cleanJson(__brunoTestResults.getResults()),
nextRequestName: bru.nextRequest
}; };
} }
} }