Skip to content

Select doesn't respond to click event through code #19250

@dudif

Description

@dudif

Hi, i'm trying to test my select component with puppeteer.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

i'm trying this:
document.querySelector('[data-testid="my-select"] [role="button"]').click()
and it seems to do nothing.
it worked before in version 4.6.1

also it seems that since that version right click on Select also open the component what didn't happened in the version 4.6.1

Expected Behavior 🤔

document.querySelector('[data-testid="my-select"] [role="button"]').click()
should trigger the click event on the select and open the component

Context 🔦

this issue effecting on all my tests (unit tests, ui tests).
because i can't find a way to trigger click event on the select through code.

Your Environment 🌎

Tech Version
Material-UI v4.8.3
React v16.8.5
Jest v24.8.0
Puppeteer v2.0.0
etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready to takeHelp wanted. Guidance available. There is a high chance the change will be acceptedscope: selectChanges related to the select.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions