Skip to content
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

INT B-19903 unlocking a move #12677

Merged
merged 8 commits into from
May 15, 2024

Conversation

danieljordan-caci
Copy link
Contributor

Agility ticket

Summary

When setting up the functionality of an office user locking a move when they navigate into it, this sets the stage for when an office user needs to unlock that move. Currently there are two ways an office user can unlock a move:

  1. Navigate to their respective queue (TOO -> MovesQueue, TIO -> PaymentRequestQueue, SC -> ServicesCounselingQueue)
  2. Logout

This PR does the following:

  • adds two service objects, UnlockMove and CheckForLockedMovesAndUnlock to be run for each scenario of an office user unlocking a move
  • adds in logic checks to call UnlockMove when checks return true when loading up the queue list
  • calls checkForLockedMovesAndUnlock when an office user logs out
  • adds relevant tests

How to test

This is a little tricky to test, so it is best to use two browsers that don't share cookies (I use one Chrome and one Safari - you could also do an incognito browser and one not)

  1. Prior to firing up server & client, in your envrc change FEATURE_FLAG_MOVE_LOCK=true
  2. Now run make server_run and make client_run
  3. (OfficeUser1) Log in as an office user for each role and navigate into a move, but don't log out
  4. (OfficeUser2) In your other browser log in as a different user and you should see these moves have a lock icon next to them in the queue
  5. (OfficeUser1) Navigate back to your queue
  6. (OfficeUser2) Refresh your screen - the lock icons should be gone
  7. (OfficeUser1) Navigate back into a move
  8. (OfficeUser2) Refresh your screen - lock icon should be shown next to the move
  9. (OfficeUser1) Logout
  10. (OfficeUser2) Refresh your screen - lock icon should be gone

@danieljordan-caci danieljordan-caci added Mountain Movers Movin' Mountains 1 Sprint at a time INTEGRATION Slated for Integration Testing labels May 14, 2024
@danieljordan-caci danieljordan-caci self-assigned this May 14, 2024
@danieljordan-caci danieljordan-caci requested a review from a team as a code owner May 14, 2024 21:01
Copy link
Contributor

@cameroncaci cameroncaci left a comment

Choose a reason for hiding this comment

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

2 comments, 1 a request to add err and user to logger, and another to just ask a question

pkg/handlers/authentication/auth.go Outdated Show resolved Hide resolved
pkg/handlers/ghcapi/queues.go Show resolved Hide resolved
Copy link
Contributor

@traskowskycaci traskowskycaci left a comment

Choose a reason for hiding this comment

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

Worked exactly as expected and looks neat. Nice!

@danieljordan-caci danieljordan-caci merged commit 7169783 into integrationTesting May 15, 2024
30 checks passed
@danieljordan-caci danieljordan-caci deleted the INT-B-19903-unlocking-a-move branch May 15, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INTEGRATION Slated for Integration Testing Mountain Movers Movin' Mountains 1 Sprint at a time
Development

Successfully merging this pull request may close these issues.

None yet

3 participants