-
-
Notifications
You must be signed in to change notification settings - Fork 927
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
Refactor system tests to pass in DevContainers #5271
Open
colby-swandale
wants to merge
1
commit into
master
Choose a base branch
from
colby/devcontainer-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require "test_helper" | ||
require "application_system_test_case" | ||
require "helpers/email_helpers" | ||
|
||
class EmailConfirmationTest < SystemTest | ||
class EmailConfirmationTest < ApplicationSystemTestCase | ||
include ActiveJob::TestHelper | ||
|
||
setup do | ||
|
@@ -19,7 +19,7 @@ def request_confirmation_mail(email) | |
test "requesting confirmation mail does not tell if a user exists" do | ||
request_confirmation_mail "[email protected]" | ||
|
||
assert page.has_content? "We will email you confirmation link to activate your account if one exists." | ||
assert_text "We will email you confirmation link to activate your account if one exists." | ||
end | ||
|
||
test "requesting confirmation mail with email of existing user" do | ||
|
@@ -30,8 +30,8 @@ def request_confirmation_mail(email) | |
assert_not_nil link | ||
visit link | ||
|
||
assert page.has_content? "Sign in" | ||
assert page.has_selector? "#flash_notice", text: "Your email address has been verified" | ||
assert_text "Sign in" | ||
assert_selector "#flash_notice", text: "Your email address has been verified" | ||
end | ||
|
||
test "re-using confirmation link, asks user to double check the link" do | ||
|
@@ -40,13 +40,13 @@ def request_confirmation_mail(email) | |
link = last_email_link | ||
visit link | ||
|
||
assert page.has_content? "Sign in" | ||
assert page.has_selector? "#flash_notice", text: "Your email address has been verified" | ||
assert_text "SIGN IN" | ||
assert_selector "#flash_notice", text: "Your email address has been verified" | ||
|
||
visit link | ||
|
||
assert page.has_content? "Sign in" | ||
assert page.has_selector? "#flash_alert", text: "Please double check the URL or try submitting it again." | ||
assert_text "SIGN IN" | ||
assert_selector "#flash_alert", text: "Please double check the URL or try submitting it again." | ||
end | ||
|
||
test "requesting multiple confirmation email" do | ||
|
@@ -77,8 +77,8 @@ def request_confirmation_mail(email) | |
fill_in "otp", with: ROTP::TOTP.new(@user.totp_seed).now | ||
click_button "Authenticate" | ||
|
||
assert page.has_content? "Sign in" | ||
assert page.has_selector? "#flash_notice", text: "Your email address has been verified" | ||
assert_text "Sign in" | ||
assert_selector "#flash_notice", text: "Your email address has been verified" | ||
end | ||
|
||
test "requesting confirmation mail with webauthn enabled" do | ||
|
@@ -91,15 +91,15 @@ def request_confirmation_mail(email) | |
assert_not_nil link | ||
visit link | ||
|
||
assert page.has_content? "Multi-factor authentication" | ||
assert page.has_content? "Security Device" | ||
assert_text "Multi-factor authentication" | ||
assert_text "Security Device" | ||
|
||
click_on "Authenticate with security device" | ||
|
||
assert page.has_content? "Sign in" | ||
assert_text "SIGN IN" | ||
skip("There's a glitch where the webauthn javascript(?) triggers the next page to render twice, clearing flash.") | ||
|
||
assert page.has_selector? "#flash_notice", text: "Your email address has been verified" | ||
assert_selector "#flash_notice", text: "Your email address has been verified" | ||
end | ||
|
||
test "requesting confirmation mail with webauthn enabled using recovery codes" do | ||
|
@@ -112,14 +112,14 @@ def request_confirmation_mail(email) | |
assert_not_nil link | ||
visit link | ||
|
||
assert page.has_content? "Multi-factor authentication" | ||
assert page.has_content? "Security Device" | ||
assert_text "Multi-factor authentication" | ||
assert_text "Security Device" | ||
|
||
fill_in "otp", with: @mfa_recovery_codes.first | ||
click_button "Authenticate" | ||
|
||
assert page.has_content? "Sign in" | ||
assert page.has_selector? "#flash_notice", text: "Your email address has been verified" | ||
assert_text "Sign in" | ||
assert_selector "#flash_notice", text: "Your email address has been verified" | ||
end | ||
|
||
test "requesting confirmation mail with mfa enabled, but mfa session is expired" do | ||
|
@@ -135,7 +135,7 @@ def request_confirmation_mail(email) | |
travel 16.minutes do | ||
click_button "Authenticate" | ||
|
||
assert page.has_content? "Your login page session has expired." | ||
assert_text "Your login page session has expired." | ||
end | ||
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this (and other similar changes in testing) related to dev containers?