[CST-15592] improve tests, add attributes for testing, fix wrong references

(cherry picked from commit 69f618e856)
This commit is contained in:
FrancescoMolinaro
2024-07-23 17:13:20 +02:00
committed by github-actions[bot]
parent 48d74ee2cd
commit 75981cf46e
9 changed files with 50 additions and 17 deletions

View File

@@ -3,7 +3,7 @@
<div *ngIf="(healthResponse | async) && (healthInfoResponse | async)">
<ul ngbNav #nav="ngbNav" [activeId]="'status'" class="nav-tabs">
<li [ngbNavItem]="'status'" role="presentation">
<a ngbNavLink>{{'health-page.status-tab' | translate}}</a>
<a data-test="health-page.status-tab" ngbNavLink>{{'health-page.status-tab' | translate}}</a>
<ng-template ngbNavContent>
<div id="status">
<ds-health-panel [healthResponse]="(healthResponse | async)"></ds-health-panel>
@@ -11,7 +11,7 @@
</ng-template>
</li>
<li [ngbNavItem]="'info'" role="presentation">
<a ngbNavLink>{{'health-page.info-tab' | translate}}</a>
<a data-test="health-page.info-tab" ngbNavLink>{{'health-page.info-tab' | translate}}</a>
<ng-template ngbNavContent>
<div id="info">
<ds-health-info [healthInfoResponse]="(healthInfoResponse | async)"></ds-health-info>

View File

@@ -6,5 +6,6 @@
(click)="activate($event)"
(keyup.space)="activate($event)"
(keyup.enter)="activate($event)"
[attr.data-test]="item.text"
>{{item.text | translate}}</a>
<span *ngIf="item.disabled" class="nav-item nav-link disabled">{{item.text | translate}}</span>
<span *ngIf="item.disabled" [attr.data-test]="item.text" class="nav-item nav-link disabled">{{item.text | translate}}</span>