From 2b25b50720c10cbd57b501698d605160f39f519d Mon Sep 17 00:00:00 2001 From: Dharan <14145706+dhrn@users.noreply.github.com> Date: Tue, 30 Nov 2021 22:05:49 +0530 Subject: [PATCH] [ADF-4915][Form] FormField: When required is set to true, asterisk apppears in placeholder text (#7399) * [ADF-4915][Form] FormField: When required is set to true, asterix appears in placeholder text * [ADF-4915][Form] FormField: When required is set to true, asterix appears in placeholder text --- lib/core/form/components/widgets/amount/amount.widget.html | 2 +- lib/core/form/components/widgets/amount/amount.widget.spec.ts | 4 +--- .../form/components/widgets/date-time/date-time.widget.html | 2 +- lib/core/form/components/widgets/date/date.widget.html | 2 +- .../widgets/multiline-text/multiline-text.widget.html | 2 +- lib/core/form/components/widgets/number/number.widget.html | 2 +- lib/core/form/components/widgets/text/text.widget.html | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/core/form/components/widgets/amount/amount.widget.html b/lib/core/form/components/widgets/amount/amount.widget.html index ea592567ec..198eae35db 100644 --- a/lib/core/form/components/widgets/amount/amount.widget.html +++ b/lib/core/form/components/widgets/amount/amount.widget.html @@ -3,7 +3,7 @@ [class.adf-readonly]="field.readOnly"> - + {{ currency }}   { fixture.detectChanges(); await fixture.whenStable(); - const requiredAsteriscElement = fixture.nativeElement.querySelector('.mat-placeholder-required'); - expect(requiredAsteriscElement.textContent).toContain('*'); const widgetPlaceholder = fixture.nativeElement.querySelector('label.mat-form-field-label'); - expect(widgetPlaceholder.textContent).toBe('Check Placeholder Text *'); + expect(widgetPlaceholder.textContent).toBe('Check Placeholder Text'); const widgetLabel = fixture.nativeElement.querySelector('label.adf-label'); expect(widgetLabel.textContent).toBe('Test Amount*'); const widgetPrefix = fixture.nativeElement.querySelector('div.mat-form-field-prefix'); diff --git a/lib/core/form/components/widgets/date-time/date-time.widget.html b/lib/core/form/components/widgets/date-time/date-time.widget.html index 6f377ae39b..6d6d4d5e56 100644 --- a/lib/core/form/components/widgets/date-time/date-time.widget.html +++ b/lib/core/form/components/widgets/date-time/date-time.widget.html @@ -1,5 +1,5 @@
- + - + - +