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

Extend Target class to allow nesting a new Target within an existing one #143

Closed
wants to merge 4 commits into from

Conversation

lufecir
Copy link

@lufecir lufecir commented Jan 12, 2018

Hi Jan,

The change in this pull request allows nesting a target within an existing one, with no limitation on the nesting depth.

Example:

let grandGrandParentTarget = Target.the('grand-grand-parent').located(grandGrandParentLocator);
let grandParentTarget = Target.within(grandGrandParentTarget).the('grand-parent').located(grandParentLocator);
let parentTarget = Target.within(grandParentTarget).the('parent').located(parentLocator);
let childTarget = Target.within(parentTarget).the('child').located(childLocator);

The leaf target can be resolved using both the 'element' and 'element.all' resolver.
All parent targets on its path are resolved using the 'element' resolver.
Maybe it would also be possible to have parents that resolve to multiple elements, but I did not investigate this for now, since what I implemented now is all the functionality that I needed.

Could you please have a look at it?

Regards,

Luc

@jan-molak jan-molak added this to the 2.0 milestone Feb 19, 2019
nbarrett pushed a commit to nbarrett/serenity-js that referenced this issue May 1, 2020
…d_yarn/serenity-js/core-2.1.2

Bump @serenity-js/core from 2.0.1 to 2.1.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants