-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Current behavior:
Per v3.8.0, one might receive a message stating EG. Cypress could not determine why this element '<button>' is not visible.
This is non-sensical, as there's obviously some heuristic implemented that has determined the element to be invisible.
I understand that there's a method getReasonIsHidden
that is somewhat replicating the behavior of isHidden
, but returning a human-readable string instead of a boolean value. I am however having a very hard time understanding why you would implement it like this.
Since there should be one, and only one, heuristic-implemention, why not make one a function of the other?
const getReasonIsHidden = function ($el) {
// Implementation ...
}
const isHidden = ($el) => {
return !!getReasonIsHidden($el);
}
Desired behavior:
Never to see such a non-informative error message.
Steps to reproduce: (app code and test code)
Doesn't really matter here, but I can see if I can produce a minimal example.
Versions
Cypress v3.8.0, Arch Linux, Chrome 77.