Skip to content

LG-11743 - Ensure personal key works for GPO users#9791

Merged
jmax-gsa merged 4 commits intomainfrom
jmax/LG-11743-personal-key-issued-after-gpo-doesnt-work
Dec 20, 2023
Merged

LG-11743 - Ensure personal key works for GPO users#9791
jmax-gsa merged 4 commits intomainfrom
jmax/LG-11743-personal-key-issued-after-gpo-doesnt-work

Conversation

@jmax-gsa
Copy link
Contributor

@jmax-gsa jmax-gsa commented Dec 18, 2023

🎫 Ticket

LG-11743

🛠 Summary of changes

Added a spec to check profile reactivation for GPO-verified users.

This is a bug reported by and believed fixed by Matt Hinz (see LG-11549), but we wanted a feature spec to test this exact scenario.

Co-authored by: Matt Hinz matt.hinz@gsa.gov

📜 Testing Plan

[ ] Run the new feature spec using the command below
[ ] Verify that the system walks through creating a GPO-verified user, resetting their password, and then re-activating their profile with the personal key generated during GPO verification.

SHOW_BROWSER=true bundle exec rspec spec/features/users/profile_recovery_for_gpo_verified_spec.rb

@jmax-gsa jmax-gsa changed the title LG-11743 - Personal key doesn't work for GPO users LG-11743 - Ensure personal key works for GPO users Dec 18, 2023
@jmax-gsa jmax-gsa marked this pull request as ready for review December 18, 2023 21:15
@jmax-gsa jmax-gsa requested review from a team and matthinz December 18, 2023 21:16
Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Spec to check profile reactivation for GPO-verified users. This is a
bug reported by and believed fixed by Matt Hinz (see LG-11549), but we
wanted a feature spec to test this exact scenario.

changelog: Internal,Feature Specs,Added a feature spec for an issue in LG-11549

Co-authored by: Matt Hinz <matt.hinz@gsa.gov>
@jmax-gsa jmax-gsa force-pushed the jmax/LG-11743-personal-key-issued-after-gpo-doesnt-work branch from 970771e to d16e7f3 Compare December 19, 2023 11:24
@jmax-gsa
Copy link
Contributor Author

Dump of the test running:

johnamaxwell@FCOH2J-DJ09KMR4 identity-idp % bundle exec rails db:reset; SHOW_BROWSER=true bundle exec rspec spec/features/users/profile_recovery_for_gpo_verified_spec.rb 
<=true bundle exec rspec spec/features/users/profile_recovery_for_gpo_verified_spec.rb 
Dropped database 'identity_idp_development'
Dropped database 'identity_idp_worker_jobs_development'
Dropped database 'identity_idp_test'
Dropped database 'identity_idp_worker_jobs_test'
Created database 'identity_idp_development'
Created database 'identity_idp_worker_jobs_development'
Created database 'identity_idp_test'
Created database 'identity_idp_worker_jobs_test'

Randomized with seed 22045

Password recovery via personal key for a GPO-verified user
                       Bundling JavaScript and stylesheets... ✨ Done!
Rack::Handler is deprecated and replaced by Rackup::Handler
2023-12-19 07:17:30 INFO Selenium [:logger_info] Details on how to use and modify Selenium logger:
  https://selenium.dev/documentation/webdriver/troubleshooting/logging

2023-12-19 07:17:30 WARN Selenium [:selenium_manager] The chromedriver version (120.0.6099.71) detected in PATH at /opt/homebrew/bin/chromedriver might not be compatible with the detected chrome version (120.0.6099.109); currently, chromedriver 120.0.6099.109 is recommended for chrome 120.*, so it is advised to delete the driver in PATH and retry 
  lets them reactivate their profile with their personal key

Top 0 slowest examples (0 seconds, 0.0% of total time):

Finished in 41.71 seconds (files took 1.8 seconds to load)
1 example, 0 failures

Randomized with seed 22045

johnamaxwell@FCOH2J-DJ09KMR4 identity-idp % 

Copy link
Contributor

@matthinz matthinz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something about this is not testing the exact scenario. I'm checking now to see if it is a "me" problem (basically, did I describe the issue correctly)

Changed literals 'Sign out' and 'Continue' to reference strings files.
Used less spec infrastructure and more direct browser-driving.
Copy link
Contributor

@matthinz matthinz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, with one minor nit

I tested this against and verified that the test failed on an older commit on main (d67eaa2) and passes on current main.

RSpec.feature 'Password recovery via personal key for a GPO-verified user' do
include IdvStepHelper

let(:email) { 'cool_beagle@test.org' }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit: can we make this @example.com?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jmax-gsa jmax-gsa merged commit c603883 into main Dec 20, 2023
@jmax-gsa jmax-gsa deleted the jmax/LG-11743-personal-key-issued-after-gpo-doesnt-work branch December 20, 2023 20:13
@jmdembe jmdembe mentioned this pull request Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants