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
Since page object aliases are passed in as strings in the tests we can't leverage type safety to verify before runtime if someone made a typo or if an update to a page object broke an alias being used in a test. This causes nasty crashes that are expensive to find and fix in the test code such as Issue 4009
myPage.expect.element('@busnessName').is.present;// Case of a typomyPage.expect.element('@oldSelector').is.present;// Case of test referencing an old selector not present in page object
Presently if you run a test like this Nightwatch does provide helpful errors stating the alias does not exist and lists which ones do exist as a part of the element collection in the page object, but this isn't caught until you run the test.
Suggested solution
Provide some sort of light-weight/fast dry run check that let's you run the test without executing browser commands to quickly scan for references to page object aliases to ensure they exist in their respective page object element collections or some sort of linting capability in that regard.
Alternatives / Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Description
Since page object aliases are passed in as strings in the tests we can't leverage type safety to verify before runtime if someone made a typo or if an update to a page object broke an alias being used in a test. This causes nasty crashes that are expensive to find and fix in the test code such as Issue 4009
Presently if you run a test like this Nightwatch does provide helpful errors stating the alias does not exist and lists which ones do exist as a part of the element collection in the page object, but this isn't caught until you run the test.
Suggested solution
Provide some sort of light-weight/fast dry run check that let's you run the test without executing browser commands to quickly scan for references to page object aliases to ensure they exist in their respective page object element collections or some sort of linting capability in that regard.
Alternatives / Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: