Skip to content

chore: playwright fix#6507

Merged
bijin-bruno merged 1 commit intomainfrom
fix/playwright
Dec 25, 2025
Merged

chore: playwright fix#6507
bijin-bruno merged 1 commit intomainfrom
fix/playwright

Conversation

@bijin-bruno
Copy link
Collaborator

@bijin-bruno bijin-bruno commented Dec 25, 2025

Description

playwright fix

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

  • Tests
    • Updated test interactions for folder copy operations to improve test reliability and consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 25, 2025

Walkthrough

Adjusts the hover target in the copy-folder test from the .collection-actions nested element to the parent collection element in two test scenarios. The subsequent user interactions and assertions remain unchanged.

Changes

Cohort / File(s) Summary
Test Hover Target Adjustment
tests/request/copy-request/copy-folder.spec.ts
Replaced .collection.locator('.collection-actions').hover() with .collection.hover() at two locations: initial folder creation and target-folder creation flows. Dropdown opening and folder naming actions unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • #6097: Directly modifies the same copy-paste folder test and hover interaction target in the Playwright test suite.

Suggested reviewers

  • lohit-bruno
  • naman-bruno

Poem

🎯 From nested depths to parent's grace,
The hover finds its rightful place,
Two spots adjust with gentle care,
The test flows smooth through open air. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: playwright fix' is vague and lacks specificity about what was actually fixed in the Playwright test. Consider a more descriptive title like 'chore: fix hover target in copy-folder test' to clarify the specific change being made.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/playwright

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

@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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
tests/request/copy-request/copy-folder.spec.ts (1)

9-91: Consider using test.step for better report readability.

The tests have clear logical sections (marked by comments). Wrapping these in test.step blocks would make the test reports more readable, as per the coding guidelines.

For example:

await test.step('Create a new folder with a request inside', async () => {
  await collection.hover();
  await collection.locator('.collection-actions .icon').click();
  // ... rest of section
});

As per coding guidelines: "Promote the use of test.step as much as possible so the generated reports are easier to read"

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2446301 and 33439b3.

📒 Files selected for processing (1)
  • tests/request/copy-request/copy-folder.spec.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions. () => {} is good
No space between function name and parentheses. func() not func ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly

Files:

  • tests/request/copy-request/copy-folder.spec.ts
tests/**/**.*

⚙️ CodeRabbit configuration file

tests/**/**.*: Review the following e2e test code written using the Playwright test library. Ensure that:

  • Follow best practices for Playwright code and e2e automation

  • Try to reduce usage of page.waitForTimeout(); in code unless absolutely necessary and the locator cannot be found using existing expect() playwright calls

  • Avoid using page.pause() in code

  • Use locator variables for locators

  • Avoid using test.only

  • Use multiple assertions

  • Promote the use of test.step as much as possible so the generated reports are easier to read

  • Ensure that the fixtures like the collections are nested inside the fixtures folder

    Fixture Example*: Here's an example of possible fixture and test pair

    .
    ├── fixtures
    │   └── collection
    │       ├── base.bru
    │       ├── bruno.json
    │       ├── collection.bru
    │       ├── ws-test-request-with-headers.bru
    │       ├── ws-test-request-with-subproto.bru
    │       └── ws-test-request.bru
    ├── connection.spec.ts # <- Depends on the collection in ./fixtures/collection
    ├── headers.spec.ts
    ├── persistence.spec.ts
    ├── variable-interpolation
    │   ├── fixtures
    │   │   └── collection
    │   │       ├── environments
    │   │       ├── bruno.json
    │   │       └── ws-interpolation-test.bru
    │   ├── init-user-data
    │   └── variable-interpolation.spec.ts # <- Depends on the collection in ./variable-interpolation/fixtures/collection
    └── subproto.spec.ts
    

Files:

  • tests/request/copy-request/copy-folder.spec.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: sanish-bruno
Repo: usebruno/bruno PR: 6090
File: tests/scripting/hooks/init-user-data/ui-state-snapshot.json:1-8
Timestamp: 2025-12-16T07:16:23.647Z
Learning: For e2e tests in the bruno repository: Collections that are shared between CLI and UI tests (comprehensive test suites testing core functionality) should be placed in `packages/bruno-tests/` to avoid duplication. The `tests/**/fixtures/collection` pattern should be used for test-specific collections that test particular UI behaviors or are specific to a single test file.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Unit Tests
  • GitHub Check: CLI Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - macOS
🔇 Additional comments (2)
tests/request/copy-request/copy-folder.spec.ts (2)

14-14: LGTM! More robust hover target.

Hovering directly on the collection element (rather than the nested .collection-actions) is more resilient to DOM structure changes and aligns with typical UI patterns where parent hover reveals child actions.


68-68: LGTM! Consistent with the earlier fix.

Same improvement as line 14 - hovering on the parent collection element for better robustness.

@github-actions
Copy link

CLI Test Results

  1 files  ±0  140 suites  ±0   50s ⏱️ -7s
235 tests ±0  235 ✅ ±0  0 💤 ±0  0 ❌ ±0 
301 runs  ±0  300 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 33439b3. ± Comparison against base commit 2446301.

@bijin-bruno bijin-bruno merged commit b41f497 into main Dec 25, 2025
9 checks passed
bijin-bruno added a commit that referenced this pull request Feb 13, 2026
* chore: playwright fix (#6507)

* chore: update responsive tab's more icon (#6509)

* refactor: replace button elements with new Button component (#6512)

* refactor: replace button elements with new Button component

* chore: fix button size for consistency

---------

Co-authored-by: Bijin A B <bijin@usebruno.com>

* feat: `collection-level` and `app-level` proxy settings updates (#6514)

* feat: collection and app proxy settings updates

* fix: opencollection proxy config export and import

* fix: coderabbit review fixes

* chore: fix minor runtime warnings (#6518)

---------

Co-authored-by: Sanjai Kumar <161328623+sanjaikumar-bruno@users.noreply.github.com>
Co-authored-by: lohit <lohit@usebruno.com>
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.

1 participant