Use faster default driver for feature tests not requiring JavaScript#11077
Merged
Use faster default driver for feature tests not requiring JavaScript#11077
Conversation
changelog: Internal, Automated Testing, Use faster default driver for feature tests not requiring JavaScript
See rationale in #8761
Same test case already exists in no-JavaScript context
aduth
commented
Aug 14, 2024
Comment on lines
-244
to
-251
|
|
||
| it 'allows a user to sign up with backup codes and add methods without reauthentication' do | ||
| sign_in_user | ||
| select_2fa_option('backup_code') | ||
|
|
||
| visit phone_setup_path | ||
| expect(page).to have_current_path phone_setup_path | ||
| end |
Contributor
Author
There was a problem hiding this comment.
We already have an identical test for this outside the JavaScript context, and there's nothing particular about JavaScript which we'd expect to influence this behavior.
aduth
commented
Aug 14, 2024
|
|
||
| it 'allows the user to sign in if webauthn is successful' do | ||
| mock_webauthn_verification_challenge | ||
| context 'with javascript enabled', :js do |
Contributor
Author
There was a problem hiding this comment.
I restored some JavaScript-enabled testing in this file, since part of the idea with #8761 was to have more realistic testing for how WebAuthn is expected to work in a real browser. I think it should suffice to do this once for the critical path, and use the default driver for everything else.
mitchellhenke
approved these changes
Aug 14, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🛠 Summary of changes
Updates a few feature specs to avoid opting into the JavaScript-enabled driver where not strictly necessary to do so.
Why?
📜 Testing Plan
Verify build passes.