-
-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to assert_text in some more tests (#1057)
A few more instances of `assert page.has_content?` have crept in. Switching them to `assert_text` instead so that we get better error messages when tests fail.
- Loading branch information
1 parent
2ea5c9c
commit cc04b65
Showing
3 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ def teardown | |
fill_in "Confirm Password", with: example_password | ||
click_on "Sign Up" | ||
|
||
assert page.has_content?("Tell us about you") | ||
assert_text("Tell us about you") | ||
fill_in "First Name", with: "Hanako" | ||
fill_in "Last Name", with: "Tanaka" | ||
fill_in "Your Team Name", with: "The Testing Team" | ||
|
@@ -40,7 +40,7 @@ def teardown | |
|
||
# Click on next to show that bulk invitations will raise an error if not filled out properly. | ||
click_on "Next" | ||
assert page.has_content?("Email can't be blank") | ||
assert_text("Email can't be blank") | ||
|
||
# Fill in the email addresses. | ||
email_fields = page.all("label", text: "Email Address") | ||
|
@@ -61,12 +61,12 @@ def teardown | |
sleep 2 | ||
end | ||
|
||
assert page.has_content?("The Testing Team’s Dashboard") | ||
assert_text("The Testing Team’s Dashboard") | ||
within_team_menu_for(display_details) do | ||
click_on "Team Members" | ||
end | ||
|
||
assert page.has_content?("[email protected]") | ||
assert_text("[email protected]") | ||
invitation = Invitation.find_by(email: "[email protected]") | ||
assert_equal invitation.membership.role_ids, ["admin", "editor"] | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters