mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 05:23:06 +00:00

Now that we use initialNavigation: 'enabledBlocking', pages can appear to be loaded before some functionality is fully active. In some cases this trips up Cypress, and it tries to interact with the app too soon. We address this by introducing a new dsBrowserOnly pipe in order to defer the data-test attributes Cypress relies on to CSR.
31 lines
1.4 KiB
HTML
31 lines
1.4 KiB
HTML
<form class="form-login"
|
|
(ngSubmit)="submit()"
|
|
[formGroup]="form" novalidate>
|
|
<label class="sr-only">{{"login.form.email" | translate}}</label>
|
|
<input [attr.aria-label]="'login.form.email' |translate"
|
|
autocomplete="off"
|
|
autofocus
|
|
class="form-control form-control-lg position-relative"
|
|
formControlName="email"
|
|
placeholder="{{'login.form.email' | translate}}"
|
|
required
|
|
type="email"
|
|
[attr.data-test]="'email' | dsBrowserOnly">
|
|
<label class="sr-only">{{"login.form.password" | translate}}</label>
|
|
<input [attr.aria-label]="'login.form.password' |translate"
|
|
autocomplete="off"
|
|
class="form-control form-control-lg position-relative mb-3"
|
|
placeholder="{{'login.form.password' | translate}}"
|
|
formControlName="password"
|
|
required
|
|
type="password"
|
|
[attr.data-test]="'password' | dsBrowserOnly">
|
|
<div *ngIf="(error | async) && hasError" class="alert alert-danger" role="alert"
|
|
@fadeOut>{{ (error | async) | translate }}</div>
|
|
<div *ngIf="(message | async) && hasMessage" class="alert alert-info" role="alert"
|
|
@fadeOut>{{ (message | async) | translate }}</div>
|
|
|
|
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit" [attr.data-test]="'login-button' | dsBrowserOnly"
|
|
[disabled]="!form.valid"><i class="fas fa-sign-in-alt"></i> {{"login.form.submit" | translate}}</button>
|
|
</form>
|