Skip to content

Commit

Permalink
updated failing test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Gulshan Mishra committed Jan 16, 2024
1 parent 46883e6 commit 8b4ab7e
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -178,15 +178,17 @@ describe("Form Runtime with Date Picker", () => {
});

// choose a different date and check if its persisted
cy.get(`#${datePicker7}`).find(".cmp-adaptiveform-datepicker__calendar-icon").should("be.visible").click().then(() => {
cy.get(`#${datePicker7}`).find(".cmp-adaptiveform-datepicker__calendar-icon").should("be.visible")
.eq(0).click({force: true}).then(() => {
cy.get("#li-day-3").should("be.visible").click(); // clicking on the 2nd day of the month of October 2023
cy.get(`#${datePicker7}`).find("input").blur().should("have.value","Wednesday, 2 August, 2023");
cy.get(`#${datePicker7}`).find("input").focus().should("have.value","2/8/2023");

});

// check clear option
cy.get(`#${datePicker7}`).find(".cmp-adaptiveform-datepicker__calendar-icon").should("be.visible").click().then(() => {
cy.get(`#${datePicker7}`).find(".cmp-adaptiveform-datepicker__calendar-icon").should("be.visible")
.eq(0).click({force: true}).then(() => {
cy.get(".dp-clear").click();
});

Expand All @@ -195,7 +197,8 @@ describe("Form Runtime with Date Picker", () => {

it("Test order of the days", () => {
const [datePicker7, datePicker7FieldView] = Object.entries(formContainer._fields)[6];
cy.get(`#${datePicker7}`).find(".cmp-adaptiveform-datepicker__calendar-icon").should("be.visible").click().then(() => {
cy.get(`#${datePicker7}`).find(".cmp-adaptiveform-datepicker__calendar-icon").should("be.visible")
.eq(0).click({force: true}).then(() => {
cy.get(".header").invoke("text").should("eq", 'SunMonTueWedThuFriSat');
});
});
Expand Down

0 comments on commit 8b4ab7e

Please sign in to comment.