mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
Refactor to use "data-e2e" attributes in code to make selecting fields/buttons easier in e2e tests
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
formControlName="email"
|
||||
placeholder="{{'login.form.email' | translate}}"
|
||||
required
|
||||
type="email">
|
||||
type="email"
|
||||
data-e2e="email">
|
||||
<label class="sr-only">{{"login.form.password" | translate}}</label>
|
||||
<input [attr.aria-label]="'login.form.password' |translate"
|
||||
autocomplete="off"
|
||||
@@ -17,12 +18,13 @@
|
||||
placeholder="{{'login.form.password' | translate}}"
|
||||
formControlName="password"
|
||||
required
|
||||
type="password">
|
||||
type="password"
|
||||
data-e2e="password">
|
||||
<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"
|
||||
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit" data-e2e="login-button"
|
||||
[disabled]="!form.valid"><i class="fas fa-sign-in-alt"></i> {{"login.form.submit" | translate}}</button>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user