Added Classes and Data Attributes to package-inspection for e2e testing

This commit is contained in:
Nino
2024-03-20 12:06:05 +01:00
parent 65f43d22ee
commit 56bb784c83
2 changed files with 8 additions and 4 deletions

View File

@@ -26,7 +26,7 @@
</span>
</ng-template>
</div>
<div class="text-right" *ngIf="!packageDetails?.package?.features?.['annotation']; else annotationTmpl">
<div data-which="Statusmeldung" class="text-right" *ngIf="!packageDetails?.package?.features?.['annotation']; else annotationTmpl">
<ng-container *ngIf="(packageDetails.package.arrivalStatus | arrivalStatus) === 'Fehlt'">
<button
class="isa-icon-button mr-2"
@@ -52,12 +52,13 @@
<div
class="isa-label text-white font-bold page-package-details__arrival-status"
[class]="packageDetails.package.arrivalStatus | arrivalStatusColorClass"
data-what="arrival-status"
>
{{ packageDetails.package.arrivalStatus | arrivalStatus }}
</div>
</div>
<ng-template #annotationTmpl>
<div class="text-right text-[#5A728A] col-span-2">
<div class="page-package-details__annotation text-right text-[#5A728A] col-span-2" data-what="annotation">
{{ packageDetails?.package?.features?.['annotation'] }}
</div>
</ng-template>

View File

@@ -11,15 +11,18 @@
{{ package?.estimatedDeliveryDate | date }}
</div>
<div class="w-32 page-package-list-item__items-count">{{ package?.items ?? '-' }} <span class="font-normal">Exemplare</span></div>
<div class="text-right grow">
<div data-which="Statusmeldung" class="text-right grow">
<div
*ngIf="!hasAnnotation; else annotationTmpl"
class="rounded inline-block px-4 text-white page-package-list-item__arrival-status whitespace-nowrap"
data-what="arrival-status"
[class]="package?.arrivalStatus | arrivalStatusColorClass"
>
{{ package?.arrivalStatus | arrivalStatus }}
</div>
<ng-template #annotationTmpl>
{{ annotation }}
<div data-what="annotation" class="page-package-list-item__annotation">
{{ annotation }}
</div>
</ng-template>
</div>