Skip to content

Commit

Permalink
Merge branch 'development' into db-pop-dates
Browse files Browse the repository at this point in the history
  • Loading branch information
devonbush authored Jan 6, 2025
2 parents 280d865 + 1a5e7e9 commit bbbeee8
Show file tree
Hide file tree
Showing 18 changed files with 201 additions and 352 deletions.
4 changes: 2 additions & 2 deletions api-admin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ dependencies {
implementation 'org.liquibase:liquibase-core:4.30.0'
implementation 'io.jsonwebtoken:jjwt-api:0.12.6'

implementation 'net.javacrumbs.shedlock:shedlock-spring:6.0.1'
implementation 'net.javacrumbs.shedlock:shedlock-spring:6.0.2'
implementation 'net.javacrumbs.shedlock:shedlock-provider-jdbc-template:5.16.0'

runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5',
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6',
// Uncomment the next line if you want to use RSASSA-PSS (PS256, PS384, PS512) algorithms:
//'org.bouncycastle:bcprov-jdk15on:1.70',
'io.jsonwebtoken:jjwt-jackson:0.11.5' // or 'io.jsonwebtoken:jjwt-gson:0.11.5' for gson
Expand Down
2 changes: 1 addition & 1 deletion api-participant/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies {
implementation 'com.auth0:java-jwt:4.4.0'

implementation 'io.jsonwebtoken:jjwt-api:0.12.6'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5',
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6',
// Uncomment the next line if you want to use RSASSA-PSS (PS256, PS384, PS512) algorithms:
//'org.bouncycastle:bcprov-jdk15on:1.70',
'io.jsonwebtoken:jjwt-jackson:0.11.5' // or 'io.jsonwebtoken:jjwt-gson:0.11.5' for gson
Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies {
implementation 'com.sendgrid:sendgrid-java:4.10.3'
implementation 'com.auth0:java-jwt:4.4.0'
implementation group: "bio.terra", name: "datarepo-jakarta-client", version: "1.565.0-SNAPSHOT"
implementation 'com.google.auth:google-auth-library-oauth2-http:1.18.0'
implementation 'com.google.auth:google-auth-library-oauth2-http:1.30.1'
implementation 'org.apache.poi:poi:5.2.3'
implementation 'org.apache.poi:poi-ooxml:5.2.3'
implementation 'com.azure:azure-storage-blob:12.29.0'
Expand Down
490 changes: 161 additions & 329 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@types/node": "^18.19.39",
"@types/papaparse": "^5.3.14",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@vitejs/plugin-react-swc": "^3.7.0",
"@vitejs/plugin-react-swc": "^3.7.2",
"babel-jest": "^29.7.0",
"chokidar-cli": "^3.0.0",
"cross-env": "^7.0.3",
Expand All @@ -32,7 +32,7 @@
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-unused-imports": "^3.0.0",
"jest": "^29.7.0",
Expand Down
8 changes: 4 additions & 4 deletions terraform/gcp/k8s/environments/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ b2c:
policyName: B2C_1A_ddp_participant_signup_signin_demo-prod
changePasswordPolicyName: B2C_1A_ddp_participant_change_password_demo-prod
trccproject:
tenantName: does-not-exist
clientId: does-not-exist
policyName: does-not-exist
changePasswordPolicyName: does-not-exist
tenantName: trccproject
clientId: 882e287c-8586-456e-8004-b7ff16da3578
policyName: B2C_1A_ddp_participant_signup_signin_trcc-prod
changePasswordPolicyName: B2C_1A_ddp_participant_signup_signin_trcc-prod
7 changes: 6 additions & 1 deletion ui-admin/src/navbar/AdminSidebar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ const testConfig: Config = {
participantApiHostname: '',
participantUiHostname: '',
deploymentZone: 'live',
systemSettings: {} as SystemSettings
systemSettings: {
maintenanceModeEnabled: false,
maintenanceModeMessage: '',
maintenanceModeBypassPhrase: '',
disableScheduledJobs: false
}
}
test('renders the superuser menu for superusers', async () => {
const { RoutedComponent } = setupRouterTest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test('renders a list of changes', async () => {
createdAt: 0,
portalId: 'portal1',
portalEnvironmentChange: '{"key": "value"}',
environmentName: 'live'
environmentName: 'sandbox'
}])
const portal = mockPortal()
renderInPortalRouter(portal, <PortalChangeHistoryView portal={portal}/>, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ test('renders enrollee profile', async () => {

expect(screen.getByText(`${enrollee.profile.givenName} ${enrollee.profile.familyName}`)).toBeInTheDocument()
expect(screen.getByText(dateToDefaultString(enrollee.profile.birthDate))).toBeInTheDocument()
expect(screen.getByText(enrollee.profile.mailingAddress.street1)).toBeInTheDocument()
expect(screen.getByText(enrollee.profile.mailingAddress!.street1)).toBeInTheDocument()
// e.g., Boston, MA 02120
expect(screen.getByText(
`${mailingAddress.city}, ${mailingAddress.state} ${mailingAddress.postalCode}`
`${mailingAddress!.city}, ${mailingAddress!.state} ${mailingAddress!.postalCode}`
)).toBeInTheDocument()
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ const mockWithrawnEnrolleeApi = () => {
.mockResolvedValue([{
shortcode: 'HDGONE',
userData: '{"createdAt": 345, "username": "good@bye.com"}',
createdAt: 123
createdAt: 123,
note: 'some reason',
reason: 'PARTICIPANT_REQUEST'
}])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import { waitFor, screen } from '@testing-library/react'
test('renders list', async () => {
const studyEnvContext = mockStudyEnvContext()
jest.spyOn(Api, 'fetchWithdrawnEnrollees').mockResolvedValue([
{ shortcode: 'BLEH', userData: '{"username": "foo@bar.com", "createdAt": 0}', createdAt: 123 }
{
shortcode: 'BLEH', userData: '{"username": "foo@bar.com", "createdAt": 0}', createdAt: 123,
note: 'some reason', reason: 'PARTICIPANT_REQUEST'
}
])
renderInPortalRouter(studyEnvContext.portal,
<WithdrawnEnrolleeList studyEnvContext={studyEnvContext} />)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ describe('ItemDisplay', () => {

const answerMap: Record<string, Answer> = {}
answerMap[answer.questionStableId] = answer
render(<AnswerEditHistory
question={question} answer={answer} editHistory={[firstChangeRecord, secondChangeRecord]}/>)
render(<AnswerEditHistory supportedLanguages={[]} question={question}
answer={answer} editHistory={[firstChangeRecord, secondChangeRecord]}/>)

expect(screen.getByText('Answered on', { exact: false })).toBeInTheDocument()
expect(screen.getAllByText('Edited on', { exact: false })).toHaveLength(2)
Expand Down
5 changes: 3 additions & 2 deletions ui-admin/src/test-utils/user-mocking-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const mockAdminUserWithPerms = (portalId: string, perms: string[]): Admin
portalId,
portalAdminUserRoles: [],
roles: [{
id: 'r1',
id: 'role1',
name: 'role1',
description: 'role1',
displayName: 'role1',
Expand All @@ -47,7 +47,8 @@ export const mockAdminUserWithPerms = (portalId: string, perms: string[]): Admin
permissionName: perm,
permissionDescription: perm
}))
}]
}],
portalAdminUserRoles: []
}
]
}
Expand Down
4 changes: 3 additions & 1 deletion ui-admin/src/user/AdminUserDetail.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const mockRoleManager = {
portalAdminUsers: [{
portalId: 'portal2',
roles: [{
id: 'role1',
name: 'study_admin',
displayName: 'Study Admin',
description: 'Can manage studies',
Expand All @@ -27,7 +28,8 @@ const mockRoleManager = {
displayName: 'manage team roles',
description: 'roles stuff'
}]
}]
}],
portalAdminUserRoles: []
}]
}

Expand Down
2 changes: 2 additions & 0 deletions ui-admin/src/user/UserList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe('UserList', () => {
...mockAdminUser(false),
username: 'staff@test.com',
portalAdminUsers: [{
portalAdminUserRoles: [],
portalId: 'portal2',
roles: []
}]
Expand Down Expand Up @@ -58,6 +59,7 @@ describe('UserList', () => {
...mockAdminUser(false),
username: 'staff@test.com',
portalAdminUsers: [{
portalAdminUserRoles: [],
portalId: 'portal2',
roles: []
}]
Expand Down
2 changes: 1 addition & 1 deletion ui-admin/src/util/tableUtils.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const TestTableComponent = ({ initialValue, initialData }: {

return <div>
<ColumnVisibilityControl table={table}/>
<DownloadControl table={table} fileName={'test'}/>
<DownloadControl buttonClass={''} table={table} fileName={'test'}/>
{ basicTableLayout(table, { filterable: true }) }
</div>
}
Expand Down
3 changes: 2 additions & 1 deletion ui-participant/src/test-utils/test-participant-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ export const mockSurvey = (stableId: string): Survey => {
stableId,
version: 1,
surveyType: 'RESEARCH',
blurb: 'This is a survey'
blurb: 'This is a survey',
recurrenceType: 'NONE'
}
}

Expand Down
1 change: 1 addition & 0 deletions ui-participant/src/test-utils/test-portal-factory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const mockLocalSiteContent = (): LocalSiteContent => {
export const mockHtmlPage = (): HtmlPage => {
return {
title: 'mock home page',
minimalNavbar: false,
path: '/',
sections: []
}
Expand Down

0 comments on commit bbbeee8

Please sign in to comment.