Skip to content

feat: Replacing execute on load toggle with run behaviour in all actions / jsactions #40355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a9803cf
feat: Migrate executeOnLoad to runBehavior enum
ankitakinger Apr 22, 2025
acccb98
Merge pull request #40347 from appsmithorg/feat/replace-executeOnLoad…
vivek-appsmith Apr 23, 2025
3858d4d
feat: Replacing `executeOnLoad` with `runBehavior` in all action conf…
ankitakinger Apr 23, 2025
606b940
feat: Replacing remaining instances of `executeOnLoad` with `runBehav…
ankitakinger Apr 24, 2025
17bb150
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
ankitakinger Apr 24, 2025
f61747a
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
ankitakinger Apr 25, 2025
eff5699
chore: Update type for run behavior for some instances (#40393)
ankitakinger Apr 25, 2025
19605a6
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
ankitakinger Apr 29, 2025
3867bcf
fix: Updating JSFunctionSettings unit test to fix failure (#40480)
ankitakinger Apr 29, 2025
d1af0b8
fix: Cyclic dependencies for reactive queries run behavior changes (#…
ankitakinger Apr 30, 2025
fd15967
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
ankitakinger Apr 30, 2025
0c8bd0b
Merge branch 'feat/reactive-actions-run-behaviour' of https://github.…
ankitakinger Apr 30, 2025
62ccf03
ci: Fixing cypress tests that are failing due to the change from exec…
ankitakinger Apr 30, 2025
c5d2f5d
ci: Fixing remaining 4 failing cypress test cases (#40515)
ankitakinger Apr 30, 2025
bc2dcec
chore: Updating the spelling for `runBehaviour` (#40490)
ankitakinger May 2, 2025
fbaadc2
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
ankitakinger May 2, 2025
fb3aa4b
Merge branch 'feat/reactive-actions-run-behaviour' of https://github.…
ankitakinger May 2, 2025
0c74aee
ci: Updating fixtures to replace executeOnLoad with reactiveActions (…
ankitakinger May 2, 2025
5856863
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
ankitakinger May 7, 2025
1796b9d
Merge branch 'feat/reactive-actions-run-behaviour' of https://github.…
ankitakinger May 7, 2025
2e29675
Merge branch 'release' into feat/reactive-actions-run-behaviour
May 7, 2025
a46ef1c
Merge branch 'feat/reactive-actions-run-behaviour' of https://github.…
ankitakinger May 7, 2025
fa5b583
Merge branch 'release' into feat/reactive-actions-run-behaviour
May 7, 2025
ee2aeca
Merge branch 'feat/reactive-actions-run-behaviour' of https://github.…
ankitakinger May 8, 2025
d0a1e83
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
ankitakinger May 8, 2025
bf058d0
ci: Fixing partial export spec (#40611)
ankitakinger May 8, 2025
f34a597
feat: Updated references of all executeOnLoad to runBehaviour (#40361)
sneha122 May 8, 2025
7cd7438
feat: execute on load backwards compatibility backend changes (#40644)
sneha122 May 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe(
cy.wrap(jsObjectName).as("jsObjectName");
});

apiPage.clickSettingIcon(true);
apiPage.clickSettingIcon("On page load");

EditorNavigation.SelectEntityByName("Button1", EntityType.Widget);
propPane.ToggleJSMode("onClick", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe(
pluginActionForm.toolbar.toggleSettings();

cy.get(".label-icon-wrapper")
.contains("Run the query on page load")
.contains("Run behavior")
.parent()
.then(($el) => {
cy.window().then((win) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe(
prettify: false,
});

jsEditor.EnableDisableAsyncFuncSettings("myFun1", true);
jsEditor.EnableDisableAsyncFuncSettings("myFun1", "On page load");

ee.DragDropWidgetNVerify(WIDGET.TEXT, 200, 600);
EditorNavigation.SelectEntityByName("Text1", EntityType.Widget);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("Validate JSObj", {}, () => {
shouldCreateNewJSObj: true,
},
);
jsEditor.EnableDisableAsyncFuncSettings("myFun1");
jsEditor.EnableDisableAsyncFuncSettings("myFun1", "On page load");

// Add new JSObject
PageList.AddNewPage("New blank page");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ describe.skip(
_.dataManager.dsValues[_.dataManager.defaultEnviorment].mockApiUrl,
"Correct_users",
);
_.apiPage.ToggleOnPageLoadRun(true);
_.apiPage.ToggleOnPageLoadRun("On page load");
_.apiPage.CreateAndFillApi(
_.dataManager.dsValues[
_.dataManager.defaultEnviorment
].mockApiUrl.replace("mock-api", "mock-api2err"),
"Incorrect_users",
);
_.apiPage.ToggleOnPageLoadRun(true);
_.apiPage.ToggleOnPageLoadRun("On page load");
_.jsEditor.CreateJSObject(
`export default {
async myFun1 () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ describe(

it("3. Update 'setOptions' property - during onPage load", () => {
EditorNavigation.SelectEntityByName("JSObject1", EntityType.JSObject);
jsEditor.EnableDisableAsyncFuncSettings("myFun1", true); //for on page load execution
jsEditor.EnableDisableAsyncFuncSettings("myFun1", "On page load"); //for on page load execution
deployMode.DeployApp();
agHelper
.GetText(
Expand Down Expand Up @@ -268,7 +268,7 @@ describe(
])}, () => {showAlert('unable to run API')});
}
}`);
jsEditor.EnableDisableAsyncFuncSettings("myFunc1", true); //for on page load execution, since sync function is updated to async
jsEditor.EnableDisableAsyncFuncSettings("myFunc1", "On page load"); //for on page load execution, since sync function is updated to async
deployMode.DeployApp();
agHelper.WaitForCondition(
agHelper
Expand Down Expand Up @@ -313,7 +313,7 @@ describe(
Select3.setOptions(Select1.options.concat(Select2.options));
}
}`);
jsEditor.EnableDisableAsyncFuncSettings("myFunc1", true); //for on page load execution, since sync function is updated to async
jsEditor.EnableDisableAsyncFuncSettings("myFunc1", "On page load"); //for on page load execution, since sync function is updated to async
EditorNavigation.SelectEntityByName("Input1", EntityType.Widget);
propPane.UpdatePropertyFieldValue("Default value", "{{Select3.options}}");
deployMode.DeployApp();
Expand Down Expand Up @@ -355,7 +355,7 @@ describe(
setTimeout(() => {Select1.setOptions(localValue)}, 1000);
}
}`);
jsEditor.EnableDisableAsyncFuncSettings("myFun1", false); //for on page load execution
jsEditor.EnableDisableAsyncFuncSettings("myFun1", "Manual"); //for on page load execution
deployMode.DeployApp();
agHelper
.GetText(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ describe(
}`,
false,
);
jsEditor.EnableDisableAsyncFuncSettings("myFun1", true);
jsEditor.EnableDisableAsyncFuncSettings("myFun1", "On page load");
deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.BUTTON)); //Asserting before setTimeout JS function execution, button is visible
agHelper.Sleep(2000); //waiting for settimeout to execute
agHelper.AssertElementAbsence(
Expand Down Expand Up @@ -236,7 +236,7 @@ describe(
}`,
false,
);
jsEditor.EnableDisableAsyncFuncSettings("myFun1", false);
jsEditor.EnableDisableAsyncFuncSettings("myFun1", "Manual");
deployMode.DeployApp();
agHelper.AssertElementVisibility(
locators._widgetInDeployed(draggableWidgets.INPUT_V2), //Asserting before setTimeout JS function execution, Input is visible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe(

EditorNavigation.SelectEntityByName("MultipartAPI", EntityType.Api);

apiPage.ToggleOnPageLoadRun(false); //Bug 12476
apiPage.ToggleOnPageLoadRun("Manual"); //Bug 12476
EditorNavigation.SelectEntityByName("Page2", EntityType.Page);
deployMode.DeployApp(locators._buttonByText("Select Files"));
agHelper.ClickButton("Select Files");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ describe(
});

it("7. Tc #2365 - Query settings tab validations", () => {
apiPage.ToggleOnPageLoadRun(false); // All above cases validated for onpage load run with confirmation dialog set to false
apiPage.ToggleOnPageLoadRun("Manual"); // All above cases validated for onpage load run with confirmation dialog set to false
pluginActionForm.toolbar.toggleSettings();
apiPage.ToggleConfirmBeforeRunning(true);
deployMode.DeployApp();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ describe.skip(
"Select",
);
agHelper.RenameQuery("TemplateSelectQuery");
apiPage.ToggleOnPageLoadRun(true);
apiPage.ToggleOnPageLoadRun("On page load");
pluginActionForm.toolbar.toggleSettings();
apiPage.ToggleConfirmBeforeRunning(true);
agHelper.RefreshPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import PageList from "../../../../support/Pages/PageList";

interface IFunctionSettingData {
name: string;
onPageLoad: boolean;
runBehaviour: "On page load" | "Manual";
confirmBeforeExecute: boolean;
// uses the "async" keyword
isMarkedAsync: boolean;
Expand All @@ -35,31 +35,31 @@ describe(
const FUNCTIONS_SETTINGS_DEFAULT_DATA: IFunctionSettingData[] = [
{
name: "getId",
onPageLoad: true,
runBehaviour: "On page load",
confirmBeforeExecute: false,
isMarkedAsync: true,
},
{
name: "zip",
onPageLoad: true,
runBehaviour: "On page load",
confirmBeforeExecute: true,
isMarkedAsync: false,
},
{
name: "base",
onPageLoad: false,
runBehaviour: "Manual",
confirmBeforeExecute: false,
isMarkedAsync: true,
},
{
name: "assert",
onPageLoad: false,
runBehaviour: "Manual",
confirmBeforeExecute: false,
isMarkedAsync: false,
},
{
name: "test",
onPageLoad: true,
runBehaviour: "On page load",
confirmBeforeExecute: true,
isMarkedAsync: true,
},
Expand Down Expand Up @@ -359,7 +359,7 @@ describe(
// Number of functions set to run on page load and should also confirm before execute
onPageLoadAndConfirmExecuteFunctionsLength =
FUNCTIONS_SETTINGS_DEFAULT_DATA.filter(
(func) => func.onPageLoad && func.confirmBeforeExecute,
(func) => func.runBehaviour && func.confirmBeforeExecute,
).length;

getJSObject = (data: IFunctionSettingData[]) => {
Expand Down Expand Up @@ -404,7 +404,7 @@ describe(
(functionSetting) => {
jsEditor.EnableDisableAsyncFuncSettings(
functionSetting.name,
functionSetting.onPageLoad,
functionSetting.runBehaviour,
);
},
);
Expand All @@ -425,31 +425,31 @@ describe(
const FUNCTIONS_SETTINGS_RENAMED_DATA: IFunctionSettingData[] = [
{
name: "newGetId",
onPageLoad: true,
runBehaviour: "On page load",
confirmBeforeExecute: false,
isMarkedAsync: false,
},
{
name: "zip1",
onPageLoad: true,
runBehaviour: "On page load",
confirmBeforeExecute: true,
isMarkedAsync: true,
},
{
name: "base",
onPageLoad: false,
runBehaviour: "Manual",
confirmBeforeExecute: false,
isMarkedAsync: true,
},
{
name: "newAssert",
onPageLoad: true,
runBehaviour: "On page load",
confirmBeforeExecute: false,
isMarkedAsync: false,
},
{
name: "test",
onPageLoad: true,
runBehaviour: "On page load",
confirmBeforeExecute: true,
isMarkedAsync: true,
},
Expand Down Expand Up @@ -500,12 +500,12 @@ return "yes";`;
});

// Enable all settings
jsEditor.EnableDisableAsyncFuncSettings("asyncToSync", true);
jsEditor.EnableDisableAsyncFuncSettings("asyncToSync", "On page load");

// Modify js object
jsEditor.EditJSObj(syncJSCode, false);
agHelper.RefreshPage();
jsEditor.VerifyAsyncFuncSettings("asyncToSync", true);
jsEditor.VerifyAsyncFuncSettings("asyncToSync", "On page load");
agHelper.ActionContextMenuWithInPane({
action: "Delete",
entityType: entityItems.JSObject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ describe(
prettify: true,
},
);
jsEditor.EnableDisableAsyncFuncSettings("myFun1", true);
jsEditor.EnableDisableAsyncFuncSettings("myFun1", "On page load");
deployMode.DeployApp();
agHelper.Sleep(1000); //DeployApp already waiting 2000ms hence reducing it here to equate to 3000 timeout
agHelper.AssertContains("Success!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe(
"PageLoadApi2",
);
});
apiPage.ToggleOnPageLoadRun(true);
apiPage.ToggleOnPageLoadRun("On page load");
EditorNavigation.SelectEntityByName("Table1", EntityType.Widget, {}, [
"Container3",
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe(
},
);

jsEditor.EnableDisableAsyncFuncSettings("astros", true);
jsEditor.EnableDisableAsyncFuncSettings("astros", "On page load");

EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
agHelper.RefreshPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ describe(
},
);

jsEditor.VerifyAsyncFuncSettings("myFun1", false);
jsEditor.VerifyAsyncFuncSettings("myFun2", false);
jsEditor.VerifyAsyncFuncSettings("myFun3", false);
jsEditor.VerifyAsyncFuncSettings("myFun4", false);
jsEditor.VerifyAsyncFuncSettings("myFun5", false);
jsEditor.VerifyAsyncFuncSettings("myFun6", false);
jsEditor.VerifyAsyncFuncSettings("myFun1", "Manual");
jsEditor.VerifyAsyncFuncSettings("myFun2", "Manual");
jsEditor.VerifyAsyncFuncSettings("myFun3", "Manual");
jsEditor.VerifyAsyncFuncSettings("myFun4", "Manual");
jsEditor.VerifyAsyncFuncSettings("myFun5", "Manual");
jsEditor.VerifyAsyncFuncSettings("myFun6", "Manual");

VerifyFunctionDropdown([
"myFun1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe(
propPane.EnterJSContext("Table data", "{{ParamsTest.data}}");

EditorNavigation.SelectEntityByName("ParamsTest", EntityType.Query);
apiPage.ToggleOnPageLoadRun(false); //Bug 12476
apiPage.ToggleOnPageLoadRun("Manual"); //Bug 12476

deployMode.DeployApp(locators._buttonByText("Submit"));
agHelper.SelectDropDown("7");
Expand Down

Large diffs are not rendered by default.

Loading
Loading