-
Notifications
You must be signed in to change notification settings - Fork 158
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
Usage when submitting forms #51
Comments
(edited the original post to correct a few things) |
@andyw8 Your implementation looks correct. You must explicitly specify which page you are interacting with. |
Ok. So how do I avoid using a page model which potentially doesn't correspond to the page that was actually rendered? Should I be checking |
Can you give me an example? I'm not sure I understand how you could e.g. If I click the 'Login' link on the home page, I expect to be Can you provide a simple example of where this fails for you? On Fri, Oct 11, 2013 at 3:18 PM, Andy Waite notifications@github.comwrote:
|
I should add that if you are expecting to be redirected by some action e.g. assuming we have HomePage and LoginPage classes: let(:home_page) { HomePage.new }
let(:login_page) { LoginPage.new }
context "Login Link"
scenario "redirects to the login page"
home_page.load
expect(home_page).to be_displayed
home_page.login_link.click
expect(login_page).to be_displayed
end
end On Fri, Oct 11, 2013 at 3:25 PM, Tim M tim@filmchicago.org wrote:
|
Got it! Wasn't obvious from the README, I'll send a PR to add that info if I have a chance. |
@andyw8 happy for me to close this? Good to hear from you again :) |
Hi Nat!
I have a usage question that I couldn't see covered by the README.
Say you have a form, which redirects on a successful post, so there are two page object classes,
NewWidget
andShowWidget
.Is the intention that site_prism automatically knows which page object class to use, based on the URL? Or do you need to be explicit? For example, is this the intended approach:
The text was updated successfully, but these errors were encountered: