Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] : Settings on folder level #1334

Conversation

bpoulaindev
Copy link
Contributor

Description

Referencing issue #1310

Add settings at the folder level similarly to collection settings

  • multiple settings tab can be opened
  • only headers have been added in those settings
  • headers var with the same name as one from the parent will override the parent's one in the request

image

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

@bpoulaindev bpoulaindev changed the title Feat/folder settings [Feature] : Settings on folder level Jan 8, 2024
@fulvio-diller
Copy link

It would be nice to have body and tests also..

@bpoulaindev
Copy link
Contributor Author

@fulvio-diller Yeah i'll add those once headers are validated and officially stable

@helloanoop helloanoop self-assigned this May 15, 2024
@kyleboe
Copy link

kyleboe commented Jun 4, 2024

A thought from a design perspective: Should the concept of "Folders" be removed and should "Collections" be able to be nested? I'm not sure if that has already been discussed but it seems like that is the desired functionality as expressed in #1174 & #1310

Personally, my team would greatly benefit from being able to nest Collections to run a hierarchy of tests. So much so, that if we had that functionality, we would swap from Postman to Bruno immediately.

@tho-gru-38
Copy link

Hi @kyleboe,

I do not think that nesting collections is a good idea for several reasons:

  1. How should bru.setNextRequest() implement a jump between nested collection?
  2. What is the meaning of environments? Currently environments are stored at collection level. If a collection is nested there might exist environments too. To be able to run separately (standalone) environments must exist. On the other hand the values in the nested collection might be different from the values in the outer collection.
  3. Currently it is not possible to move/copy a request from one collection to another collection.

To my understanding the concept of folder exist to create hierarchical tests. Therefore I want to be able to store scripts, tests ... at folder level.

Kind Regards
Thomas

}
const directories = pathname
.substring(parameterIndex + parameter.length, filenameIndex)
.split('/')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PATH_SEPERATOR should be used here and 5 lines below for Windows compatible

}
return acc;
}, {});
const mergeParams = mergeRequests(collectionCopy.root.request, folderDatas);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For new collection collectionCopy.root can be undefined resulting in an error here.

@helloanoop helloanoop changed the base branch from main to feat/folder-level-settings June 24, 2024 06:50
@helloanoop helloanoop merged commit c1a57d3 into usebruno:feat/folder-level-settings Jun 24, 2024
3 checks passed
@helloanoop
Copy link
Contributor

Merged to feat/folder-level-settings branch where I will be continue further work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants