From 53b19838e402b56b01bd01644787419244b7d899 Mon Sep 17 00:00:00 2001 From: Shivank Kacker Date: Sat, 12 Oct 2024 19:39:55 +0530 Subject: [PATCH] how did i miss out on this one --- cypress/support/commands.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index e71836fb9c8..22a2e0f444a 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -176,9 +176,9 @@ Cypress.Commands.add("selectRadioOption", (name: string, value: string) => { Cypress.Commands.add("clickAndTypeDate", (selector, date) => { cy.get(selector).scrollIntoView(); 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);