1
0
mirror of https://github.com/usebruno/bruno.git synced 2025-01-05 05:29:00 +01:00

update natural to sequential ()

This commit is contained in:
lohit 2024-07-29 11:04:29 +05:30 committed by GitHub
parent 6fe96a8194
commit 98c53cf443
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions
packages/bruno-electron/src/ipc/network

View File

@ -408,7 +408,7 @@ const registerNetworkIpc = (mainWindow) => {
}
// run post-response script
const responseScript = compact(scriptingConfig.flow === 'natural' ? [
const responseScript = compact(scriptingConfig.flow === 'sequential' ? [
get(collectionRoot, 'request.script.res'), get(request, 'script.res')
] : [
get(request, 'script.res'), get(collectionRoot, 'request.script.res')
@ -596,7 +596,7 @@ const registerNetworkIpc = (mainWindow) => {
// run tests
const testScript = item.draft ? get(item.draft, 'request.tests') : get(item, 'request.tests');
const testFile = compact(scriptingConfig.flow === 'natural' ? [
const testFile = compact(scriptingConfig.flow === 'sequential' ? [
get(collectionRoot, 'request.tests'), testScript,
] : [
testScript, get(collectionRoot, 'request.tests')
@ -1036,7 +1036,7 @@ const registerNetworkIpc = (mainWindow) => {
// run tests
const testScript = item.draft ? get(item.draft, 'request.tests') : get(item, 'request.tests');
const testFile = compact(scriptingConfig.flow === 'natural' ? [
const testFile = compact(scriptingConfig.flow === 'sequential' ? [
get(collectionRoot, 'request.tests'), testScript
] : [
testScript, get(collectionRoot, 'request.tests')

View File

@ -147,7 +147,7 @@ const mergeFolderLevelScripts = (request, requestTreePath, scriptFlow) => {
}
if (folderCombinedPostResScript.length) {
if (scriptFlow === 'natural') {
if (scriptFlow === 'sequential') {
request.script.res = compact([...folderCombinedPostResScript, request?.script?.res || '']).join(os.EOL);
} else {
request.script.res = compact([request?.script?.res || '', ...folderCombinedPostResScript.reverse()]).join(os.EOL);
@ -155,7 +155,7 @@ const mergeFolderLevelScripts = (request, requestTreePath, scriptFlow) => {
}
if (folderCombinedTests.length) {
if (scriptFlow === 'natural') {
if (scriptFlow === 'sequential') {
request.tests = compact([...folderCombinedTests, request?.tests || '']).join(os.EOL);
} else {
request.tests = compact([request?.tests || '', ...folderCombinedTests.reverse()]).join(os.EOL);
@ -309,7 +309,7 @@ const prepareRequest = (item, collection) => {
}
});
// scriptFlow is either "sandwich" or "natural"
// scriptFlow is either "sandwich" or "sequential"
const scriptFlow = collection.brunoConfig?.scripts?.flow ?? 'sandwich';
const requestTreePath = getTreePathFromCollectionToItem(collection, item);
if (requestTreePath && requestTreePath.length > 0) {