Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
shivankacker committed Oct 12, 2024
1 parent e58e5e0 commit 831ed41
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions cypress/pageobject/Asset/AssetCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions cypress/pageobject/Patient/PatientConsultation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions cypress/pageobject/Patient/PatientTreatmentPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions cypress/pageobject/Users/UserCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions cypress/pageobject/Users/UserProfilePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down

0 comments on commit 831ed41

Please sign in to comment.