ae_page_objects
ae_page_objects copied to clipboard
Fix exception contracts
2 changes:
- Node delegates some methods to the underlying Capybara node. These delegations nest
Capybara::ElementNotFoundunderAePageObjects::LoadingElementFailed.AePageObjects::LoadingElementFailedindicates that anAePageObjects::Elementfailed to load.Capybara::ElementNotFoundindicates that a Capybara element failed to be found. The Capybara exception should only be nested under the AePageObjects exception when the Capybara exception is the cause for an AePageObjects element failing to load. - Replaced use of
find()delegation in Node withnode.find(). In every case, Node wants to find the underlying Capybara element. Before this change, subclasses could define afindmethod and override the behavior in Node of finding the underlying Capybara node. For example,AePageObjects::Collectiondoes this today. Subclasses should be able to define methods without overriding this behavior.