feat(import): set yml as a default file formal accross all type of imports#8363
feat(import): set yml as a default file formal accross all type of imports#8363sharan-bruno wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThe bulk import modal and CLI collection generation now default to ChangesBulk Import Default Format: bru → yml
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/import/bulk-import/yml-as-default-file-format.spec.ts (1)
8-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse a
fixturesdirectory for bulk import sample files.The test currently pulls sample inputs from
../test-data; for consistency with the E2E convention, move these assets under afixturespath and updatetestDataDiraccordingly.Suggested minimal update
- const testDataDir = path.join(__dirname, '../test-data'); + const testDataDir = path.join(__dirname, 'fixtures');As per path instructions, "Ensure that the
fixtureslike the collections are nested inside thefixturesfolder".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/import/bulk-import/yml-as-default-file-format.spec.ts` around lines 8 - 17, Move the bulk import sample inputs out of the test-data location and point the test to a fixtures directory instead, following the E2E convention that collections and sample assets live under fixtures. Update the testDataDir setup in yml-as-default-file-format.spec.ts so openBulkImportModal and any other import helpers resolve sample-postman.json and sample-insomnia.json from the new fixtures path, and keep the existing helper names unchanged so the rest of the test remains intact.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/import/bulk-import/yml-as-default-file-format.spec.ts`:
- Around line 8-17: Move the bulk import sample inputs out of the test-data
location and point the test to a fixtures directory instead, following the E2E
convention that collections and sample assets live under fixtures. Update the
testDataDir setup in yml-as-default-file-format.spec.ts so openBulkImportModal
and any other import helpers resolve sample-postman.json and
sample-insomnia.json from the new fixtures path, and keep the existing helper
names unchanged so the rest of the test remains intact.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 672008de-959b-476a-94ac-1d3f68bfb23a
📒 Files selected for processing (4)
packages/bruno-app/src/components/Sidebar/BulkImportCollectionLocation/index.jspackages/bruno-cli/src/utils/collection.jstests/import/bulk-import/yml-as-default-file-format.spec.tstests/utils/page/locators.ts
| const [applyToCollection, setApplyToCollection] = useState(false); | ||
| const [groupingType, setGroupingType] = useState('tags'); | ||
| const [collectionFormat, setCollectionFormat] = useState('bru'); | ||
| const [collectionFormat, setCollectionFormat] = useState('yml'); |
There was a problem hiding this comment.
we have 'yml' set as a constant for default format- https://github.com/usebruno/bruno/blob/main/packages/bruno-filestore/src/constants.ts
use that instead of hardcoding. Do this everywhere
Jira: https://usebruno.atlassian.net/browse/BRU-3654
Description
This PR sets OpenCollection (YAML) as the default file format for the Bulk Import flow — the format selector in the Bulk Import modal now defaults to yml instead of bru, so imported collections are written as opencollection.yml unless the user explicitly switches to BRU. To cover this, it adds an e2e spec (yml-as-default-file-format.spec.ts) verifying both the UI default and that importing with the default actually writes opencollection.yml (and never bruno.json) to disk. Along the way, it adds stable data-testids to the Bulk Import modal and its format selector, and exposes matching locators in the shared test helper so the suite relies on test ids rather than CSS class selectors.
Contribution Checklist:
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.
Summary by CodeRabbit
Summary by CodeRabbit
New Features
opencollection.ymlby default).Bug Fixes
bruno.jsonin the default flow.Tests