From 651f1e586a8e9f99aba842a0a08990820c879d9f Mon Sep 17 00:00:00 2001
From: Alec Rippberger <127791530+alec-livefront@users.noreply.github.com>
Date: Mon, 16 Sep 2024 17:01:38 -0500
Subject: [PATCH] PM-11468: Add data-testids for View Item pages (#11043)
* Add data test IDs for identity information.
* Add data test IDs for custom fields.
---
.../custom-fields/custom-fields-v2.component.html | 2 ++
.../view-identity-sections.component.html | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.html b/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.html
index 6c1b8ee5f1..8c6d9f9617 100644
--- a/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.html
+++ b/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.html
@@ -7,6 +7,7 @@
class="tw-border-secondary-300 [&_bit-form-field:last-of-type]:tw-mb-0"
*ngFor="let field of cipher.fields; let last = last"
[ngClass]="{ 'tw-mb-4': !last }"
+ data-testid="custom-field"
>
{{ field.name }}
@@ -19,6 +20,7 @@
showToast
[valueLabel]="field.name"
[appA11yTitle]="'copyValue' | i18n"
+ data-testid="copy-custom-field"
>
diff --git a/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.html b/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.html
index 29ccd5daa6..ec4580e31d 100644
--- a/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.html
+++ b/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.html
@@ -15,6 +15,7 @@
[appCopyClick]="cipher.identity.fullName"
showToast
[valueLabel]="'name' | i18n"
+ data-testid="copy-name"
>
@@ -41,6 +42,7 @@
[appCopyClick]="cipher.identity.company"
showToast
[valueLabel]="'company' | i18n"
+ data-testid="copy-company"
>
@@ -70,6 +72,7 @@
[appCopyClick]="cipher.identity.ssn"
showToast
[valueLabel]="'ssn' | i18n"
+ data-testid="copy-ssn"
>
@@ -96,6 +99,7 @@
[appCopyClick]="cipher.identity.passportNumber"
showToast
[valueLabel]="'passportNumber' | i18n"
+ data-testid="copy-passport"
>
@@ -109,6 +113,7 @@
[appCopyClick]="cipher.identity.licenseNumber"
showToast
[valueLabel]="'licenseNumber' | i18n"
+ data-testid="copy-license"
>
@@ -131,6 +136,7 @@
[appCopyClick]="cipher.identity.email"
showToast
[valueLabel]="'email' | i18n"
+ data-testid="copy-email"
>
@@ -144,6 +150,7 @@
[appCopyClick]="cipher.identity.phone"
showToast
[valueLabel]="'phone' | i18n"
+ data-testid="copy-phone"
>
@@ -164,6 +171,7 @@
[appCopyClick]="addressFields"
showToast
[valueLabel]="'address' | i18n"
+ data-testid="copy-address"
>