diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.html b/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.html index 59761fd6bf7..dd3226de280 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.html +++ b/lib/process-services-cloud/src/lib/form/components/widgets/people/people-cloud.widget.html @@ -7,7 +7,6 @@ - + + {{ title | translate }} { let loader: HarnessLoader; @@ -92,21 +93,21 @@ describe('PeopleCloudComponent', () => { loader = TestbedHarnessEnvironment.loader(fixture); }); - it('should populate placeholder when title is present', () => { + it('should populate label when title is present', async () => { component.title = 'TITLE_KEY'; fixture.detectChanges(); - const inputElement = element.querySelector('[data-automation-id="adf-people-cloud-search-input"]'); + const inputField = await loader.getHarness(MatFormFieldHarness.with({ selector: '.adf-people-cloud' })); - expect(inputElement.placeholder).toEqual('TITLE_KEY'); + expect(await inputField.getLabel()).toEqual('TITLE_KEY'); }); - it('should not populate placeholder when title is not present', () => { + it('should not populate label when title is not present', async () => { fixture.detectChanges(); - const inputElement = element.querySelector('[data-automation-id="adf-people-cloud-search-input"]'); + const inputField = await loader.getHarness(MatFormFieldHarness.with({ selector: '.adf-people-cloud' })); - expect(inputElement.placeholder).toEqual(''); + expect(await inputField.getLabel()).toBeNull(); }); describe('Search user', () => {