From 831ed41a1826d25f29e917ed8c9acfd367c2507d Mon Sep 17 00:00:00 2001 From: Shivank Kacker Date: Sat, 12 Oct 2024 19:14:57 +0530 Subject: [PATCH] . --- cypress/pageobject/Asset/AssetCreation.ts | 12 ++++++------ cypress/pageobject/Patient/PatientConsultation.ts | 6 +++--- cypress/pageobject/Patient/PatientTreatmentPlan.ts | 6 +++--- cypress/pageobject/Users/UserCreation.ts | 6 +++--- cypress/pageobject/Users/UserProfilePage.ts | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cypress/pageobject/Asset/AssetCreation.ts b/cypress/pageobject/Asset/AssetCreation.ts index a0ba4e98fdb..127cc552220 100644 --- a/cypress/pageobject/Asset/AssetCreation.ts +++ b/cypress/pageobject/Asset/AssetCreation.ts @@ -123,9 +123,9 @@ export class AssetPage { cy.get( "[data-testid=asset-last-serviced-on-input] input[type='text']", ).click(); - cy.get( - '[data-test-id="date-input"]:visible [data-test-id="clear-date-input"]', - ).click({ force: true }); + cy.get('[data-test-id="date-input"]:visible [data-time-input]').each((el) => + cy.wrap(el).clear(), + ); cy.get('[data-test-id="date-input"]:visible [data-time-input="0"]') .click() .type(lastServicedOn); @@ -285,9 +285,9 @@ export class AssetPage { enterAssetservicedate(text: string) { cy.get("input[name='last_serviced_on']").click(); - cy.get( - '[data-test-id="date-input"]:visible [data-test-id="clear-date-input"]', - ).click({ force: true }); + cy.get('[data-test-id="date-input"]:visible [data-time-input]').each((el) => + cy.wrap(el).clear(), + ); cy.get('[data-test-id="date-input"]:visible [data-time-input="0"]') .click() .type(text); diff --git a/cypress/pageobject/Patient/PatientConsultation.ts b/cypress/pageobject/Patient/PatientConsultation.ts index be68b7ba01a..50e01948484 100644 --- a/cypress/pageobject/Patient/PatientConsultation.ts +++ b/cypress/pageobject/Patient/PatientConsultation.ts @@ -61,9 +61,9 @@ export class PatientConsultationPage { typePatientConsultationDate(selector: string, date: string) { cy.get(selector).click(); - cy.get( - '[data-test-id="date-input"]:visible [data-test-id="clear-date-input"]', - ).click({ force: true }); + cy.get('[data-test-id="date-input"]:visible [data-time-input]').each((el) => + cy.wrap(el).clear(), + ); cy.get('[data-test-id="date-input"]:visible [data-time-input="0"]') .click() .type(date); diff --git a/cypress/pageobject/Patient/PatientTreatmentPlan.ts b/cypress/pageobject/Patient/PatientTreatmentPlan.ts index a723f85332e..010b02eaa76 100644 --- a/cypress/pageobject/Patient/PatientTreatmentPlan.ts +++ b/cypress/pageobject/Patient/PatientTreatmentPlan.ts @@ -34,9 +34,9 @@ class PatientTreatmentPlan { typeProcedureTime(time: string) { cy.get("#procedure-time").click(); - cy.get( - '[data-test-id="date-input"]:visible [data-test-id="clear-date-input"]', - ).click({ force: true }); + cy.get('[data-test-id="date-input"]:visible [data-time-input]').each((el) => + cy.wrap(el).clear(), + ); cy.get('[data-test-id="date-input"]:visible [data-time-input="0"]') .click() .type(time); diff --git a/cypress/pageobject/Users/UserCreation.ts b/cypress/pageobject/Users/UserCreation.ts index 50068dfafb8..71700ffeb59 100644 --- a/cypress/pageobject/Users/UserCreation.ts +++ b/cypress/pageobject/Users/UserCreation.ts @@ -19,9 +19,9 @@ export class UserCreationPage { } typeIntoElementByIdPostClearDob(elementId: string, value: string) { cy.get("#" + elementId).click(); - cy.get( - '[data-test-id="date-input"]:visible [data-test-id="clear-date-input"]', - ).click({ force: true }); + cy.get('[data-test-id="date-input"]:visible [data-time-input]').each((el) => + cy.wrap(el).clear(), + ); cy.get('[data-test-id="date-input"]:visible [data-time-input="0"]') .click() .type(value); diff --git a/cypress/pageobject/Users/UserProfilePage.ts b/cypress/pageobject/Users/UserProfilePage.ts index 78b394ebd10..6ad6f9f7d2a 100644 --- a/cypress/pageobject/Users/UserProfilePage.ts +++ b/cypress/pageobject/Users/UserProfilePage.ts @@ -18,9 +18,9 @@ export default class UserProfilePage { typedate_of_birth(date_of_birth: string) { //check cy.get("#date_of_birth").click(); - cy.get( - '[data-test-id="date-input"]:visible [data-test-id="clear-date-input"]', - ).click({ force: true }); + cy.get('[data-test-id="date-input"]:visible [data-time-input]').each((el) => + cy.wrap(el).clear(), + ); cy.get('[data-test-id="date-input"]:visible [data-time-input="0"]').type( date_of_birth, );