natritmeyer/site_prism — pull request #19 by nestd (2013-03-10 17:16:43+00:00)
Title: implemented capability to get access to a parent section and direct access to a current page

Hello,

This pull request adds possibility to get access to a parent section and a current page from any child section. For our project it is very useful, because sometimes we have to wait for elements which are outside of a current section. It may be some global notifiers or loading indicators.

It is important for us (and may be it will be for other developers as well), because we use [VCR](/vcr/vcr) for stubbing network responses.

```ruby
class AddFormSection < SitePrisme::Section
def click_add_btn
VCR.use_cassette 'items' do
self.add_btn.click
self.parent.wait_until_loading_indicator_invisible
end
end
end
```
This code makes **VCR** wait until an AJAX request has finished. Therefore, waiters of **SitePrism** are very important for us and very useful.