Skip to content

click not firing mouseover event #2928

@jkeruzec

Description

@jkeruzec

Current behavior:

I trigger some react-contextify menu with .trigger('contextmenu')
My menu is displaying OK

image

Then I select the div element where an onClick event is attached.
cy.get('.react-contexify__item').debug().click();

I tried to use also "force: true" as an option.

But my action is not triggered. Nothing happens.

With debug() option activated, I trigger manually the click() event and my Material UI dialog is displayed.

------------------------ Debug Info ------------------------
cypress_runner.js:63678 Command Name:     get
cypress_runner.js:63678 Command Args:     [".react-contexify__item"]
cypress_runner.js:63678 Current Subject:  jQuery.fn.init [div.react-contexify__item, prevObject: jQuery.fn.init(1), context: document, selector: ".react-contexify__item"]
subject.click()
MegaTrendPage.jsx:316 hello!
jQuery.fn.init [div.react-contexify__item, prevObject: jQuery.fn.init(1), context: document, selector: ".react-contexify__item"]

Source for div menu is like this:

  return (
      <div
        className={cssClasses}
        style={style}
        onClick={this.handleClick}
        role="presentation"
      >
        <div className={styles.itemContent}>{children}</div>
      </div>
    );

Desired behavior:

I trigger click event and dialog is shown...

Versions

Cypress Version used : 3.1.3
Chrome 70.0.3538.110
React 16.6.3
react-contexify : 3.0.3

Metadata

Metadata

Assignees

Labels

type: duplicateThis issue or pull request already exists

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions