Add types for custom commands on page object sections. #4298
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #4292
This PR adds the types for the custom commands that are made available directly over the page object sections.
It should be noted NOT all custom commands are made available directly on the section object. All the custom commands are only available on the
section.api
object while thesection
object directly contains all the custom commands EXCEPT those having a namespace. This behaviour has been accounted for in the type definition.For example, let's say the structure of the
custom-commands
folder is as follows:The above custom commands would be available on the various APIs as follows (assuming a page-object named
myPage
with amySection
section):The above is also true for the page-objects -- only non-namespaced custom commands are made directly available on the page object.
The types for custom commands on page-objects should also be fixed at some later time (after making sure that the newly added type definition is working correctly).