[ACS-8468] Remove string array from copyToClipboard

This commit is contained in:
Shivangi Shree
2026-07-16 12:29:57 +05:30
parent 3eed46904a
commit f134b8140a
3 changed files with 4 additions and 3 deletions
@@ -5,11 +5,12 @@
<mat-form-field <mat-form-field
class="adf-property-value" class="adf-property-value"
(dblclick)="copyToClipboard(property.displayValue)" (dblclick)="copyToClipboard(property.displayValue)"
[attr.data-automation-id]="'card-select-label-' + property.key" [attr.data-automation-id]="'card-select-field-' + property.key"
[title]="'CORE.METADATA.ACTIONS.COPY_TO_CLIPBOARD' | translate" [title]="'CORE.METADATA.ACTIONS.COPY_TO_CLIPBOARD' | translate"
> >
<mat-label <mat-label
class="adf-property-label" class="adf-property-label"
[attr.data-automation-id]="'card-select-label-' + property.key"
[ngClass]="{ [ngClass]="{
'adf-property-value-editable': isEditable, 'adf-property-value-editable': isEditable,
'adf-property-readonly-value': isReadonlyProperty 'adf-property-readonly-value': isReadonlyProperty
@@ -208,7 +208,7 @@ describe('CardViewSelectItemComponent', () => {
component.ngOnChanges({}); component.ngOnChanges({});
fixture.detectChanges(); fixture.detectChanges();
testingUtils.doubleClickByDataAutomationId(`card-select-label-${component.property.key}`); testingUtils.doubleClickByDataAutomationId(`card-select-field-${component.property.key}`);
fixture.detectChanges(); fixture.detectChanges();
expect(clipboardService.copyContentToClipboard).toHaveBeenCalledWith('Two', 'CORE.METADATA.ACCESSIBILITY.COPY_TO_CLIPBOARD_MESSAGE'); expect(clipboardService.copyContentToClipboard).toHaveBeenCalledWith('Two', 'CORE.METADATA.ACCESSIBILITY.COPY_TO_CLIPBOARD_MESSAGE');
@@ -194,7 +194,7 @@ export class CardViewSelectItemComponent extends BaseCardView<CardViewSelectItem
} }
} }
copyToClipboard(valueToCopy: string | string[] | Observable<string>) { copyToClipboard(valueToCopy: string | Observable<string>) {
if (this.copyToClipboardAction) { if (this.copyToClipboardAction) {
if (isObservable(valueToCopy)) { if (isObservable(valueToCopy)) {
valueToCopy.pipe(take(1)).subscribe((value) => { valueToCopy.pipe(take(1)).subscribe((value) => {