You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, there is such a limitation currently. I believe a good way to do it would be go play around getPageObjectDefinition(. But:
that's private for now
even with that you don't have a way to distinct between props VS actions.
As a short term solution, we could mark all the current built-in action descriptors by smth like isAction: true. But that doesn't feel super optimal to me, cause on the assertions end you would need to use private getPageObjectDefinition( and private isAction, which can easily breake because of hard dependencies on private APIs.
I think we should solve it, when introducing a public way to declare a custom action. I expect it to be done in v2.
Meanwhile, I think your current approach to create assertions for actions is a good(in terms of reliability) solution for now.
While working on assert lib for page object I faced and issue described here.
There is no way to check if property is a property or a function without calling it, for example:
So to check if property is a function I need to call it like this:
The problem with this is that we actually execute getter and if it raises an error, our check will fail.
Do you think it's possible to store it somehow?
The text was updated successfully, but these errors were encountered: