Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Agouti could be problematic without a selector.parent method #155

Closed
msecret opened this issue Dec 19, 2015 · 1 comment
Closed

Agouti could be problematic without a selector.parent method #155

msecret opened this issue Dec 19, 2015 · 1 comment
Labels

Comments

@msecret
Copy link
Contributor

msecret commented Dec 19, 2015

Imagine the following nav:

<ul class="nav">
  <li class="nav-item">
    <a>cf-deck org</a>
  </li>
  <ul class="nav">
    <li class="nav-item">
      <a>spaces</a>
    </li>
    ...
  </ul>
  <li class="nav-item">
    <a>cf org</a>
  </li>
  <ul class="nav">
    <li class="nav-item">
      <a>spaces</a>
    </li>
    ...
  </ul>
</ul>

I want to write agouti functionality to click on the spaces like for a certain org. I start this by finding the link for the org by it's name:

nav.FindByLink('cf org')

Which puts me at the second <a> withing ul li. Now I want to get to the ul above and from there, go to the spaces link. In jquery this would be like nav.parent('ul').children('spaces'). But I can't do this in agouti because there's no parent method. There's no parent selector in CSS, making this impossible.

Any ideas on how I could write a test case like this without a parent method?

@msecret
Copy link
Contributor Author

msecret commented Dec 19, 2015

Actual code: msecret/cf-deck@3ada128

@msecret msecret closed this as completed Apr 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant