-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Selector scopes #20
Comments
We have simple tests, no such problem. May be lazy evaluated functions will help? Instead of selector string you can use helper call to add prefix. Something like A bit shitty, but can help |
Thanks for prompt response, Vitaly. I used to generate selectors in Node to save some keystrokes, which certainly helps, but doesn't yield too much readability — having 3 different functions per test case to generate selectors really looks a bit messy. However, I guess I'll stick with this approach. Thanks again for your help! |
As far as i remember, we have prefix for In theory selector prefixes are possible, at least at global level. We can keep issue open with very low priority to investigate sometime in far future. |
Thanks, reopening then. |
This topic is more of a discussion rather than a call for action.
I am seeking solutions for two minor problems I've faced recently writing e2e tests for a medium-sized SPA:
'[ui-view="props"] [ng-repeat^="prop in"]:last-child [ui-sref^="product.prop"]'
)[ui-view="props"]
denotes the context where we test and it is repeated a lot)Both problems could be addressed by introducing a concept of "current scope": by default it is unset (which means we will search in
document
), but if you dobrowser.scope('[ui-view="props"]')
then all subsequent selections will occur within that element.Asking you to actually do that would be too insolent since it would require revisiting every method and, more importantly, covering all that with a separate test suite. Therefore, I'm asking for an advice, maybe you've come across similar problems and already have a solution.
TIA
The text was updated successfully, but these errors were encountered: