Skip to content

Commit

Permalink
Merge pull request #30255 from appsmithorg/release
Browse files Browse the repository at this point in the history
12/01 Daily Promotion
  • Loading branch information
trishaanand committed Jan 12, 2024
2 parents 7e8a994 + 891d766 commit 23855cb
Show file tree
Hide file tree
Showing 81 changed files with 905 additions and 896 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-client-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
else
echo "matrix_count=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59]" >> $GITHUB_OUTPUT
fi
- name: Get the PR number if workflow is triggered manually
id: fetch_pr
if: github.event_name == 'workflow_dispatch'
Expand Down
8 changes: 2 additions & 6 deletions app/client/cypress/e2e/Regression/Apps/EchoApiCMS_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ describe(
{ tags: ["@tag.Datasource"] },
function () {
before(() => {
agHelper.GenerateUUID();
cy.get("@guid").then((uid) => {
homePage.CreateNewWorkspace("EchoApiCMS" + uid, true);
homePage.CreateAppInWorkspace("EchoApiCMS" + uid, "EchoApiCMSApp");
agHelper.AddDsl("CMSdsl");
});
homePage.RenameApplication("EchoApiCMSApp");
agHelper.AddDsl("CMSdsl");
});

let repoName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ import {
gitSync,
dataSources,
locators,
table,
} from "../../../support/Objects/ObjectsCore";

describe("Shopping cart App", { tags: ["@tag.Datasource"] }, function () {
let datasourceName: string, repoName: any;

before(() => {
agHelper.GenerateUUID();
cy.get("@guid").then((uid) => {
homePage.CreateNewWorkspace("MongoDBShop" + uid, true);
homePage.CreateAppInWorkspace("MongoDBShop" + uid, "MongoDBShopApp");
agHelper.AddDsl("mongoAppdsl");
});
agHelper.AddDsl("mongoAppdsl");
dataSources.CreateDataSource("Mongo");
cy.get("@saveDatasource").then((httpResponse: any) => {
datasourceName = httpResponse.response.body.data.name;
Expand Down Expand Up @@ -169,7 +165,8 @@ describe("Shopping cart App", { tags: ["@tag.Datasource"] }, function () {
);
agHelper.GetNClick(appPage.addButton, 0, true);
assertHelper.AssertNetworkStatus("@postExecute");
// Deleting the book from the cart
// Select the table row & Deleting the book from the cart
table.SelectTableRow(1);
agHelper.GetNClick(appPage.deleteButton, 1, false);
assertHelper.AssertNetworkStatus("@postExecute");
assertHelper.AssertNetworkStatus("@postExecute");
Expand Down
15 changes: 5 additions & 10 deletions app/client/cypress/e2e/Regression/Apps/PromisesApp_spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
agHelper,
entityExplorer,
jsEditor,
apiPage,
dataManager,
Expand Down Expand Up @@ -64,28 +63,24 @@ describe(
cy.wait("@getPage");
// verify text in the text widget

agHelper.AssertText(
".t--draggable-textwidget span",
"text",
agHelper.AssertContains(
"Step 4: Value is Green and will default to undefined",
5,
);
// toggle off the switch
cy.get(".t--switch-widget-active .bp3-control-indicator").click({
force: true,
});
agHelper.AssertContains("Switch widget has changed");
agHelper.ValidateToastMessage("Switch widget has changed");

// select an option from select widget
cy.get(".bp3-button.select-button").click({ force: true });
cy.get(".menu-item-text").eq(2).click({ force: true });
// verify text in the text widget

agHelper.AssertText(
".t--draggable-textwidget span",
"text",
agHelper.AssertContains(
"Step 4: Value is Red and will default to undefined",
5,
"be.visible",
".t--draggable-textwidget span",
);
// move to page 2 on table widget
agHelper.GetNClick(commonlocators.tableNextPage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe("Test Sidebar navigation style", { tags: ["@tag.IDE"] }, function () {
before(() => {
// Import an application
homePage.NavigateToHome();
agHelper.RefreshPage();
homePage.ImportApp("appNavigationTestingAppWithLongPageNamesAndTitle.json");
assertHelper
.WaitForNetworkCall("@importNewApplication")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe(
before(() => {
// Import an application
homePage.NavigateToHome();
agHelper.RefreshPage();
homePage.ImportApp(
"appNavigationTestingAppWithLongPageNamesAndTitle.json",
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe(
before(() => {
// Import an application
homePage.NavigateToHome();
agHelper.RefreshPage();
homePage.ImportApp(
"appNavigationTestingAppWithLongPageNamesAndTitle.json",
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,8 @@ describe(

it("7. Bug 19801: Create new Auth DS, refresh the page without saving, we should not see discard popup", () => {
_.dataSources.NavigateToDSCreateNew();
_.agHelper.GenerateUUID();
// using CreatePlugIn function instead of CreateDatasource,
// because I do not need to fill the datasource form and use the same default data
// because we do not need to fill the datasource form for this case
_.dataSources.CreatePlugIn("Authenticated API");
_.agHelper.RefreshPage();
_.agHelper.AssertElementAbsence(_.dataSources._datasourceModalSave);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,22 @@ describe(
onboarding.closeIntroModal();
});

it("1. Verify Repo limit flow for CE instance", function () {
it("1. Verify Repo limit flow for CE/EE instances", function () {
agHelper.Sleep(2000); // adding wait for app to load
homePage.LogOutviaAPI();
cy.generateUUID().then((uid) => {
cy.Signup(`${uid}@appsmithtest.com`, uid);
});
homePage.NavigateToHome();
homePage.CreateNewApplication();
onboarding.closeIntroModal();
gitSync.CreateNConnectToGit(repoName1, true, true);
cy.get("@gitRepoName").then((repName) => {
repoName1 = repName;
});
homePage.NavigateToHome();
homePage.CreateNewApplication();
onboarding.closeIntroModal();
gitSync.CreateNConnectToGit(repoName2, true, true);
cy.get("@gitRepoName").then((repName) => {
repoName2 = repName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const commonLocators = require("../../../../locators/commonlocators.json");
import * as _ from "../../../../support/Objects/ObjectsCore";

describe("Canvas context Property Pane", { tags: ["@tag.IDE"] }, function () {
Expand All @@ -18,7 +17,8 @@ describe("Canvas context Property Pane", { tags: ["@tag.IDE"] }, function () {
cy.get(
`.t--property-control-options > div:nth-child(2) > div[orientation="HORIZONTAL"]`,
).should("have.length", 2);
cy.get(commonLocators.canvas).click({ force: true });
// Deselect all widgets
cy.get("body").type("{esc}");

//Bug Fix: widget explorer should automatically open on widget selection
cy.reload();
Expand All @@ -29,7 +29,7 @@ describe("Canvas context Property Pane", { tags: ["@tag.IDE"] }, function () {
);

cy.get(".t--widget-imagewidget").eq(0).click();
//check if the entities are not expanded
//check if the entities are expanded
cy.get(`[data-guided-tour-id="explorer-entity-Image1"]`).should("exist");
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ describe(
cy.url().then((url) => {
currentUrl = url;
cy.log(currentUrl);
});
homePage.Signout(false).then(() => {
agHelper.VisitNAssert(currentUrl, "getPagesForViewApp");
homePage.Signout(false);
agHelper.VisitNAssert(url, "getPagesForViewApp");
agHelper.AssertCSS(
autoLayout.getAutoLayoutLayerClassName("0", 0),
"flex-wrap",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ const explorer = require("../../../../locators/explorerlocators.json");
import {
agHelper,
assertHelper,
draggableWidgets,
entityExplorer,
homePage,
locators,
propPane,
} from "../../../../support/Objects/ObjectsCore";

describe("Slug URLs", () => {
Expand All @@ -14,21 +17,19 @@ describe("Slug URLs", () => {
applicationId = localStorage.getItem("applicationId");
cy.location("pathname").then((pathname) => {
const pageId = pathname.split("/")[3]?.split("-").pop();
cy.visit(`/applications/${applicationId}/pages/${pageId}/edit`).then(
() => {
cy.wait(10000);
cy.location("pathname").then((pathname) => {
const pageId = pathname.split("/")[3]?.split("-").pop();
const appName = localStorage
.getItem("appName")
.replace(/\s+/g, "-")
.toLowerCase();
expect(pathname).to.be.equal(
`/app/${appName}/page1-${pageId}/edit`,
);
});
},
);
cy.visit(`/applications/${applicationId}/pages/${pageId}/edit`, {
timeout: Cypress.config().pageLoadTimeout,
}).then(() => {
agHelper.WaitUntilEleAppear(locators._sidebar);
cy.location("pathname").then((pathname) => {
const pageId = pathname.split("/")[3]?.split("-").pop();
const appName = localStorage
.getItem("appName")
.replace(/\s+/g, "-")
.toLowerCase();
expect(pathname).to.be.equal(`/app/${appName}/page1-${pageId}/edit`);
});
});
});
});

Expand All @@ -43,7 +44,6 @@ describe("Slug URLs", () => {
});
});
entityExplorer.RenameEntityFromExplorer("Page1", "Renamed");
agHelper.Sleep(2000); //for new name to settle & url to update
assertHelper.AssertNetworkStatus("updatePage");
// cy.location("pathname").then((pathname) => {
cy.url().then((url) => {
Expand Down Expand Up @@ -85,19 +85,17 @@ describe("Slug URLs", () => {
);
});
cy.get(explorer.addWidget).click();
cy.dragAndDropToCanvas("textwidget", { x: 300, y: 700 });
cy.get(".t--widget-textwidget").should("exist");
cy.updateCodeInput(
".t--property-control-text",
`{{appsmith.URL.pathname}}`,
entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT);

propPane.UpdatePropertyFieldValue(
"Text",
"{{appsmith.URL.pathname}}",
);

cy.get(".t--draggable-textwidget .bp3-ui-text")
.should(
"contain.text",
`/applications/${application.id}/pages/${currentPageId}/edit`,
)
.wait(2000);
cy.get(".t--draggable-textwidget .bp3-ui-text").should(
"contain.text",
`/applications/${application.id}/pages/${currentPageId}/edit`,
);

cy.get(".t--upgrade").click({ force: true });

Expand Down Expand Up @@ -135,14 +133,8 @@ describe("Slug URLs", () => {

it("4. Checks redirect url", () => {
cy.url().then((url) => {
cy.LogOut(false);
homePage.Signout(true);
agHelper.VisitNAssert(url + "?embed=true&a=b", "signUpLogin");
agHelper.Sleep(2000);
// cy.location().should((loc) => {
// expect(loc.search).to.eq(
// `?redirectUrl=${encodeURIComponent(url + "?embed=true&a=b")}`,
// );
// });
agHelper.AssertURL(
`?redirectUrl=${encodeURIComponent(url + "?embed=true&a=b")}`,
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
const commonlocators = require("../../../../locators/commonlocators.json");
import * as _ from "../../../../support/Objects/ObjectsCore";
import { agHelper, propPane } from "../../../../support/Objects/ObjectsCore";

describe("Canvas Resize", function () {
before(() => {
_.agHelper.AddDsl("CanvasResizeDsl");
agHelper.AddDsl("CanvasResizeDsl");
});
it("1. Deleting bottom widget should resize canvas", function () {
const InitHeight = "2950px";
cy.get(commonlocators.dropTarget).should("have.css", "height", InitHeight);
//cy.openPropertyPane("textwidget");
cy.intercept("PUT", "/api/v1/layouts/*/pages/*").as("deleteUpdate");
_.propPane.DeleteWidgetFromPropertyPane("Text2");
propPane.DeleteWidgetFromPropertyPane("Text2");
cy.wait("@deleteUpdate").then((response) => {
const dsl = response.response.body.data.dsl;
cy.get(commonlocators.dropTarget).should(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe(
agHelper.GetNClick(template.vehicleMaintenenceApp);
agHelper.WaitUntilEleDisappear("//*[text()='Loading template details']");
agHelper.Sleep();
agHelper.CheckForErrorToast(
agHelper.FailIfErrorToast(
"Internal server error while processing request",
);
cy.get("body").then(($ele) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe(
.scrollIntoView()
.wait(500)
.click();
agHelper.CheckForErrorToast("INTERNAL_SERVER_ERROR");
agHelper.FailIfErrorToast("INTERNAL_SERVER_ERROR");
cy.wait(6000);
cy.get("body").then(($ele) => {
if ($ele.find(widgetLocators.toastAction).length <= 0) {
Expand Down Expand Up @@ -82,7 +82,7 @@ describe(
cy.wait(5000);
cy.get(template.templateDialogBox).should("be.visible");
cy.xpath("//h1[text()='Applicant Tracker-test']").click();
agHelper.CheckForErrorToast("INTERNAL_SERVER_ERROR");
agHelper.FailIfErrorToast("INTERNAL_SERVER_ERROR");
cy.wait("@getTemplatePages").should(
"have.nested.property",
"response.body.responseMeta.status",
Expand Down
Loading

0 comments on commit 23855cb

Please sign in to comment.