Repository navigation
fix: mock server minor bug fixes - #8923
Conversation
…oll on the description view more
WalkthroughChangesMock server updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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.
Actionable comments posted: 2
🤖 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.
Inline comments:
In `@packages/bruno-app/src/utils/mock-server/mock-responses.spec.js`:
- Around line 151-156: Add cases in the getMockResponseDescriptionError test
suite using surrounding whitespace: verify a padded description whose trimmed
content is exactly MOCK_RESPONSE_DESCRIPTION_MAX_LENGTH returns no error, and a
padded description whose trimmed content exceeds that limit returns the existing
length error. Keep the assertions focused on the trimming contract.
In `@packages/bruno-app/src/utils/mock-server/mock-server-instances.js`:
- Around line 409-415: Add unit tests in mock-server-instances.spec.js covering
toMockServerDelayInputValue with typed and pasted values, ensuring non-digit
characters are removed, and blockMockServerDelayKeys with invalid keys invoking
preventDefault while digit and editing keys remain allowed.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1512d31d-59c7-4581-a262-fd52e7f89843
📒 Files selected for processing (14)
packages/bruno-app/src/components/MockServer/CreateMockServerModal/index.jspackages/bruno-app/src/components/MockServer/MockResponse/CreateMockResponseModal/index.jspackages/bruno-app/src/components/MockServer/MockResponse/MockResponseTopBar/index.jspackages/bruno-app/src/components/MockServer/MockResponse/RenameMockResponseModal/index.jspackages/bruno-app/src/components/MockServer/MockResponse/index.jspackages/bruno-app/src/components/MockServer/MockServerDashboard/index.jspackages/bruno-app/src/components/MockServer/Sidebar/MockServers/MockResponseSidebarItem/index.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleResponsePane/ResponseExampleStatusInput/StyledWrapper.jspackages/bruno-app/src/components/ResponseExample/ResponseExampleTopBar/StyledWrapper.jspackages/bruno-app/src/utils/mock-server/mock-responses.jspackages/bruno-app/src/utils/mock-server/mock-responses.spec.jspackages/bruno-app/src/utils/mock-server/mock-server-instances.jspackages/bruno-electron/src/app/mock-server/mock-response-store.jspackages/bruno-electron/tests/mock-response-store.test.js
Description
Small mock-server and response example polish pass: validation feedback for name/description limits, a layout fix for long descriptions, delay input decimals, and two UI spacing tweaks
Problem
Fix
Screenshots
Contribution Checklist:
Summary by CodeRabbit