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

Mmt 3936: URS Login/Token Refresh Results in Blank Page #1327

Merged
merged 6 commits into from
Dec 9, 2024
Merged

Conversation

mandyparson
Copy link
Contributor

@mandyparson mandyparson commented Nov 26, 2024

Overview

What is the feature?

This ticket does not have reproduction steps and the only thing that I was able to find upon inspect is that this behavior occurs when switching between SIT and either UAT or PROD. Needed a way to keep the page from hanging when a user toggles between the two

What is the Solution?

It did appear to be an issue with cookies. Added the environment to the MMT_COOKIE label to overcome

What areas of the application does this impact?

List impacted areas.

Anywhere that used MMT_COOKIE

Reproduction steps

  • **Environment for testing: local pointing to SIT and mmt.SIT
  • **Collection to test with:none
  1. open your localhost in one tab and your SIT on the other on main branch. Notice that they will both start to load up again when you delete all your cookies.
    2.Now do the same when switched onto my branch. You'll notice that when you delete cookies on one side, the other does not automatically load up again.

Attachments

None.

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codecov-commenter
Copy link

codecov-commenter commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.68%. Comparing base (53c2a92) to head (538c233).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1327      +/-   ##
==========================================
- Coverage   97.68%   97.68%   -0.01%     
==========================================
  Files         366      365       -1     
  Lines        5757     5750       -7     
  Branches     1199     1208       +9     
==========================================
- Hits         5624     5617       -7     
  Misses        132      132              
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@cgokey cgokey left a comment

Choose a reason for hiding this comment

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

PR looks good. We should just not use relative paths in imports, so these should be changed back to absolute paths.

@mandyparson mandyparson requested a review from cgokey December 6, 2024 19:59
@@ -9,7 +9,7 @@ import errorLogger from '@/js/utils/errorLogger'
import getTemplates from '@/js/utils/getTemplates'
import deleteTemplate from '@/js/utils/deleteTemplate'
import NotificationsContext from '@/js/context/NotificationsContext'
import MMT_COOKIE from '@/js/constants/mmtCookie'
import MMT_COOKIE from 'sharedConstants/mmtCookie'
Copy link
Collaborator

@cgokey cgokey Dec 9, 2024

Choose a reason for hiding this comment

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

does @/sharedConstants/mmtCookie not work ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. That's only for files within static/src. I had to create a new route.

Copy link
Contributor Author

@mandyparson mandyparson Dec 9, 2024

Choose a reason for hiding this comment

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

This variable was needed for files within serverless/src as well and Matthew said that we need to keep the static/src and serverless/src separate (no shared constantsor utils). To solve this, I needed to cretae a new folder called sharedConstants which is similar to sharedUtils.

@mandyparson mandyparson merged commit 0aaea5c into main Dec 9, 2024
5 of 7 checks passed
@mandyparson mandyparson deleted the MMT-3936 branch December 9, 2024 20:22
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