[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
class="adf-property-value"
(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"
>
<mat-label
class="adf-property-label"
[attr.data-automation-id]="'card-select-label-' + property.key"
[ngClass]="{
'adf-property-value-editable': isEditable,
'adf-property-readonly-value': isReadonlyProperty
@@ -208,7 +208,7 @@ describe('CardViewSelectItemComponent', () => {
component.ngOnChanges({});
fixture.detectChanges();
testingUtils.doubleClickByDataAutomationId(`card-select-label-${component.property.key}`);
testingUtils.doubleClickByDataAutomationId(`card-select-field-${component.property.key}`);
fixture.detectChanges();
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 (isObservable(valueToCopy)) {
valueToCopy.pipe(take(1)).subscribe((value) => {