Skip to content

Commit

Permalink
Merge pull request #37251 from appsmithorg/release
Browse files Browse the repository at this point in the history
06/11 Daily Promotion
  • Loading branch information
btsgh authored Nov 6, 2024
2 parents 5367d23 + 756dc54 commit 7c3c28d
Show file tree
Hide file tree
Showing 37 changed files with 974 additions and 230 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe(
_.agHelper.AddDsl("uiBindDsl");
});
// Skipping tests due to issue - https://www.notion.so/appsmith/f353d8c6bd664f79ad858a42010cdfc8?v=f04cde23f6424aeb9d5a6e389cd172bd&p=0717892d43684c40bae4e2c87b8308cb&pm=s
it.skip("1. DatePicker-Text, Validate selectedDate functionality", function () {
it("1. DatePicker-Text, Validate selectedDate functionality", function () {
/**
* Bind DatePicker1 to Text for "selectedDate"
*/
Expand All @@ -25,9 +25,8 @@ describe(
* Set the Calender for today's date in DatePicker1
*/
cy.openPropertyPane("datepickerwidget");
cy.get(formWidgetsPage.defaultDate).click();
cy.ClearDateFooter();
cy.SetDateToToday();
cy.get(formWidgetsPage.datepickerWidget).first().click();
cy.get(formWidgetsPage.datepickerFooter).contains("Today").click();

cy.getDate(1, "YYYY-MM-DD").then((date) => {
cy.log("retured date" + date);
Expand All @@ -43,15 +42,15 @@ describe(
cy.get(publishPage.datepickerWidget + commonlocators.inputField)
.eq(0)
.click();
cy.ClearDateFooter();
cy.setDate(1, "ddd MMM DD YYYY");
cy.SetDateToToday();
cy.setDate(1, "ddd MMM DD YYYY", "v1");
cy.get(commonlocators.labelTextStyle).should("contain", nextDay);
});

cy.get(commonlocators.backToEditor).click();
});

it.skip("2. DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function () {
it("2. DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function () {
cy.openPropertyPane("textwidget");

/**
Expand All @@ -75,9 +74,9 @@ describe(
*/
cy.openPropertyPane("datepickerwidget");
cy.get(formWidgetsPage.defaultDate).click();
cy.ClearDateFooter();
cy.setDate(1, "ddd MMM DD YYYY");
// cy.get(commonlocators.onDateSelectedField).click();
cy.get(formWidgetsPage.dayPickerToday).click();
cy.get(formWidgetsPage.defaultDate).click();
cy.setDate(1);

/**
*Validate the date in text widget
Expand All @@ -89,7 +88,7 @@ describe(
});
});

it.skip("3. Validate the Date is not changed in DatePicker2", function () {
it("3. Validate the Date is not changed in DatePicker2", function () {
cy.log("dateDp2:" + dateDp2);
cy.get(formWidgetsPage.datepickerWidget + commonlocators.inputField)
.eq(1)
Expand Down Expand Up @@ -124,7 +123,7 @@ describe(
_.deployMode.NavigateBacktoEditor();
});

it.skip("5. Checks if on deselection of date triggers the onDateSelected action or not.", function () {
it("5. Checks if on deselection of date triggers the onDateSelected action or not.", function () {
/**
* bind datepicker to show a message "Hello" on date selected
*/
Expand All @@ -135,7 +134,6 @@ describe(
* checking if on selecting the date triggers the message
*/
cy.get(formWidgetsPage.datepickerWidget).first().click();
cy.ClearDateFooter();
cy.SetDateToToday();
cy.get(commonlocators.toastmsg).contains("hello");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe(
it("DatePicker-Date Name validation", function () {
// changing the date to today
cy.get(formWidgetsPage.defaultDate).click();
cy.SetDateToToday();
cy.get(formWidgetsPage.dayPickerToday).click();

//changing the Button Name
cy.widgetText(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ describe(
cy.closePropertyPane();
});
// Skipping tests due to issue - https://www.notion.so/appsmith/f353d8c6bd664f79ad858a42010cdfc8?v=f04cde23f6424aeb9d5a6e389cd172bd&p=0717892d43684c40bae4e2c87b8308cb&pm=s
it.skip("Date Widget with Reset widget being switch widget", function () {
it("Date Widget with Reset widget being switch widget", function () {
EditorNavigation.SelectEntityByName("DatePicker1", EntityType.Widget);

cy.get(formWidgetsPage.datePickerInput).click();
_.agHelper.GetNClick(widgetsPage.todayText);
cy.get(formWidgetsPage.defaultDate).click();
_.agHelper.GetNClick(".ads-v2-datepicker__calender-today");
cy.get(formWidgetsPage.defaultDate).click();
cy.SetDateToToday();
cy.setDate(1, "ddd MMM DD YYYY");
const nextDay = dayjs().format("DD/MM/YYYY");
cy.log(nextDay);
Expand All @@ -51,18 +54,10 @@ describe(
cy.get(widgetsPage.switchWidgetInactive).should("be.visible");
});

it.skip("DatePicker-Date change and validate switch widget status", function () {
it("DatePicker-Date change and validate switch widget status", function () {
cy.get(widgetsPage.datepickerInput).click({ force: true });
cy.SetDateToToday();
cy.get(widgetsPage.switchWidgetActive).should("be.visible");
cy.get(".t--toast-action span")
.last()
.invoke("text")
.then((text) => {
const toasttext = text;
cy.log(toasttext);
expect(text.trim()).to.equal(toasttext.trim());
});
_.agHelper.GetNClick(widgetsPage.todayText);
_.agHelper.AssertClassExists(".bp3-switch", "t--switch-widget-active");
});
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,23 @@ describe(
table.ReadTableRowColumnData(3, 0, "v2").then(($cellData) => {
expect($cellData).to.eq("Profile pic");
});
table.AssertURLColumnNavigation(
0,
0,
"https://randomuser.me/api/portraits/med/women/39.jpg",
"v2",
);
table.AssertURLColumnNavigation(
3,
0,
"https://randomuser.me/api/portraits/med/men/52.jpg",
"v2",
);

agHelper
.GetElement(`${table._tableRowColumnData(0, 0, "v2")} a`)
.should(
"have.attr",
"href",
"https://randomuser.me/api/portraits/med/women/39.jpg",
)
.should("have.attr", "target", "_blank");
agHelper
.GetElement(`${table._tableRowColumnData(3, 0, "v2")} a`)
.should(
"have.attr",
"href",
"https://randomuser.me/api/portraits/med/men/52.jpg",
)
.should("have.attr", "target", "_blank");
});
},
);
Loading

0 comments on commit 7c3c28d

Please sign in to comment.