Skip to content

tests: fix breaking tests#7132

Merged
bijin-bruno merged 5 commits intousebruno:mainfrom
sid-bruno:fix/tests-13-feb
Feb 13, 2026
Merged

tests: fix breaking tests#7132
bijin-bruno merged 5 commits intousebruno:mainfrom
sid-bruno:fix/tests-13-feb

Conversation

@sid-bruno
Copy link
Collaborator

@sid-bruno sid-bruno commented Feb 13, 2026

Description

Tiny fixes that are breaking tests or have passed out the review cycle considering the test to be flaky

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • 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.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed environment variables table name input placeholder.
    • Normalized exported environment data to avoid null color values.
  • Chores

    • Collection export/import serialization now includes additional configuration for consistent output.
    • CLI collection/environment serialization explicitly targets Bru format for generated files.
  • Tests

    • Removed an explicit test timeout to rely on default timeout.
    • Adjusted header validation test to trigger form revalidation before asserting error visibility.

Copilot AI review requested due to automatic review settings February 13, 2026 11:19
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Updated a UI placeholder, removed an explicit test timeout, normalized exported/serialized environment color to undefined instead of null, passed an extra brunoConfig into collection/stringify calls, and adjusted a header-validation test to wait for Formik revalidation before asserting.

Changes

Cohort / File(s) Summary
UI Placeholder
packages/bruno-app/src/components/EnvironmentVariablesTable/index.js
Changed name input placeholder to show Name (was Value) when the value is empty.
Tests
tests/environments/multiline-variables/write-multiline-variable.spec.ts, tests/request/headers/header-validation.spec.ts
Removed explicit test.setTimeout(60 * 1000); and updated header test to trigger/wait for Formik revalidation (click row) before asserting the error icon is not visible.
Environment export / IPC normalization
packages/bruno-app/src/utils/exporters/bruno-environment.js, packages/bruno-electron/src/ipc/collection.js
Normalized environment.color using color ?? undefined in exported/serialized objects to avoid propagating null.
Collection import / stringify call sites
packages/bruno-electron/src/utils/collection-import.js, packages/bruno-cli/src/utils/collection.js
Now pass an additional brunoConfig / explicit { format: 'bru' } to stringifyCollection / stringifyEnvironment call sites; no control-flow changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • naman-bruno
  • bijin-bruno

Suggested labels

size/XS

Poem

A tiny placeholder finds its name,
A timeout quietly slips away,
Nulls become undefined light,
Config flows into stringify's frame,
Small edits, tidy delight. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (8 files):

⚔️ packages/bruno-app/src/components/EnvironmentVariablesTable/index.js (content)
⚔️ packages/bruno-app/src/providers/ReduxStore/slices/global-environments.js (content)
⚔️ packages/bruno-app/src/utils/exporters/bruno-environment.js (content)
⚔️ packages/bruno-cli/src/utils/collection.js (content)
⚔️ packages/bruno-electron/src/ipc/collection.js (content)
⚔️ packages/bruno-electron/src/utils/collection-import.js (content)
⚔️ tests/environments/multiline-variables/write-multiline-variable.spec.ts (content)
⚔️ tests/request/headers/header-validation.spec.ts (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
Title check ❓ Inconclusive The title 'tests: fix breaking tests' is vague and generic, failing to convey what specific tests or issues are being addressed. Clarify the title with specifics: e.g., 'tests: fix serialization format issues' or 'tests: fix timeout and placeholder text issues' to better reflect the actual changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch fix/tests-13-feb
  • Post resolved changes as copyable diffs in a comment

No actionable comments were generated in the recent review. 🎉


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes two test-related issues: removes an unnecessary timeout from a multiline variable test and corrects a placeholder text bug in the EnvironmentVariablesTable component.

Changes:

  • Removed explicit 60-second timeout from write-multiline-variable.spec.ts test
  • Fixed placeholder text from 'Value' to 'Name' for the name input field in EnvironmentVariablesTable

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/environments/multiline-variables/write-multiline-variable.spec.ts Removes unnecessary explicit test timeout, allowing test to use default timeout
packages/bruno-app/src/components/EnvironmentVariablesTable/index.js Corrects placeholder text for name input field from 'Value' to 'Name' to match field purpose and test expectations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/bruno-electron/src/ipc/collection.js (1)

794-804: ⚠️ Potential issue | 🟡 Minor

single-file export inconsistently handles color values.

The single-file branch exports raw environments directly (line 51) without processing through environmentWithInfo, leaving null color values as-is. In contrast, folder (line 35) and single-object (line 66) exports normalize colors via environmentWithInfo, converting null to undefined (line 763). This inconsistency should be addressed—either normalize colors uniformly across all formats or document why bulk exports intentionally preserve raw data.

@bijin-bruno bijin-bruno merged commit 4e1123b into usebruno:main Feb 13, 2026
7 of 9 checks passed
bijin-bruno pushed a commit that referenced this pull request Feb 13, 2026
* fix: update placeholder text for environment variable input

* fix: handle undefined color in environment objects

Don't export if `undefined`

* fix: update collection import logic for YML and BRU formats

* fix: ensure error icon is not visible after header validation

* fix: specify format for collection and environment serialization
This was referenced Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants