1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-08 19:18:02 +01:00

add data attrs for send form

This commit is contained in:
jaasen-livefront 2024-09-23 15:18:30 -07:00
parent 0db179e974
commit 013ef3b82e
No known key found for this signature in database
4 changed files with 11 additions and 4 deletions

View File

@ -29,6 +29,8 @@ export class BitPasswordInputToggleDirective implements AfterContentInit, OnChan
@HostBinding("attr.title") title = this.i18nService.t("toggleVisibility"); @HostBinding("attr.title") title = this.i18nService.t("toggleVisibility");
@HostBinding("attr.aria-label") label = this.i18nService.t("toggleVisibility"); @HostBinding("attr.aria-label") label = this.i18nService.t("toggleVisibility");
@HostBinding("attr.test-id") testId = "toggle-visibility-for-password";
/** /**
* Click handler to toggle the state of the input type. * Click handler to toggle the state of the input type.
*/ */

View File

@ -16,7 +16,12 @@
<bit-label *ngIf="hasPassword">{{ "newPassword" | i18n }}</bit-label> <bit-label *ngIf="hasPassword">{{ "newPassword" | i18n }}</bit-label>
<input bitInput type="password" formControlName="password" /> <input bitInput type="password" formControlName="password" />
<button type="button" bitIconButton bitSuffix bitPasswordInputToggle></button> <button type="button" bitIconButton bitSuffix bitPasswordInputToggle></button>
<button type="button" bitIconButton="bwi-refresh" bitSuffix></button> <button
type="button"
bitIconButton="bwi-refresh"
bitSuffix
data-testid="regenerate-password"
></button>
<bit-hint>{{ "sendPasswordDescV2" | i18n }}</bit-hint> <bit-hint>{{ "sendPasswordDescV2" | i18n }}</bit-hint>
</bit-form-field> </bit-form-field>
<bit-form-control *ngIf="!disableHideEmail"> <bit-form-control *ngIf="!disableHideEmail">

View File

@ -23,7 +23,7 @@
<bit-form-field *ngIf="sendLink"> <bit-form-field *ngIf="sendLink">
<bit-label>{{ "sendLink" | i18n }}</bit-label> <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 <button
type="button" type="button"
bitSuffix bitSuffix

View File

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