Skip to content

Commit

Permalink
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
Browse files Browse the repository at this point in the history
…o action-redesign/databricks
  • Loading branch information
ankitakinger committed Sep 9, 2024
2 parents 73bdd94 + 205ba07 commit 06a7076
Show file tree
Hide file tree
Showing 290 changed files with 5,087 additions and 2,500 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/test-build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ on:
type: string
default: latest

# trigger for pushes to master
# trigger for pushes to master and pg
push:
branches: [master]
branches: [master, pg]
paths:
- "app/client/**"
- "app/server/**"
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
ci-test:
needs: [setup, build-docker-image]
# Only run if the build step is successful
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' )
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/pg' )
name: ci-test
uses: ./.github/workflows/ci-test-custom-script.yml
secrets: inherit
Expand All @@ -113,7 +113,7 @@ jobs:
server-unit-tests:
name: server-unit-tests
needs: [build-docker-image]
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' )
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/pg' )
uses: ./.github/workflows/server-build.yml
secrets: inherit
with:
Expand All @@ -123,7 +123,7 @@ jobs:
client-unit-tests:
name: client-unit-tests
needs: [build-docker-image]
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' )
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/pg' )
uses: ./.github/workflows/client-unit-tests.yml
secrets: inherit
with:
Expand Down Expand Up @@ -341,6 +341,12 @@ jobs:
scripts/generate_info_json.sh
fi
- name: Place server artifacts-es
run: |
if [[ -f scripts/prepare_server_artifacts.sh ]]; then
scripts/prepare_server_artifacts.sh
fi
- name: Set up Depot CLI
uses: depot/setup-action@v1

Expand All @@ -362,7 +368,7 @@ jobs:
APPSMITH_CLOUD_SERVICES_BASE_URL=https://release-cs.appsmith.com
BASE=${{ vars.DOCKER_HUB_ORGANIZATION }}/base-${{ vars.EDITION }}:release
tags: |
${{ vars.DOCKER_HUB_ORGANIZATION }}/appsmith-${{ vars.EDITION }}:release
${{ vars.DOCKER_HUB_ORGANIZATION }}/appsmith-${{ vars.EDITION }}:${{ github.ref_name }}
package-master:
needs: [ci-test, client-unit-tests, server-unit-tests]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ describe("storeValue Action test", { tags: ["@tag.JS"] }, () => {
});
agHelper.ClickButton("Test store logs");

debuggerHelper.ClickDebuggerIcon();
debuggerHelper.OpenDebugger();
debuggerHelper.ClickLogsTab();
debuggerHelper.changeLogsGroup("System logs");
debuggerHelper.DoesConsoleLogExist("storeValue('xyz', '123', true)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
draggableWidgets,
fakerHelper,
dataManager,
debuggerHelper,
} from "../../../../support/Objects/ObjectsCore";

const widgetsToTest = {
Expand Down Expand Up @@ -180,8 +181,18 @@ Object.entries(widgetsToTest).forEach(([widgetSelector, testConfig], index) => {
agHelper.GetNClick(locators._widgetInputSelector(widgetSelector));
agHelper.PressDelete();

//Since widget is removed & Button is still holding its reference
debuggerHelper.AssertDebugError(
`'${testConfig.widgetPrefixName}1' is not defined.`,
"",
true,
false,
);
debuggerHelper.CloseBottomBar();
agHelper.GetNClick(getWidgetSelector(draggableWidgets.BUTTON));
agHelper.AssertContains("is not defined"); //Since widget is removed & Button is still holding its reference
agHelper.ValidateToastMessage(
`${testConfig.widgetPrefixName}1 is not defined`,
);
agHelper.PressDelete();

agHelper.GetNClick(getWidgetSelector(draggableWidgets.TEXT)).click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe(
deployMode.NavigateBacktoEditor();

//verify runAstros triggered on PageLaoad of Edit page!
debuggerHelper.ClickDebuggerIcon();
debuggerHelper.OpenDebugger();
debuggerHelper.ClickLogsTab();
debuggerHelper.DebuggerLogsFilter("JSObject1.runAstros");
debuggerHelper.DoesConsoleLogExist("JS Function executed successfully");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe(
apiPage.EnterHeader("test", "test");
debuggerHelper.AssertErrorCount(1);
EditorNavigation.ShowCanvas();
debuggerHelper.ClickDebuggerIcon();
debuggerHelper.OpenDebugger();
debuggerHelper.ClicklogEntityLink();

agHelper.AssertElementVisibility(apiPage._nextCursorValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe("JSObjects", () => {
shouldCreateNewJSObj: true,
});

debuggerHelper.ClickDebuggerIcon();
debuggerHelper.OpenDebugger();
debuggerHelper.ClicklogEntityLink();
agHelper.AssertCursorInput(".js-editor", { ch: 20, line: 6 });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ describe(
);
debuggerHelper.AssertErrorCount(2);

debuggerHelper.ClickDebuggerIcon();
debuggerHelper.ClicklogEntityLink();
debuggerHelper.OpenDebugger();
agHelper.AssertElementVisibility(
".t--actionConfiguration\\.formData\\.limitDocuments\\.data",
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe(
_.debuggerHelper.AssertErrorCount(1);
_.propPane.ToggleSection("general");
_.agHelper.AssertElementAbsence("animateloading");
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.ClicklogEntityLink();
_.propPane.AssertIfPropertyIsVisible("animateloading");

Expand All @@ -28,7 +28,7 @@ describe(
_.propPane.EnterJSContext("visible", "{{test}}", true, false);
_.debuggerHelper.AssertErrorCount(1);
_.propPane.NavigateBackToPropertyPane();
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.ClicklogEntityLink();
_.agHelper.GetNAssertContains(_.propPane._paneTitle, "Tab 2");
_.propPane.AssertIfPropertyIsVisible("visible");
Expand All @@ -48,7 +48,7 @@ describe(
_.debuggerHelper.AssertErrorCount(1);
_.propPane.NavigateBackToPropertyPane(false);
_.propPane.NavigateBackToPropertyPane();
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.ClicklogEntityLink();
_.agHelper.GetNAssertContains(_.propPane._paneTitle, "Menu Item");
_.propPane.AssertIfPropertyIsVisible("icon");
Expand All @@ -65,7 +65,7 @@ describe(
_.propPane.MoveToTab("Style");
_.debuggerHelper.AssertErrorCount(1);
_.propPane.NavigateBackToPropertyPane();
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.ClicklogEntityLink();
_.agHelper.GetNAssertContains(_.propPane._paneTitle, "Second Menu Item");
_.propPane.AssertIfPropertyIsVisible("disabled");
Expand Down Expand Up @@ -110,7 +110,7 @@ describe(
_.propPane.NavigateBackToPropertyPane(false);
_.propPane.NavigateBackToPropertyPane();

_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.ClicklogEntityLink();
_.agHelper.GetNAssertContains(_.propPane._paneTitle, "Custom Field 2");
_.propPane.AssertIfPropertyIsVisible("borderradius");
Expand All @@ -133,7 +133,7 @@ describe(
_.propPane.EnterJSContext("disabled", "{{test}}", true, false);
_.debuggerHelper.AssertErrorCount(2);

_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.ClicklogEntityLink(true);
_.agHelper.GetNAssertContains(_.propPane._paneTitle, "First Menu Item");
_.debuggerHelper.CloseBottomBar();
Expand Down Expand Up @@ -173,7 +173,7 @@ describe(
_.propPane.ToggleSection("validation");
_.propPane.NavigateBackToPropertyPane();

_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.ClicklogEntityLink();
_.agHelper.GetNAssertContains(_.propPane._paneTitle, "imdb_id");
_.debuggerHelper.CloseBottomBar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import EditorNavigation, {
EntityType,
} from "../../../../support/Pages/EditorNavigation";
import PageList from "../../../../support/Pages/PageList";
const locators = {
errorPageTitle: ".t--error-page-title",
};

describe("Pages", { tags: ["@tag.IDE"] }, function () {
let veryLongPageName = `abcdefghijklmnopqrstuvwxyz1234`;
Expand Down Expand Up @@ -36,7 +33,7 @@ describe("Pages", { tags: ["@tag.IDE"] }, function () {
EditorNavigation.SelectEntityByName("Page1 Copy", EntityType.Page);
//Checks if 404 is showing correct route
cy.visit("/route-that-does-not-exist");
cy.get(locators.errorPageTitle).should(($x) => {
cy.get(_.locators.errorPageTitle).should(($x) => {
expect($x).contain(Cypress.env("MESSAGES").PAGE_NOT_FOUND());
});
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import ReconnectLocators from "../../../../locators/ReconnectLocators";
import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags";
import {
agHelper,
gitSync,
homePage,
} from "../../../../support/Objects/ObjectsCore";

let wsName: string;
let repoName: string = "TED-testrepo1";

describe(
"Git Autocommit",
{ tags: ["@tag.Git", "@tag.GitAutocommit"] },
function () {
it("Check if autocommit progress bar is visible and network requests are properly called", function () {
featureFlagIntercept({
release_git_autocommit_feature_enabled: true,
});
agHelper.GenerateUUID();
cy.get("@guid").then((uid) => {
wsName = "GitAC-" + uid;
homePage.CreateNewWorkspace(wsName, true);

cy.intercept({
method: "POST",
url: "/api/v1/git/auto-commit/app/*",
}).as("gitAutocommitTriggerApi");

cy.intercept(
{
method: "GET",
url: "/api/v1/git/auto-commit/progress/app/*",
},
(req) => {
req.on("response", (res) => {
res.setDelay(500);
});
},
).as("gitAutocommitProgressApi");

gitSync.ImportAppFromGit(wsName, repoName);
agHelper.GetNClick(ReconnectLocators.SkipToAppBtn);
cy.wait("@gitAutocommitTriggerApi").then((interception) => {
expect(interception?.response?.statusCode).to.equal(200);
expect(
interception?.response?.body?.data?.autoCommitResponse,
).to.equal("PUBLISHED");
agHelper.WaitUntilEleAppear(gitSync._autocommitStatusbar);
});
cy.wait("@gitAutocommitProgressApi").then((interceptions) => {
expect(interceptions?.response?.statusCode).to.equal(200);
});
});
});
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ describe("Git Branch Protection", { tags: ["@tag.Git"] }, function () {
cy.wait("@gitProtectApi").then((res1) => {
_.agHelper.GetNClick(_.gitSync._closeGitSettingsModal);
expect(res1.response).to.have.property("statusCode", 200);
_.agHelper.AssertElementVisibility(
AppSidebar.locators.sidebar,
false,
);
_.agHelper.AssertElementAbsence(AppSidebar.locators.sidebar);
_.agHelper.AssertElementVisibility(
PageLeftPane.locators.selector,
false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
//Verify if bottom bar is closed.
_.debuggerHelper.AssertClosed();
//verify if bottom bar is open on clicking debugger icon in canvas.
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.AssertOpen(PageType.Canvas);
//Verify if selected tab is errors in tab title.
_.debuggerHelper.AssertSelectedTab(
Expand Down Expand Up @@ -48,7 +48,7 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
//Verify that the errors tab is still closed.
_.debuggerHelper.AssertClosed();
//Verify if bottom bar opens on clicking debugger icon in api page.
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.AssertOpen(PageType.API);
//Verify if selected tab is errors in tab title.
_.debuggerHelper.AssertSelectedTab(
Expand All @@ -70,7 +70,7 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
//Expecting errors tab to be closed as this is now a datasource
_.debuggerHelper.AssertClosed();
//Verify if bottom bar opens on clicking debugger icon in datasource page.
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.AssertOpen(PageType.DataSources);
});

Expand All @@ -91,7 +91,7 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
_.debuggerHelper.AssertClosed();
//Verify if bottom bar opens on clicking debugger icon in query page.
_.dataSources.CreateQueryAfterDSSaved();
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.AssertOpen(PageType.Query);
//Verify if bottom bar is closed on clicking close icon in query page.
_.debuggerHelper.CloseBottomBar();
Expand Down Expand Up @@ -130,7 +130,7 @@ describe("Entity bottom bar", { tags: ["@tag.IDE"] }, () => {
_.debuggerHelper.AssertClosed();
//Verify if bottom bar opens on clicking debugger icon in query page.
_.dataSources.CreateQueryAfterDSSaved();
_.debuggerHelper.ClickDebuggerIcon();
_.debuggerHelper.OpenDebugger();
_.debuggerHelper.AssertOpen(PageType.Query);
//Verify if bottom bar is closed on clicking close icon in query page.
_.debuggerHelper.CloseBottomBar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,21 @@ describe("Sanitise toast error messages", () => {
EditorNavigation.SelectEntityByName("Button1", EntityType.Widget);
_.propPane.EnterJSContext("onClick", "{{a.kjbfjdfbkds()}}");
_.agHelper.ClickButton("Submit");
_.agHelper.WaitUntilToastDisappear("a is not defined");
_.debuggerHelper.AssertDebugError("'a' is not defined.", "", true, false);
});

it("2. Does not show type error label when js obj function does not exist", () => {
EditorNavigation.SelectEntityByName("Button1", EntityType.Widget);
_.propPane.EnterJSContext("onClick", "{{JSObject1.myFun1efef()}}");
// Assert the lint error that shows up
_.debuggerHelper.AssertDebugError(
`"myFun1efef" doesn't exist in JSObject1`,
"",
false,
false,
);
_.agHelper.ClickButton("Submit");
// Assert the execution error that shows up
_.agHelper.WaitUntilToastDisappear("Object1.myFun1efef is not a function");
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe("Inspect Entity", function () {
it("1. Check whether depedencies and references are shown correctly", function () {
cy.openPropertyPane("inputwidgetv2");
cy.testJsontext("defaultvalue", "{{Button1.text}}");
_.agHelper.GetNClick(".t--debugger-count");
_.debuggerHelper.OpenDebugger();
cy.contains(".ads-v2-tabs__list-tab", "Inspect entity").click();
cy.contains(".t--dependencies-item", "Button1").click();
cy.contains(".t--dependencies-item", "Input1");
Expand Down
Loading

0 comments on commit 06a7076

Please sign in to comment.