Skip to content
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

After I call the realHover() method over a menu and perform other actions, the menu is still opened #162

Closed
jgonzalezalbisu opened this issue Sep 6, 2021 · 14 comments

Comments

@jgonzalezalbisu
Copy link

jgonzalezalbisu commented Sep 6, 2021

Hi @dmtrKovalenko I apologize for not posting it on the first place. I cannot show the actual behavior here as I cannot post anything related to my company code, but basically I have this code block

cy.get(this.menuNavBarMainReportsCSS).realHover(); // After this line is executed, the menu is still opened, like the hover didn't go away.

cy.get(this.menuNavBarItemClassicReportsCSS).realHover(); // I did this to hover over another element within that menu that expands when I hover in the first one, and it solves the problem.

cy.get(this.menuNavBarItemClassicReportsCSS).click();


Would this suffice? Thanks again for your time and apologies again
@dmtrKovalenko
Copy link
Owner

Please provide reproduction or issue will be closed.

@jgonzalezalbisu
Copy link
Author

Added the description above. Apologies

@dmtrKovalenko
Copy link
Owner

Please provide reproduction (GitHub repo with tests which reproduce your problem)

@jgonzalezalbisu
Copy link
Author

Hi @dmtrKovalenko , I can't due to the fact that is company code and I cannot post it here. Basically the problem is that the menus I'm hovering over are still opened after I execute the realHover() method. The only way I could find to close them is to hover over another element, but this causes a lot of requests being fired in the test run and it makes the cypress dashboard page to crush.

Can we have a solution for this? Again thanks for your time

@dmtrKovalenko
Copy link
Owner

Sorry, but you can make similar example that reproduce your problem. I understand that you don't want to spend your time on this. But without reproduction I can not help you because I don't want to spend my time trying to understand your problem based on your words.

Thanks.

@jgonzalezalbisu
Copy link
Author

Hi @dmtrKovalenko , here you have a public repo of mine with a simple test where you can see this behavior.
https://github.com/jgonzalezalbisu/cypressrealhoverissue

Thanks!

@heidi-derek
Copy link

It would be useful to have a command such as .undoHover() to address this problem. Thanks!

@mijogu
Copy link

mijogu commented Nov 5, 2021

Agreed. I have been unsuccessful in removing the hover/focus of an element that I have used .realHover() on.

In my situation I am able to confirm the presence of text in a div that displays when another element if hovered over. But when I try doing that a second time (on a different element), the original div is still being displayed.

@PDS42
Copy link

PDS42 commented Nov 18, 2021

Encountering the same problem here.
An element once hovered with .realHover() will stay hovered until tests are done.
@dmtrKovalenko .undoHover() would be lovely <3

@dmtrKovalenko
Copy link
Owner

Yep; I will work on this next week

@dmtrKovalenko
Copy link
Owner

🎉 This issue has been resolved in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@flozero
Copy link

flozero commented Mar 4, 2022

Can you explain how you resolved it? the code below if its the resolution doesn't solve the problem here for button

cy.get("body").realHover({ position: "topLeft" });

@dmtrKovalenko
Copy link
Owner

dmtrKovalenko commented Mar 4, 2022

@flozero
Copy link

flozero commented Mar 4, 2022

Ye i saw and thank you ! I am going to open a new issue as we have another error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants