From 390d3a4ad5ebf60a20bb49eaf2a9572fb8710e5d Mon Sep 17 00:00:00 2001 From: Adam Antal Date: Wed, 17 Jan 2024 14:18:50 +0100 Subject: [PATCH] Use getBySel to target remove-digital-reservation-button in Cypress In reservation-details.test --- .../modal/reservation-details/reservation-details-redirect.tsx | 1 + .../modal/reservation-details/reservation-details.test.ts | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx b/src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx index 3bba077497..ff141976df 100644 --- a/src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx +++ b/src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx @@ -36,6 +36,7 @@ const ReservationDetailsRedirect: FC< disabled={false} onClick={() => openReservationDeleteModal(reservation)} classNames={linkClassNames} + dataCy="remove-digital-reservation-button" /> { .find(".text-small-caption") .should("have.text", "16-08-2022 12:52"); - cy.get(".modal") - .find("button.link-tag") + cy.getBySel("remove-digital-reservation-button") .eq(0) .should("have.text", "Remove your reservation") .click();