[PM-12561] - add data attrs for send form (#11209)

* add data attrs for send form

* Add data-testid for toggle view password

* Revert "Add data-testid for toggle view password"

This reverts commit bd6fcc8c1b.

* move dataid to component

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
Jordan Aasen 2024-09-25 05:03:42 -07:00 committed by GitHub
parent d587be1831
commit cd9045483b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 4 deletions

View File

@ -15,12 +15,19 @@
<bit-label *ngIf="!hasPassword">{{ "password" | i18n }}</bit-label>
<bit-label *ngIf="hasPassword">{{ "newPassword" | i18n }}</bit-label>
<input bitInput type="password" formControlName="password" />
<button type="button" bitIconButton bitSuffix bitPasswordInputToggle></button>
<button
data-testid="toggle-visibility-for-password"
type="button"
bitIconButton
bitSuffix
bitPasswordInputToggle
></button>
<button
type="button"
bitIconButton="bwi-generate"
bitSuffix
[appA11yTitle]="'generatePassword' | i18n"
data-testid="generate-password"
></button>
<bit-hint>{{ "sendPasswordDescV2" | i18n }}</bit-hint>
</bit-form-field>

View File

@ -23,7 +23,7 @@
<bit-form-field *ngIf="sendLink">
<bit-label>{{ "sendLink" | i18n }}</bit-label>
<input bitInput type="text" [value]="sendLink" readonly />
<input data-testid="send-link" bitInput type="text" [value]="sendLink" readonly />
<button
type="button"
bitSuffix

View File

@ -1,8 +1,8 @@
<bit-section [formGroup]="sendFileDetailsForm">
<div *ngIf="config.mode === 'edit'">
<div bitTypography="body2" class="tw-text-muted">{{ "file" | i18n }}</div>
<div>{{ originalSendView.file.fileName }}</div>
<div class="tw-text-muted">{{ originalSendView.file.sizeName }}</div>
<div data-testid="file-name">{{ originalSendView.file.fileName }}</div>
<div data-testid="file-size" class="tw-text-muted">{{ originalSendView.file.sizeName }}</div>
</div>
<bit-form-field *ngIf="config.mode !== 'edit'">
<bit-label for="file">{{ "fileToShare" | i18n }}</bit-label>