Skip to content

Conversation

fboulnois
Copy link
Contributor

@fboulnois fboulnois commented Sep 11, 2025

Warning

DO NOT MERGE UNTIL 2025-09-29. Requires DataBiosphere/consent#2647 to be merged first.

Addresses

https://broadworkbench.atlassian.net/browse/DT-1329

Summary

Enables RAS in production. The cleanup for this code is explicitly called out in DT-2116.


Have you read Terra's Contributing Guide lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

})
})

describe('Test environment-disabled cases', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

RAS is enabled in all environments, so these tests no longer make sense.

mount(<ResearcherStatus user={userWithCard} pageProps={pageProps} />)
cy.contains('Researcher Status')
cy.contains('eRA Commons Account')
cy.contains('RAS Account')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Profile page will always point to RAS account

import StackdriverReporter from 'src/libs/stackdriverReporter'
import { Config } from 'src/libs/config'
import { MemoryRouter, Route } from 'react-router-dom'
import { MemoryRouter, Route, Router } from 'react-router-dom'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Router should be imported from react-router-dom in v5

@@ -96,7 +96,8 @@ export default function ERACommons(props) {
window.location.href = await AuthenticateNIH.getECMProviderAuthUrl(origin, redirectTo)
}
catch (error) {
const errorMessage = 'Error from Authentication Provider: ' + error?.response?.data?.message + ': ' + currentUser.email
const userEmail = currentUser?.email || 'unknown user'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is possible that the email is empty in tests.

list: processVoteHistoryRowData(voteHistory),
sort,
}))
// eslint-disable-next-line react-hooks/exhaustive-deps
Copy link
Contributor Author

Choose a reason for hiding this comment

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

drive-by fix

Copy link
Contributor

@rushtong rushtong left a comment

Choose a reason for hiding this comment

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

Looks good, thank you! Looking forward to the cleanup task.

Copy link
Contributor

@kevinmarete kevinmarete left a comment

Choose a reason for hiding this comment

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

Looks good!

@fboulnois fboulnois changed the title [DT-1329] Enable RAS in production [RAS][DT-1329] Enable RAS in production Sep 12, 2025
@fboulnois fboulnois added the RAS Switches from ERA commons to RAS authentication for account linking. label Sep 12, 2025
@fboulnois fboulnois changed the title [RAS][DT-1329] Enable RAS in production [DT-1329] Enable RAS in production Sep 12, 2025
@fboulnois fboulnois force-pushed the fb-dt-1329-enable-ras branch from a423e38 to d1374e4 Compare September 29, 2025 15:16
Copy link

@fboulnois fboulnois added this pull request to the merge queue Sep 29, 2025
Merged via the queue into develop with commit 5034723 Sep 29, 2025
11 checks passed
@fboulnois fboulnois deleted the fb-dt-1329-enable-ras branch September 29, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RAS Switches from ERA commons to RAS authentication for account linking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants