From c493165de3a2d015d47483cbe84ba43c4e0e8c22 Mon Sep 17 00:00:00 2001 From: Marc Uhart Date: Wed, 2 Aug 2023 12:26:38 -0700 Subject: [PATCH] Fix front-end unit tests (#294) --- .../pidp/src/app/features/portal/portal.page.spec.ts | 2 ++ .../components/form-section/form-section.component.ts | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/workspace/apps/pidp/src/app/features/portal/portal.page.spec.ts b/workspace/apps/pidp/src/app/features/portal/portal.page.spec.ts index 7a31cd32f..20b41e3d4 100644 --- a/workspace/apps/pidp/src/app/features/portal/portal.page.spec.ts +++ b/workspace/apps/pidp/src/app/features/portal/portal.page.spec.ts @@ -22,6 +22,7 @@ import { KeycloakService } from 'keycloak-angular'; import { APP_CONFIG, APP_DI_CONFIG } from '@app/app.config'; import { PartyService } from '@app/core/party/party.service'; +import { ToastService } from '@app/core/services/toast.service'; import { BcProviderEditInitialStateModel } from '../access/pages/bc-provider-edit/bc-provider-edit.component'; import { BcProviderEditResource } from '../access/pages/bc-provider-edit/bc-provider-edit.resource'; @@ -86,6 +87,7 @@ describe('PortalPage', () => { provideAutoSpy(BcProviderEditResource), provideAutoSpy(EndorsementsResource), provideAutoSpy(KeycloakService), + provideAutoSpy(ToastService), ], }); diff --git a/workspace/libs/shared/ui/src/lib/components/form-section/form-section.component.ts b/workspace/libs/shared/ui/src/lib/components/form-section/form-section.component.ts index 37b01a095..9b605a88e 100644 --- a/workspace/libs/shared/ui/src/lib/components/form-section/form-section.component.ts +++ b/workspace/libs/shared/ui/src/lib/components/form-section/form-section.component.ts @@ -6,6 +6,7 @@ import { Input, Output, QueryList, + forwardRef, } from '@angular/core'; import { @@ -37,9 +38,13 @@ export class FormSectionComponent { * Detect whether the section is being used to display contextual * help for a specific form section, or removing a control (default) */ - @ContentChildren(ContextHelpTitleDirective, { descendants: false }) + @ContentChildren(forwardRef(() => ContextHelpTitleDirective), { + descendants: false, + }) public contextHelpTitleChildren?: QueryList; - @ContentChildren(ContextHelpContentDirective, { descendants: false }) + @ContentChildren(forwardRef(() => ContextHelpContentDirective), { + descendants: false, + }) public contextHelpContentChildren?: QueryList; public constructor() {