Skip to content

Commit

Permalink
Merge pull request #36124 from appsmithorg/release
Browse files Browse the repository at this point in the history
05/09 Daily Promotion
  • Loading branch information
yatinappsmith authored Sep 5, 2024
2 parents e87d96d + 65eb854 commit ab3ce54
Show file tree
Hide file tree
Showing 81 changed files with 780 additions and 427 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-client-server-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
runId: ${{steps.args.outputs.runId}}
matrix_count: ${{steps.matrix.outputs.matrix_count}}
run_count: ${{ steps.countArgs.outputs.run_count }}
is-pg-build: ${{steps.args.outputs.is-pg-build}}
steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v4
Expand All @@ -29,6 +30,7 @@ jobs:
id: args
run: |
echo "pr=${{ github.event.client_payload.pull_request.number }}" >> $GITHUB_OUTPUT
echo "is-pg-build=${{ github.event.client_payload.pull_request.base.ref == 'pg' }}" >> $GITHUB_OUTPUT
checkArg=${{ github.event.client_payload.slash_command.args.named.runId }}
if [[ -z "$checkArg" ]]; then
echo "runId=0" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -106,6 +108,7 @@ jobs:
with:
pr: ${{fromJson(needs.file-check.outputs.pr)}}
skip-tests: "true"
is-pg-build: ${{fromJson(needs.file-check.outputs.is-pg-build)}}

client-build:
name: client-build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-client-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
pr: ${{steps.args.outputs.pr}}
runId: ${{steps.args.outputs.runId}}
matrix_count: ${{steps.matrix.outputs.matrix_count}}
is-pg-build: ${{steps.args.outputs.is-pg-build}}
steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v4
Expand All @@ -27,6 +28,7 @@ jobs:
id: args
run: |
echo "pr=${{ github.event.client_payload.pull_request.number }}" >> $GITHUB_OUTPUT
echo "is-pg-build=${{ github.event.client_payload.pull_request.base.ref == 'pg' }}" >> $GITHUB_OUTPUT
checkArg=`echo '${{toJSON(github.event.client_payload.slash_command.args.named)}}' | jq 'has("runId")'`
if [[ $checkArg == 'true' ]]; then
echo "runId=${{ github.event.client_payload.slash_command.args.named.runId }}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -92,6 +94,7 @@ jobs:
with:
pr: ${{fromJson(needs.file-check.outputs.pr)}}
skip-tests: "true"
is-pg-build: ${{fromJson(needs.file-check.outputs.is-pg-build)}}

client-build:
name: client-build
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/sync-release-to-pg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ jobs:
uses: actions/checkout@v3
with:
ref: release # Checkout the release branch
fetch-depth: 0

- name: Fetch all branches
run: git fetch origin pg
- name: Set Git config values
run: |
git config pull.rebase false
git config user.email "[email protected]"
git config user.name "Automated Github Action"
- name: Checkout pg branch
run: git checkout pg

- name: Merge release to pg
id: merge_commits
run: |
PG_HEAD=$(git rev-parse pg)
RELEASE_HEAD=$(git rev-parse release)
echo "PG_HEAD=$PG_HEAD"
echo "RELEASE_HEAD=$RELEASE_HEAD"
# Checkout the pg branch
git checkout pg
# Attempt to merge release into pg
if ! git merge release; then
echo "Merge conflict detected during merge"
Expand All @@ -42,7 +42,6 @@ jobs:
CONFLICTING_COMMIT=$(git log -1 --pretty=format:"%H")
echo "CONFLICTING_COMMIT=$CONFLICTING_COMMIT" >> $GITHUB_ENV
git merge --abort
echo "MERGE_CONFLICT=true" >> $GITHUB_ENV
else
echo "MERGE_CONFLICT=false" >> $GITHUB_ENV
Expand All @@ -68,6 +67,8 @@ jobs:
# This unwieldy horror of a sed command, converts standard Markdown links to Slack's unwieldy link syntax.
slack_message="$(echo "$message" | sed -E 's/\[([^]]+)\]\(([^)]+)\)/<\2|\1>/g')"
echo "$slack_message"
# This is the ChannelId of the proj postgres channel.
body="$(jq -nc \
--arg channel C06Q3A97USE \
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
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 ab3ce54

Please sign in to comment.