From 735e5819327e977802c0ed7baec1a2e4182a4980 Mon Sep 17 00:00:00 2001 From: Jatin Chugh <105338943+jatin2008@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:41:29 +0530 Subject: [PATCH] [ACS-4128] Undo functionality added for input in Perform Actions after selecting an action and it works after destnation folder change in Create/Edit a rule in Manage Rules (#8402) * undo functionality added for input after selecting destination folder for Create and Edit a rule * review comments addressed and added 3 more test cases * used built in type KeyboardEvent instead of interface and combining 2 if conditions - shorten the code * removed duplicate line of code * removed duplicate code from test cases * redundant code removed for render chips for multivalue properties test cases using resuable function * code smell reduction --- .../card-view-textitem.component.html | 3 +- .../card-view-textitem.component.spec.ts | 106 +++++++++++------- .../card-view-textitem.component.ts | 6 + 3 files changed, 75 insertions(+), 40 deletions(-) diff --git a/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.html b/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.html index 5e7faaef5b..9d6e126a20 100644 --- a/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.html +++ b/lib/core/src/lib/card-view/components/card-view-textitem/card-view-textitem.component.html @@ -18,7 +18,8 @@ matTooltipShowDelay="1000" [matTooltip]="'CORE.METADATA.ACTIONS.COPY_TO_CLIPBOARD' | translate" [matTooltipDisabled]="isEditable" - [attr.data-automation-id]="'card-textitem-value-' + property.key"> + [attr.data-automation-id]="'card-textitem-value-' + property.key" + (keydown)="undoText($event)">