diff --git a/frontend/src/app/components/medical-sources-connected/medical-sources-connected.component.ts b/frontend/src/app/components/medical-sources-connected/medical-sources-connected.component.ts index 7337d698..6dc166cc 100644 --- a/frontend/src/app/components/medical-sources-connected/medical-sources-connected.component.ts +++ b/frontend/src/app/components/medical-sources-connected/medical-sources-connected.component.ts @@ -240,9 +240,11 @@ export class MedicalSourcesConnectedComponent implements OnInit { * @param tokenResponse * @param env */ - private getAccessTokenExpiration(tokenResponse: any): number + public getAccessTokenExpiration(tokenResponse: any): number { const now = Math.floor(Date.now() / 1000); + let expires_at = 0; + // Option 1 - using the expires_in property of the token response if (tokenResponse.expires_in) { diff --git a/frontend/src/app/widgets/dashboard-widget/dashboard-widget.component.spec.ts b/frontend/src/app/widgets/dashboard-widget/dashboard-widget.component.spec.ts index 8ed86fc0..27524ba2 100644 --- a/frontend/src/app/widgets/dashboard-widget/dashboard-widget.component.spec.ts +++ b/frontend/src/app/widgets/dashboard-widget/dashboard-widget.component.spec.ts @@ -123,8 +123,9 @@ describe('DashboardWidgetComponent', () => { "from": "Immunization", "where": {}, - "aggregation_params":["resourceType"], - "aggregation_type":"countBy" + "aggregations":{ + "count_by": "source_resource_type" + }, } }, { @@ -136,8 +137,9 @@ describe('DashboardWidgetComponent', () => { "from": "Claim", "where": {}, - "aggregation_params":["resourceType"], - "aggregation_type":"countBy" + "aggregations":{ + "count_by": "source_resource_type" + }, } }], "parsing": { diff --git a/frontend/src/lib/models/datatypes/human-name-model.spec.ts b/frontend/src/lib/models/datatypes/human-name-model.spec.ts index cd20df0d..c2afc2de 100644 --- a/frontend/src/lib/models/datatypes/human-name-model.spec.ts +++ b/frontend/src/lib/models/datatypes/human-name-model.spec.ts @@ -13,8 +13,9 @@ describe('HumanNameModel', () => { expectedHumanName.familyName = 'Windsor' expectedHumanName.suffix = '' expectedHumanName.use = 'maiden' - expectedHumanName.header = 'Peter, James Windsor' + // expectedHumanName.header = 'Peter, James Windsor' expect(new HumanNameModel(fixture)).toEqual(expectedHumanName); + expect('Peter, James Windsor').toEqual(expectedHumanName.displayName); }); });