Skip to content

chore: Refactor dropdown test utils #3571

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jperals
Copy link
Member

@jperals jperals commented Jun 11, 2025

Description

AutosuggestDropdownWrapper and DropdownContentWrapper share a good number of methods which are currently identical. This PR deduplicates them via a third base class so that future updates such as #3570 are simpler and make sure they do not eventually lead to diverging implementations.

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

codecov bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.62%. Comparing base (f06998b) to head (5ee8a2e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3571      +/-   ##
==========================================
+ Coverage   96.60%   96.62%   +0.02%     
==========================================
  Files         807      807              
  Lines       23572    23555      -17     
  Branches     8196     8254      +58     
==========================================
- Hits        22771    22761      -10     
- Misses        747      787      +40     
+ Partials       54        7      -47     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jperals jperals force-pushed the chore/refactor-dropdown-host branch from 9dd63f8 to de9ff21 Compare June 12, 2025 13:44
export class DropdownContentWrapper extends ComponentWrapper {
export class BaseDropdownContentWrapper extends ComponentWrapper {
/**
* Returns all the disabled options.
Copy link
Member Author

Choose a reason for hiding this comment

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

The original doc text here for the AutosuggestDropdownWrapper was "Returns all the selected options.", which must have been wrong.

@jperals jperals force-pushed the chore/refactor-dropdown-host branch 2 times, most recently from 2e756ff to 7001d75 Compare June 12, 2025 13:52
@jperals jperals force-pushed the chore/refactor-dropdown-host branch from 7001d75 to 6d50919 Compare June 12, 2025 13:53
@jperals jperals marked this pull request as ready for review June 16, 2025 10:41
@jperals jperals requested a review from a team as a code owner June 16, 2025 10:41
@jperals jperals requested review from cansuaa and removed request for a team June 16, 2025 10:41
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.

1 participant