Skip to content

Instantly share code, notes, and snippets.

@dennisreimann
Created September 3, 2015 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dennisreimann/e1acd302e971f47df865 to your computer and use it in GitHub Desktop.
Save dennisreimann/e1acd302e971f47df865 to your computer and use it in GitHub Desktop.
Galen forEach example with nested objects
@objects
form-row-* .form__row
label .form__row__label
input .form__row__input
= Form =
@on small
@forEach [form-row-*] as row
${row}.label:
above ${row}.input
@on medium, large
@forEach [form-row-*] as row
${row}.label:
left-of ${row}.input
= Form =
form-row-1.label:
above form-row-1.input
form-row-1.label.label:
-> above form-row-1.label.input
-> : Cannot find locator for "form-row-1.label.label" in page spec
@dennisreimann
Copy link
Author

@ishubin thanks for your help and all the information.

Concerning the component: Yes, that how we are doing it, this is just a simplified example I made up to clarify the issue. I'll check the count approach tomorrow and will report in case I come across something weird.

Thanks again for your support!

@ishubin
Copy link

ishubin commented Sep 3, 2015

@dennisreimann I have just released a new version (2.0.9). In it I have fixed the count function and also the sorting of page objects. Instead of alphabetic search it should perform a search like a human. Please let me know if you find some new weird issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment