Skip to content

Commit 1a82d68

Browse files
SHENGXING LUSHENGXING LU
authored andcommitted
more cypress tags
1 parent b3598fe commit 1a82d68

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

src/app/pages/catalogs/catalogs.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h5 class="text-2xl font-bold tracking-tight line-clamp-4 text-primary-100 dark:
7070
@if (!loading_more) {
7171
@if (page_check) {
7272
<div class="flex pt-8 justify-center align-middle">
73-
<button (click)="next()" class="flex cursor-pointer items-center justify-center px-3 h-8 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
73+
<button data-cy="loadMore" (click)="next()" class="flex cursor-pointer items-center justify-center px-3 h-8 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
7474
Load more
7575
<svg class="w-3.5 h-3.5 ms-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
7676
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7 7V5"/>

src/app/pages/product-inventory/inventory-items/inventory-products/inventory-products.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ <h5 class="text-xl font-semibold tracking-tight text-primary-100 dark:text-white
192192
@if (!loading_more) {
193193
@if (page_check) {
194194
<div class="flex pt-6 pb-6 justify-center align-middle">
195-
<button (click)="next()" class="flex cursor-pointer items-center justify-center px-3 h-8 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
195+
<button data-cy="loadMore" (click)="next()" class="flex cursor-pointer items-center justify-center px-3 h-8 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
196196
Load more
197197
<svg class="w-3.5 h-3.5 ms-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
198198
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7 7V5"/>

src/app/pages/product-inventory/inventory-resources/inventory-resources.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ <h2 class="text-base font-bold">{{ 'OFFERINGS._order_by' | translate }}</h2>
179179
@if (!loading_more) {
180180
@if (page_check) {
181181
<div class="flex pt-4 justify-center align-middle">
182-
<button (click)="next()" class="flex cursor-pointer items-center justify-center px-3 h-8 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
182+
<button data-cy="loadMore" (click)="next()" class="flex cursor-pointer items-center justify-center px-3 h-8 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
183183
Load more
184184
<svg class="w-3.5 h-3.5 ms-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
185185
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7 7V5"/>

src/app/pages/product-inventory/inventory-services/inventory-services.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ <h2 class="text-base font-bold">{{ 'OFFERINGS._order_by' | translate }}</h2>
179179
@if (!loading_more) {
180180
@if (page_check) {
181181
<div class="flex pt-4 justify-center align-middle">
182-
<button (click)="next()" class="flex cursor-pointer items-center justify-center px-3 h-8 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
182+
<button data-cy="loadMore" (click)="next()" class="flex cursor-pointer items-center justify-center px-3 h-8 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
183183
Load more
184184
<svg class="w-3.5 h-3.5 ms-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
185185
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7 7V5"/>

src/app/pages/product-orders/sections/order-info/order-info.component.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="border-b border-gray-200 dark:border-gray-700 mb-2">
22
<ul class="flex flex-wrap -mb-px text-sm font-medium text-center text-gray-500 dark:text-gray-400">
33
<li class="me-2">
4-
<a (click)="onRoleChange('Customer')"
4+
<a data-cy="asCustomerTab" (click)="onRoleChange('Customer')"
55
[ngClass]="role !== 'Customer' ? 'text-gray-400 group-hover:text-gray-500 dark:text-gray-500 dark:group-hover:text-gray-300' : 'text-primary-100 border-primary-100 active dark:text-primary-50 dark:border-primary-50'"
66
class="inline-flex cursor-pointer items-center justify-center p-4 border-b-2 border-transparent rounded-t-lg group" aria-current="page">
77
<svg [ngClass]="role !== 'Customer' ? 'text-gray-400 group-hover:text-gray-500 dark:text-gray-500 dark:group-hover:text-gray-300' : 'text-primary-100 dark:text-primary-50'"
@@ -13,7 +13,7 @@
1313
</li>
1414
@if(isSeller){
1515
<li class="me-2">
16-
<a (click)="onRoleChange('Seller')"
16+
<a data-cy="asProviderTab" (click)="onRoleChange('Seller')"
1717
[ngClass]="{'text-primary-100 border-primary-100 active dark:text-primary-50 dark:border-primary-50 group': role == 'Seller'}"
1818
class="inline-flex cursor-pointer items-center justify-center p-4 border-b-2 border-transparent rounded-t-lg hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 group">
1919
<svg
@@ -193,7 +193,7 @@ <h6 class="mb-3 text-sm font-bold text-gray-900 dark:text-white">
193193
{{order?.orderDate | date:'EEEE, dd/MM/yy, HH:mm'}}
194194
</td>
195195
<td class="px-6 py-4 text-center align-middle">
196-
<button (click)="toggleShowDetails(order);$event.stopPropagation();" type="button" class="text-white bg-primary-100 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-center me-2">
196+
<button data-cy="viewOrderDetails" (click)="toggleShowDetails(order);$event.stopPropagation();" type="button" class="text-white bg-primary-100 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-center me-2">
197197
<svg class="w-[18px] h-[18px] text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 14">
198198
<g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
199199
<path d="M10 10a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/>
@@ -413,7 +413,7 @@ <h3 class="text-base dark:text-gray-200">
413413
<td class="px-6 py-4 text-center align-middle flex justify-center">
414414
@if (!hasProcurementAutomaticTerm(item)) {
415415
@if (!item.productOrderItem.state && role == 'Seller') {
416-
<button type="button" title="Acknowledge the order item"
416+
<button data-cy="acknowledgeOrder" type="button" title="Acknowledge the order item"
417417
class="text-white bg-primary-100 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-center me-2"
418418
(click)="openModal('acknowledged', item)">
419419
<!--!Font Awesome Pro 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.-->
@@ -423,7 +423,7 @@ <h3 class="text-base dark:text-gray-200">
423423
</svg>
424424
</button>
425425

426-
<button type="button" title="Reject the order item"
426+
<button data-cy="rejectOrder" type="button" title="Reject the order item"
427427
class="text-red-950 bg-red-500 hover:bg-red-600 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-center me-2"
428428
(click)="openModal('cancelled', item)">
429429
<svg class="w-[18px] h-[18px] text-white stroke-white fill-white stroke-2" stroke="currentColor"
@@ -434,14 +434,14 @@ <h3 class="text-base dark:text-gray-200">
434434
} @else {
435435
@if(role == 'Seller'){
436436
@if (item.productOrderItem.state === 'acknowledged') {
437-
<button type="button" title="Start Order Treatment"
437+
<button data-cy="startOrderTreatment" type="button" title="Start Order Treatment"
438438
class="text-green-950 bg-green-500 hover:bg-green-600 focus:ring-4 focus:outline-none focus:ring-green-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-center me-2"
439439
(click)="openModal('inProgress', item)">
440440
<svg class="w-[18px] h-[18px] text-white stroke-white fill-white stroke-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512">
441441
<path class="fa-secondary" opacity=".4" d="M32 80l0 352c0 5.8 3.1 11.1 8.2 14s11.2 2.7 16.2-.3l288-176c4.8-2.9 7.7-8.1 7.7-13.7s-2.9-10.7-7.7-13.7l-288-176c-4.9-3-11.1-3.1-16.2-.3s-8.2 8.2-8.2 14z"/><path class="fa-primary" d="M56.3 66.3c-4.9-3-11.1-3.1-16.2-.3s-8.2 8.2-8.2 14l0 352c0 5.8 3.1 11.1 8.2 14s11.2 2.7 16.2-.3l288-176c4.8-2.9 7.7-8.1 7.7-13.7s-2.9-10.7-7.7-13.7l-288-176zM24.5 38.1C39.7 29.6 58.2 30 73 39L361 215c14.3 8.7 23 24.2 23 41s-8.7 32.2-23 41L73 473c-14.8 9.1-33.4 9.4-48.5 .9S0 449.4 0 432L0 80C0 62.6 9.4 46.6 24.5 38.1z"/></svg>
442442
</button>
443443
} @else if (item.productOrderItem.state === 'inProgress') {
444-
<button type="button" title="Order Completely Treated"
444+
<button data-cy="completeOrder" type="button" title="Order Completely Treated"
445445
class="text-green-950 bg-green-500 hover:bg-green-600 focus:ring-4 focus:outline-none focus:ring-green-300 font-medium rounded-full text-sm p-2.5 text-center inline-flex items-center me-2"
446446
(click)="openModal('completed', item)">
447447
<svg class="w-[18px] h-[18px] text-white stroke-white fill-white stroke-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
@@ -501,12 +501,12 @@ <h3 class="text-xl font-semibold text-secondary-50 dark:text-white">
501501
</div>
502502
<!-- Botones de acción -->
503503
<div class="flex items-center p-6 space-x-4 border-t border-gray-200 rounded-b dark:border-gray-600">
504-
<button type="button" (click)="confirmAction()"
504+
<button data-cy="confirmActionBtn" type="button" (click)="confirmAction()"
505505
class="text-white bg-blue-600 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium
506506
rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-500 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
507507
Yes, Confirm
508508
</button>
509-
<button type="button" (click)="closeModal()"
509+
<button data-cy="cancelActionBtn" type="button" (click)="closeModal()"
510510
class="text-gray-500 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100
511511
focus:ring-4 focus:ring-gray-200 font-medium rounded-lg text-sm px-5 py-2.5 dark:bg-gray-700
512512
dark:text-gray-300 dark:border-gray-500 dark:hover:bg-gray-600 dark:focus:ring-gray-600">

src/app/pages/seller-offerings/offerings/seller-resource-spec/seller-resource-spec.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ <h2 class="text-base font-bold">{{ 'OFFERINGS._order_by' | translate }}</h2>
185185
@if (!loading_more) {
186186
@if (page_check) {
187187
<div class="flex pt-6 pb-2 justify-center align-middle">
188-
<button (click)="next()" class="flex cursor-pointer shadow-lg items-center justify-center px-3 h-8 text-sm font-medium text-gray-500 dark:text-white bg-white dark:bg-primary-100 dark:hover:bg-secondary-100 border border-gray-300 dark:border-secondary-200 rounded-lg hover:bg-gray-200">
188+
<button data-cy="loadMore" (click)="next()" class="flex cursor-pointer shadow-lg items-center justify-center px-3 h-8 text-sm font-medium text-gray-500 dark:text-white bg-white dark:bg-primary-100 dark:hover:bg-secondary-100 border border-gray-300 dark:border-secondary-200 rounded-lg hover:bg-gray-200">
189189
Load more
190190
<svg class="w-3.5 h-3.5 ms-2" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
191191
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7 7V5"/>

src/app/shared/price-plan-drawer/price-plan-drawer.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
<!-- drawer component -->
10-
<div [id]="drawerId"
10+
<div data-cy="toCartDrawer" [id]="drawerId"
1111
class="fixed top-0 right-0 z-40 h-screen pt-24 overflow-y-auto transition-transform translate-x-full bg-secondary-50 dark:bg-gray-800 flex flex-col"
1212
[class.translate-x-0]="isOpen"
1313
[class.translate-x-full]="!isOpen"

0 commit comments

Comments
 (0)