Added cypress test to validate issue fix

This commit is contained in:
vicky-primathon.in 2021-04-27 11:21:08 +05:30
parent f50b1508ba
commit 15ae304da4

View File

@ -81,12 +81,26 @@ describe("DatePicker Widget Property pane tests with js bindings", function() {
cy.closePropertyPane();
});
it("Datepicker value to work with selected date formats", function() {
it("Datepicker input value changes to work with selected date formats", function() {
cy.openPropertyPane("datepickerwidget2");
cy.testJsontext("defaultdate", "04/05/2021 05:25");
cy.selectDateFormat("YYYY-MM-DD HH:mm");
cy.get(".t--property-control-defaultdate .bp3-input").clear();
cy.get(formWidgetsPage.toggleJsDefaultDate).click();
cy.selectDateFormat("DD/MM/YYYY HH:mm");
cy.testJsontext(
"defaultdate",
'{{moment("04/05/2021 05:25", "DD/MM/YYYY HH:mm").toISOString()}}',
);
cy.get(".t--draggable-datepickerwidget2 .bp3-input")
.clear({
force: true,
})
.type("04/05/2021 06:25");
cy.selectDateFormat("LLL");
cy.SearchEntityandOpen("Text1");
cy.testJsontext("text", "{{DatePicker1.formattedDate}}");
cy.get(".t--draggable-textwidget .bp3-ui-text")
.first()
.should("have.text", "May 4, 2021 6:25 AM");
});
it("Datepicker default date validation with js binding", function() {