Add within_content_body system test helper
This commit is contained in:
parent
99af52b478
commit
c883f02161
2 changed files with 14 additions and 6 deletions
|
@ -41,4 +41,8 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
|
|||
def within_sidebar(&)
|
||||
within("#sidebar_content", &)
|
||||
end
|
||||
|
||||
def within_content_body(&)
|
||||
within("#content > .content-body", &)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,18 +6,22 @@ class UserSignupTest < ApplicationSystemTestCase
|
|||
|
||||
click_on "Sign up"
|
||||
|
||||
assert_content "Confirm Password"
|
||||
within_content_body do
|
||||
assert_content "Confirm Password"
|
||||
end
|
||||
end
|
||||
|
||||
test "Show OpenID form when OpenID provider button is clicked" do
|
||||
visit login_path
|
||||
|
||||
assert_no_field "OpenID URL"
|
||||
assert_no_button "Continue"
|
||||
within_content_body do
|
||||
assert_no_field "OpenID URL"
|
||||
assert_no_button "Continue"
|
||||
|
||||
click_on "Log in with OpenID"
|
||||
click_on "Log in with OpenID"
|
||||
|
||||
assert_field "OpenID URL"
|
||||
assert_button "Continue"
|
||||
assert_field "OpenID URL"
|
||||
assert_button "Continue"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue