diff --git a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts index 3672d76cab..2b096e4fd0 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/JsFunctionExecution/JSFunctionExecution_spec.ts @@ -17,7 +17,7 @@ import PageList from "../../../../support/Pages/PageList"; interface IFunctionSettingData { name: string; - runBehavior: "On page load" | "Manual"; + runBehaviour: "On page load" | "Manual"; confirmBeforeExecute: boolean; // uses the "async" keyword isMarkedAsync: boolean; @@ -35,31 +35,31 @@ describe( const FUNCTIONS_SETTINGS_DEFAULT_DATA: IFunctionSettingData[] = [ { name: "getId", - runBehavior: "On page load", + runBehaviour: "On page load", confirmBeforeExecute: false, isMarkedAsync: true, }, { name: "zip", - runBehavior: "On page load", + runBehaviour: "On page load", confirmBeforeExecute: true, isMarkedAsync: false, }, { name: "base", - runBehavior: "Manual", + runBehaviour: "Manual", confirmBeforeExecute: false, isMarkedAsync: true, }, { name: "assert", - runBehavior: "Manual", + runBehaviour: "Manual", confirmBeforeExecute: false, isMarkedAsync: false, }, { name: "test", - runBehavior: "On page load", + runBehaviour: "On page load", confirmBeforeExecute: true, isMarkedAsync: true, }, @@ -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.runBehavior && func.confirmBeforeExecute, + (func) => func.runBehaviour && func.confirmBeforeExecute, ).length; getJSObject = (data: IFunctionSettingData[]) => { @@ -404,7 +404,7 @@ describe( (functionSetting) => { jsEditor.EnableDisableAsyncFuncSettings( functionSetting.name, - functionSetting.runBehavior, + functionSetting.runBehaviour, ); }, ); @@ -425,31 +425,31 @@ describe( const FUNCTIONS_SETTINGS_RENAMED_DATA: IFunctionSettingData[] = [ { name: "newGetId", - runBehavior: "On page load", + runBehaviour: "On page load", confirmBeforeExecute: false, isMarkedAsync: false, }, { name: "zip1", - runBehavior: "On page load", + runBehaviour: "On page load", confirmBeforeExecute: true, isMarkedAsync: true, }, { name: "base", - runBehavior: "Manual", + runBehaviour: "Manual", confirmBeforeExecute: false, isMarkedAsync: true, }, { name: "newAssert", - runBehavior: "On page load", + runBehaviour: "On page load", confirmBeforeExecute: false, isMarkedAsync: false, }, { name: "test", - runBehavior: "On page load", + runBehaviour: "On page load", confirmBeforeExecute: true, isMarkedAsync: true, }, diff --git a/app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json b/app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json index 5690c18e67..4336a381bf 100644 --- a/app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json +++ b/app/client/cypress/fixtures/PartialImportExport/PartialImportExportSampleApp.json @@ -2208,7 +2208,7 @@ "selfReferencingDataPaths": [], "jsArguments": [] }, - "runBehavior": "MANUAL", + "runBehaviour": "MANUAL", "clientSideExecution": true, "dynamicBindingPathList": [{ "key": "body" }], "isValid": true, @@ -2264,7 +2264,7 @@ "selfReferencingDataPaths": [], "jsArguments": [{ "name": "a" }, { "name": "b" }] }, - "runBehavior": "MANUAL", + "runBehaviour": "MANUAL", "dynamicBindingPathList": [{ "key": "body" }], "isValid": true, "invalids": [], @@ -2318,7 +2318,7 @@ "selfReferencingDataPaths": [], "pluginSpecifiedTemplates": [{ "value": true }] }, - "runBehavior": "MANUAL", + "runBehaviour": "MANUAL", "isValid": true, "invalids": [], "messages": [], @@ -2383,7 +2383,7 @@ "selfReferencingDataPaths": [], "pluginSpecifiedTemplates": [{ "value": true }] }, - "runBehavior": "MANUAL", + "runBehaviour": "MANUAL", "isValid": true, "invalids": [], "messages": [], @@ -2447,7 +2447,7 @@ "selfReferencingDataPaths": [], "pluginSpecifiedTemplates": [{ "value": true }] }, - "runBehavior": "MANUAL", + "runBehaviour": "MANUAL", "isValid": true, "invalids": [], "messages": [], @@ -2499,7 +2499,7 @@ "selfReferencingDataPaths": [], "pluginSpecifiedTemplates": [{ "value": false }] }, - "runBehavior": "ON_PAGE_LOAD", + "runBehaviour": "ON_PAGE_LOAD", "isValid": true, "invalids": [], "messages": [], diff --git a/app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json b/app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json index 9047739f83..380465bc09 100644 --- a/app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json +++ b/app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json @@ -1 +1 @@ -{"artifactJsonType":"APPLICATION","clientSchemaVersion":1,"serverSchemaVersion":7,"actionList":[{"id":"Home_InsertQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"InsertQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"INSERT INTO public.\"users\" (\n\t\"gender\",\n\t\"latitude\",\n\t\"longitude\",\n\t\"dob\",\n\t\"phone\",\n\t\"email\",\n\t\"image\",\n\t\"country\",\n\t\"name\",\n\t\"created_at\",\n\t\"updated_at\"\n)\nVALUES (\n\t'{{insert_form.formData.gender}}',\n\t'{{insert_form.formData.latitude}}',\n\t'{{insert_form.formData.longitude}}',\n\t'{{insert_form.formData.dob}}',\n\t'{{insert_form.formData.phone}}',\n\t'{{insert_form.formData.email}}',\n\t'{{insert_form.formData.image}}',\n\t'{{insert_form.formData.country}}',\n\t'{{insert_form.formData.name}}',\n\t'{{insert_form.formData.created_at}}',\n\t'{{insert_form.formData.updated_at}}'\n);","pluginSpecifiedTemplates":[{"value":true}]},"runBehavior":"MANUAL","isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["insert_form.formData.dob","insert_form.formData.image","insert_form.formData.gender","insert_form.formData.email","insert_form.formData.name","insert_form.formData.longitude","insert_form.formData.updated_at","insert_form.formData.phone","insert_form.formData.latitude","insert_form.formData.created_at","insert_form.formData.country"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true},"runBehavior":"MANUAL","messages":[],"confirmBeforeExecute":false,"userPermissions":[]}},{"id":"Home_DeleteQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"DeleteQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"DELETE FROM public.\"users\"\n WHERE \"id\" = {{data_table.triggeredRow.id}};","pluginSpecifiedTemplates":[{"value":true}]},"runBehavior":"MANUAL","isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["data_table.triggeredRow.id"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true},"runBehavior":"MANUAL","messages":[],"confirmBeforeExecute":false,"userPermissions":[]}},{"id":"Home_UpdateQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"UpdateQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"UPDATE public.\"users\" SET\n\t\t\"gender\" = '{{update_form.fieldState.gender.isVisible ? update_form.formData.gender : update_form.sourceData.gender}}',\n\t\t\"latitude\" = '{{update_form.fieldState.latitude.isVisible ? update_form.formData.latitude : update_form.sourceData.latitude}}',\n \"longitude\" = '{{update_form.fieldState.longitude.isVisible ? update_form.formData.longitude : update_form.sourceData.longitude}}',\n\t\t\"dob\" = '{{update_form.fieldState.dob.isVisible ? update_form.formData.dob : update_form.sourceData.dob}}',\n\t\t\"phone\" = '{{update_form.fieldState.phone.isVisible ? update_form.formData.phone : update_form.sourceData.phone}}',\n\t\t\"email\" = '{{update_form.fieldState.email.isVisible ? update_form.formData.email : update_form.sourceData.email}}',\n\t\t\"image\" = '{{update_form.fieldState.image.isVisible ? update_form.formData.image : update_form.sourceData.image}}',\n\t\t\"country\" = '{{update_form.fieldState.country.isVisible ? update_form.formData.country : update_form.sourceData.country}}',\n\t\t\"name\" = '{{update_form.fieldState.name.isVisible ? update_form.formData.name : update_form.sourceData.name}}',\n\t\t\"created_at\" = '{{update_form.fieldState.created_at.isVisible ? update_form.formData.created_at : update_form.sourceData.created_at}}',\n\t\t\"updated_at\" = '{{update_form.fieldState.updated_at.isVisible ? update_form.formData.updated_at : update_form.sourceData.updated_at}}'\n\tWHERE \"id\" = {{data_table.selectedRow.id}};","pluginSpecifiedTemplates":[{"value":true}]},"runBehavior":"MANUAL","isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["update_form.fieldState.latitude.isVisible ? update_form.formData.latitude : update_form.sourceData.latitude","update_form.fieldState.image.isVisible ? update_form.formData.image : update_form.sourceData.image","data_table.selectedRow.id","update_form.fieldState.country.isVisible ? update_form.formData.country : update_form.sourceData.country","update_form.fieldState.longitude.isVisible ? update_form.formData.longitude : update_form.sourceData.longitude","update_form.fieldState.updated_at.isVisible ? update_form.formData.updated_at : update_form.sourceData.updated_at","update_form.fieldState.email.isVisible ? update_form.formData.email : update_form.sourceData.email","update_form.fieldState.created_at.isVisible ? update_form.formData.created_at : update_form.sourceData.created_at","update_form.fieldState.dob.isVisible ? update_form.formData.dob : update_form.sourceData.dob","update_form.fieldState.name.isVisible ? update_form.formData.name : update_form.sourceData.name","update_form.fieldState.gender.isVisible ? update_form.formData.gender : update_form.sourceData.gender","update_form.fieldState.phone.isVisible ? update_form.formData.phone : update_form.sourceData.phone"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true},"runBehavior":"MANUAL","messages":[],"confirmBeforeExecute":false,"userPermissions":[]}},{"id":"Home_SelectQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"SelectQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"SELECT * FROM public.\"users\"\nWHERE \"gender\" ilike '%{{data_table.searchText || \"\"}}%'\nORDER BY \"{{data_table.sortOrder.column || 'id'}}\" {{data_table.sortOrder.order || 'ASC'}}\nLIMIT {{data_table.pageSize}}\nOFFSET {{(data_table.pageNo - 1) * data_table.pageSize}};","pluginSpecifiedTemplates":[{"value":false}]},"runBehavior":"ON_PAGE_LOAD","isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["data_table.sortOrder.column || 'id'","data_table.sortOrder.order || 'ASC'","data_table.pageSize","data_table.searchText || \"\"","(data_table.pageNo - 1) * data_table.pageSize"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true},"runBehavior":"MANUAL","messages":[],"confirmBeforeExecute":false,"userPermissions":[]}}],"widgets":""} +{"artifactJsonType":"APPLICATION","clientSchemaVersion":1,"serverSchemaVersion":7,"actionList":[{"id":"Home_InsertQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"InsertQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"INSERT INTO public.\"users\" (\n\t\"gender\",\n\t\"latitude\",\n\t\"longitude\",\n\t\"dob\",\n\t\"phone\",\n\t\"email\",\n\t\"image\",\n\t\"country\",\n\t\"name\",\n\t\"created_at\",\n\t\"updated_at\"\n)\nVALUES (\n\t'{{insert_form.formData.gender}}',\n\t'{{insert_form.formData.latitude}}',\n\t'{{insert_form.formData.longitude}}',\n\t'{{insert_form.formData.dob}}',\n\t'{{insert_form.formData.phone}}',\n\t'{{insert_form.formData.email}}',\n\t'{{insert_form.formData.image}}',\n\t'{{insert_form.formData.country}}',\n\t'{{insert_form.formData.name}}',\n\t'{{insert_form.formData.created_at}}',\n\t'{{insert_form.formData.updated_at}}'\n);","pluginSpecifiedTemplates":[{"value":true}]},"runBehaviour":"MANUAL","isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["insert_form.formData.dob","insert_form.formData.image","insert_form.formData.gender","insert_form.formData.email","insert_form.formData.name","insert_form.formData.longitude","insert_form.formData.updated_at","insert_form.formData.phone","insert_form.formData.latitude","insert_form.formData.created_at","insert_form.formData.country"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true},"runBehaviour":"MANUAL","messages":[],"confirmBeforeExecute":false,"userPermissions":[]}},{"id":"Home_DeleteQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"DeleteQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"DELETE FROM public.\"users\"\n WHERE \"id\" = {{data_table.triggeredRow.id}};","pluginSpecifiedTemplates":[{"value":true}]},"runBehaviour":"MANUAL","isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["data_table.triggeredRow.id"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true},"runBehaviour":"MANUAL","messages":[],"confirmBeforeExecute":false,"userPermissions":[]}},{"id":"Home_UpdateQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"UpdateQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"UPDATE public.\"users\" SET\n\t\t\"gender\" = '{{update_form.fieldState.gender.isVisible ? update_form.formData.gender : update_form.sourceData.gender}}',\n\t\t\"latitude\" = '{{update_form.fieldState.latitude.isVisible ? update_form.formData.latitude : update_form.sourceData.latitude}}',\n \"longitude\" = '{{update_form.fieldState.longitude.isVisible ? update_form.formData.longitude : update_form.sourceData.longitude}}',\n\t\t\"dob\" = '{{update_form.fieldState.dob.isVisible ? update_form.formData.dob : update_form.sourceData.dob}}',\n\t\t\"phone\" = '{{update_form.fieldState.phone.isVisible ? update_form.formData.phone : update_form.sourceData.phone}}',\n\t\t\"email\" = '{{update_form.fieldState.email.isVisible ? update_form.formData.email : update_form.sourceData.email}}',\n\t\t\"image\" = '{{update_form.fieldState.image.isVisible ? update_form.formData.image : update_form.sourceData.image}}',\n\t\t\"country\" = '{{update_form.fieldState.country.isVisible ? update_form.formData.country : update_form.sourceData.country}}',\n\t\t\"name\" = '{{update_form.fieldState.name.isVisible ? update_form.formData.name : update_form.sourceData.name}}',\n\t\t\"created_at\" = '{{update_form.fieldState.created_at.isVisible ? update_form.formData.created_at : update_form.sourceData.created_at}}',\n\t\t\"updated_at\" = '{{update_form.fieldState.updated_at.isVisible ? update_form.formData.updated_at : update_form.sourceData.updated_at}}'\n\tWHERE \"id\" = {{data_table.selectedRow.id}};","pluginSpecifiedTemplates":[{"value":true}]},"runBehaviour":"MANUAL","isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["update_form.fieldState.latitude.isVisible ? update_form.formData.latitude : update_form.sourceData.latitude","update_form.fieldState.image.isVisible ? update_form.formData.image : update_form.sourceData.image","data_table.selectedRow.id","update_form.fieldState.country.isVisible ? update_form.formData.country : update_form.sourceData.country","update_form.fieldState.longitude.isVisible ? update_form.formData.longitude : update_form.sourceData.longitude","update_form.fieldState.updated_at.isVisible ? update_form.formData.updated_at : update_form.sourceData.updated_at","update_form.fieldState.email.isVisible ? update_form.formData.email : update_form.sourceData.email","update_form.fieldState.created_at.isVisible ? update_form.formData.created_at : update_form.sourceData.created_at","update_form.fieldState.dob.isVisible ? update_form.formData.dob : update_form.sourceData.dob","update_form.fieldState.name.isVisible ? update_form.formData.name : update_form.sourceData.name","update_form.fieldState.gender.isVisible ? update_form.formData.gender : update_form.sourceData.gender","update_form.fieldState.phone.isVisible ? update_form.formData.phone : update_form.sourceData.phone"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true},"runBehaviour":"MANUAL","messages":[],"confirmBeforeExecute":false,"userPermissions":[]}},{"id":"Home_SelectQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"SelectQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"SELECT * FROM public.\"users\"\nWHERE \"gender\" ilike '%{{data_table.searchText || \"\"}}%'\nORDER BY \"{{data_table.sortOrder.column || 'id'}}\" {{data_table.sortOrder.order || 'ASC'}}\nLIMIT {{data_table.pageSize}}\nOFFSET {{(data_table.pageNo - 1) * data_table.pageSize}};","pluginSpecifiedTemplates":[{"value":false}]},"runBehaviour":"ON_PAGE_LOAD","isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["data_table.sortOrder.column || 'id'","data_table.sortOrder.order || 'ASC'","data_table.pageSize","data_table.searchText || \"\"","(data_table.pageNo - 1) * data_table.pageSize"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true},"runBehaviour":"MANUAL","messages":[],"confirmBeforeExecute":false,"userPermissions":[]}}],"widgets":""} diff --git a/app/client/cypress/support/Pages/ApiPage.ts b/app/client/cypress/support/Pages/ApiPage.ts index 9e162e27b5..ed35a149d3 100644 --- a/app/client/cypress/support/Pages/ApiPage.ts +++ b/app/client/cypress/support/Pages/ApiPage.ts @@ -104,8 +104,8 @@ export class ApiPage { public moreActionsTrigger = "[data-testid='t--more-action-trigger']"; private apiNameInput = this.locator._activeEntityTabInput; public pageList = ".ads-v2-sub-menu > .ads-v2-menu__menu-item"; - public _runBehaviorDropdown = "[data-testid='t--dropdown-runBehavior']"; - public _runBehaviorOption = (runBehaviour: string) => + public _runBehaviourDropdown = "[data-testid='t--dropdown-runBehaviour']"; + public _runBehaviourOption = (runBehaviour: string) => `.rc-select-item-option-content [data-testid='t--label-${runBehaviour}']`; CreateApi( @@ -275,16 +275,14 @@ export class ApiPage { this.SelectPaneTab("Headers"); } - ToggleOnPageLoadRun(runBehavior: "On page load" | "Manual") { + ToggleOnPageLoadRun(runBehaviour: "On page load" | "Manual") { // Navigate to Settings tab this.pluginActionForm.toolbar.toggleSettings(); - // Set runBehavior to On page load - this.agHelper.GetNClick(this._runBehaviorDropdown); + // Set runBehaviour to On page load + this.agHelper.GetNClick(this._runBehaviourDropdown); this.agHelper.GetNClickByContains( - this._runBehaviorOption, - runBehavior, - 0, - true, + this._runBehaviourOption(runBehaviour), + runBehaviour, ); } @@ -510,24 +508,24 @@ export class ApiPage { this.RunAPI(); } - ToggleOnPageLoadRunJsObject(runBehavior: "On page load" | "Manual") { + ToggleOnPageLoadRunJsObject(runBehaviour: "On page load" | "Manual") { // Navigate to Settings tab this.agHelper.GetNClick(this.settingsTriggerLocator); - // Set runBehavior to On page load - this.agHelper.GetNClick(this._runBehaviorDropdown); + // Set runBehaviour to On page load + this.agHelper.GetNClick(this._runBehaviourDropdown); this.agHelper.GetNClickByContains( - this._runBehaviorOption(runBehavior), - runBehavior, + this._runBehaviourOption(runBehaviour), + runBehaviour, ); } - public clickSettingIcon(runBehavior: "On page load" | "Manual") { + public clickSettingIcon(runBehaviour: "On page load" | "Manual") { this.agHelper.GetNClick(this.settingsTriggerLocator); - // Set runBehavior to On page load - this.agHelper.GetNClick(this._runBehaviorDropdown); + // Set runBehaviour to On page load + this.agHelper.GetNClick(this._runBehaviourDropdown); this.agHelper.GetNClickByContains( - this._runBehaviorOption(runBehavior), - runBehavior, + this._runBehaviourOption(runBehaviour), + runBehaviour, ); } diff --git a/app/client/cypress/support/Pages/JSEditor.ts b/app/client/cypress/support/Pages/JSEditor.ts index 5782f9a1eb..f24998cc18 100644 --- a/app/client/cypress/support/Pages/JSEditor.ts +++ b/app/client/cypress/support/Pages/JSEditor.ts @@ -300,27 +300,27 @@ export class JSEditor { public VerifyAsyncFuncSettings( funName: string, - runBehavior: "On page load" | "Manual", + runBehaviour: "On page load" | "Manual", ) { this.toolbar.toggleSettings(); this.agHelper.GetNAssertContains( this.__runBehaviourSwitchStatus(funName), - runBehavior, + runBehaviour, ); this.toolbar.toggleSettings(); } public EnableDisableAsyncFuncSettings( funName: string, - runBehavior: "On page load" | "Manual", + runBehaviour: "On page load" | "Manual", ) { // Navigate to Settings tab this.toolbar.toggleSettings(); - // Set runBehavior to On page load + // Set runBehaviour to On page load this.agHelper.GetNClick(this._runBehaviourSwitch(funName)); this.agHelper.GetNClickByContains( - this._dropdownOption(runBehavior), - runBehavior, + this._dropdownOption(runBehaviour), + runBehaviour, ); // Return to code tab this.toolbar.toggleSettings(); diff --git a/app/client/src/PluginActionEditor/transformers/RestActionTransformers.test.ts b/app/client/src/PluginActionEditor/transformers/RestActionTransformers.test.ts index 1f070b2300..f34bfb2179 100644 --- a/app/client/src/PluginActionEditor/transformers/RestActionTransformers.test.ts +++ b/app/client/src/PluginActionEditor/transformers/RestActionTransformers.test.ts @@ -15,7 +15,7 @@ import { const BASE_ACTION: ApiAction = { dynamicBindingPathList: [], cacheResponse: "", - runBehavior: "MANUAL", + runBehaviour: "MANUAL", invalids: [], isValid: false, workspaceId: "", diff --git a/app/client/src/actions/pluginActionActions.ts b/app/client/src/actions/pluginActionActions.ts index 2db9e6dc01..342d2ae7a3 100644 --- a/app/client/src/actions/pluginActionActions.ts +++ b/app/client/src/actions/pluginActionActions.ts @@ -352,9 +352,9 @@ export const executePageLoadActions = ( }; }; -export const setActionsRunBehavior = ( +export const setActionsRunBehaviour = ( actions: Array<{ - runBehavior: ActionRunBehaviourType; + runBehaviour: ActionRunBehaviourType; id: string; name: string; }>, @@ -365,9 +365,9 @@ export const setActionsRunBehavior = ( }; }; -export const setJSActionsRunBehavior = ( +export const setJSActionsRunBehaviour = ( actions: Array<{ - runBehavior: ActionRunBehaviourType; + runBehaviour: ActionRunBehaviourType; id: string; name: string; collectionId?: string; diff --git a/app/client/src/api/ActionAPI.tsx b/app/client/src/api/ActionAPI.tsx index f832e2fa41..acec49c59e 100644 --- a/app/client/src/api/ActionAPI.tsx +++ b/app/client/src/api/ActionAPI.tsx @@ -302,12 +302,12 @@ class ActionAPI extends API { }); } - static async updateActionRunBehavior( + static async updateActionRunBehaviour( actionId: string, - runBehavior: ActionRunBehaviourType, + runBehaviour: ActionRunBehaviourType, ) { - return API.put(ActionAPI.url + `/runBehavior/${actionId}`, undefined, { - behavior: runBehavior, + return API.put(ActionAPI.url + `/runBehaviour/${actionId}`, undefined, { + behaviour: runBehaviour, }); } } diff --git a/app/client/src/api/PageApi.tsx b/app/client/src/api/PageApi.tsx index 90bc7ddc49..29358cbebc 100644 --- a/app/client/src/api/PageApi.tsx +++ b/app/client/src/api/PageApi.tsx @@ -70,7 +70,7 @@ export interface SavePageResponseData { dsl: Partial; messages: string[]; actionUpdates: Array<{ - runBehavior: ActionRunBehaviourType; + runBehaviour: ActionRunBehaviourType; id: string; name: string; collectionId?: string; diff --git a/app/client/src/ce/entities/DataTree/dataTreeJSAction.test.ts b/app/client/src/ce/entities/DataTree/dataTreeJSAction.test.ts index 158b9839e6..704b083d5f 100644 --- a/app/client/src/ce/entities/DataTree/dataTreeJSAction.test.ts +++ b/app/client/src/ce/entities/DataTree/dataTreeJSAction.test.ts @@ -44,7 +44,7 @@ describe("generateDataTreeJSAction", () => { body: "async () => {\n\t\t//use async-await or promises\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", dynamicBindingPathList: [ { key: "body", @@ -91,7 +91,7 @@ describe("generateDataTreeJSAction", () => { body: "() => {\n\t\t//write code here\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -239,7 +239,7 @@ describe("generateDataTreeJSAction", () => { body: "async () => {\n\t\t//use async-await or promises\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", dynamicBindingPathList: [ { key: "body", @@ -286,7 +286,7 @@ describe("generateDataTreeJSAction", () => { body: "() => {\n\t\t//write code here\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { diff --git a/app/client/src/ce/reducers/entityReducers/actionsReducer.tsx b/app/client/src/ce/reducers/entityReducers/actionsReducer.tsx index 36c773911e..88263eb788 100644 --- a/app/client/src/ce/reducers/entityReducers/actionsReducer.tsx +++ b/app/client/src/ce/reducers/entityReducers/actionsReducer.tsx @@ -315,7 +315,7 @@ export const handlers = { draftMetaState: ActionDataState, action: ReduxAction< Array<{ - runBehavior: ActionRunBehaviourType; + runBehaviour: ActionRunBehaviourType; id: string; name: string; }> @@ -325,8 +325,8 @@ export const handlers = { draftMetaState.forEach((action) => { if (action.config.id in actionUpdateSearch) { - action.config.runBehavior = - actionUpdateSearch[action.config.id].runBehavior; + action.config.runBehaviour = + actionUpdateSearch[action.config.id].runBehaviour; } }); }, diff --git a/app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx b/app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx index ad390f8f6c..93d3bdf1d6 100644 --- a/app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx +++ b/app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx @@ -366,14 +366,14 @@ export const handlers = { action: ReduxAction<{ actionId: string; collectionId: string; - runBehavior: ActionRunBehaviourType; + runBehaviour: ActionRunBehaviourType; }>, ): JSCollectionDataState => state.map((a) => { if (a.config.id === action.payload.collectionId) { const updatedActions = a.config.actions.map((jsAction) => { if (jsAction.id === action.payload.actionId) { - set(jsAction, `runBehavior`, action.payload.runBehavior); + set(jsAction, `runBehaviour`, action.payload.runBehaviour); } return jsAction; @@ -394,7 +394,7 @@ export const handlers = { state: JSCollectionDataState, action: ReduxAction< Array<{ - runBehavior: ActionRunBehaviourType; + runBehaviour: ActionRunBehaviourType; id: string; name: string; collectionId: string; @@ -411,7 +411,7 @@ export const handlers = { allActions.forEach((js) => { if (js.id in actionUpdateSearch) { - js.runBehavior = actionUpdateSearch[js.id].runBehavior; + js.runBehaviour = actionUpdateSearch[js.id].runBehaviour; } }); } diff --git a/app/client/src/ce/sagas/PageSagas.tsx b/app/client/src/ce/sagas/PageSagas.tsx index 555cf72c1e..dce33de646 100644 --- a/app/client/src/ce/sagas/PageSagas.tsx +++ b/app/client/src/ce/sagas/PageSagas.tsx @@ -88,8 +88,8 @@ import { fetchActionsForPageError, fetchActionsForPageSuccess, fetchActionsForView, - setActionsRunBehavior, - setJSActionsRunBehavior, + setActionsRunBehaviour, + setJSActionsRunBehaviour, } from "actions/pluginActionActions"; import type { UrlDataState } from "reducers/entityReducers/appReducer"; import { APP_MODE } from "entities/App"; @@ -536,7 +536,7 @@ export function* savePageSaga(action: ReduxAction<{ isRetry?: boolean }>) { ); if (actions && actions.length) { - yield put(setActionsRunBehavior(actions)); + yield put(setActionsRunBehaviour(actions)); } const jsActions = actionUpdates.filter((d) => @@ -544,7 +544,7 @@ export function* savePageSaga(action: ReduxAction<{ isRetry?: boolean }>) { ); if (jsActions && jsActions.length) { - yield put(setJSActionsRunBehavior(jsActions)); + yield put(setJSActionsRunBehaviour(jsActions)); } } diff --git a/app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts b/app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts index 7425f70d0e..2120bdc0db 100644 --- a/app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts +++ b/app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts @@ -44,7 +44,7 @@ const jsObject: JSCollectionData = { jsArguments: [], isAsync: false, }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -86,7 +86,7 @@ const jsObject: JSCollectionData = { jsArguments: [], isAsync: true, }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { diff --git a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts index 3fc4e2ae85..d00c56822f 100644 --- a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts +++ b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts @@ -2307,7 +2307,7 @@ export const defaultAppState = { }, ], }, - runBehavior: "ON_PAGE_LOAD", + runBehaviour: "ON_PAGE_LOAD", dynamicBindingPathList: [], isValid: true, invalids: [], @@ -2391,7 +2391,7 @@ export const defaultAppState = { }, }, }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", isValid: true, invalids: [], messages: [], @@ -10039,7 +10039,7 @@ export const defaultAppState = { children: [ { label: "Run behavior", - configProperty: "runBehavior", + configProperty: "runBehaviour", controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ @@ -10090,7 +10090,7 @@ export const defaultAppState = { children: [ { label: "Run behavior", - configProperty: "runBehavior", + configProperty: "runBehaviour", controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ @@ -10141,7 +10141,7 @@ export const defaultAppState = { children: [ { label: "Run behavior", - configProperty: "runBehavior", + configProperty: "runBehaviour", controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ @@ -10221,7 +10221,7 @@ export const defaultAppState = { children: [ { label: "Run behavior", - configProperty: "runBehavior", + configProperty: "runBehaviour", controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ @@ -10412,7 +10412,7 @@ export const defaultAppState = { selfReferencingDataPaths: [], jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -10462,7 +10462,7 @@ export const defaultAppState = { selfReferencingDataPaths: [], jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -10546,7 +10546,7 @@ export const defaultAppState = { selfReferencingDataPaths: [], jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -10596,7 +10596,7 @@ export const defaultAppState = { selfReferencingDataPaths: [], jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { diff --git a/app/client/src/components/editorComponents/utils.test.ts b/app/client/src/components/editorComponents/utils.test.ts index ba64f41e36..7a182accc2 100644 --- a/app/client/src/components/editorComponents/utils.test.ts +++ b/app/client/src/components/editorComponents/utils.test.ts @@ -31,7 +31,7 @@ const TEST_JS_FUNCTION = { jsArguments: [], isAsync: true, }, - runBehavior: ActionRunBehaviour.MANUAL, + runBehaviour: ActionRunBehaviour.MANUAL, clientSideExecution: true, dynamicBindingPathList: [ { diff --git a/app/client/src/components/formControls/utils.ts b/app/client/src/components/formControls/utils.ts index 1889608f6f..487917ff83 100644 --- a/app/client/src/components/formControls/utils.ts +++ b/app/client/src/components/formControls/utils.ts @@ -422,7 +422,10 @@ export const getConfigInitialValues = ( // TODO: Fix this the next time the file is edited // eslint-disable-next-line @typescript-eslint/no-explicit-any const parseConfig = (section: any): any => { - if ("initialValue" in section && section.configProperty !== "runBehavior") { + if ( + "initialValue" in section && + section.configProperty !== "runBehaviour" + ) { if (section.controlType === "KEYVALUE_ARRAY") { section.initialValue.forEach( (initialValue: string | number, index: number) => { diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts index 9dd3c60918..2f3c2b4f12 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts @@ -18,7 +18,7 @@ export default [ children: [ { label: "Run behavior", - configProperty: "runBehavior", + configProperty: "runBehaviour", controlType: "DROP_DOWN", initialValue: RUN_BEHAVIOR.MANUAL.label, options: RUN_BEHAVIOR_VALUES, diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts index 3b574cb078..48072b8bbe 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts @@ -10,7 +10,7 @@ export default [ children: [ { label: "Run behavior", - configProperty: "runBehavior", + configProperty: "runBehaviour", controlType: "DROP_DOWN", initialValue: RUN_BEHAVIOR.MANUAL.label, options: RUN_BEHAVIOR_VALUES, diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts index 1eb23f3497..af05483b56 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts @@ -10,7 +10,7 @@ export default [ children: [ { label: "Run behavior", - configProperty: "runBehavior", + configProperty: "runBehaviour", controlType: "DROP_DOWN", initialValue: RUN_BEHAVIOR.MANUAL.label, options: RUN_BEHAVIOR_VALUES, diff --git a/app/client/src/entities/Action/actionProperties.test.ts b/app/client/src/entities/Action/actionProperties.test.ts index 23e827e6d5..0ee379536d 100644 --- a/app/client/src/entities/Action/actionProperties.test.ts +++ b/app/client/src/entities/Action/actionProperties.test.ts @@ -10,7 +10,7 @@ const DEFAULT_ACTION: Action = { id: "randomDatasource", }, dynamicBindingPathList: [], - runBehavior: "MANUAL", + runBehaviour: "MANUAL", id: "", baseId: "", invalids: [], diff --git a/app/client/src/entities/Action/index.ts b/app/client/src/entities/Action/index.ts index e5d1fc0627..8d369f700c 100644 --- a/app/client/src/entities/Action/index.ts +++ b/app/client/src/entities/Action/index.ts @@ -140,7 +140,7 @@ export interface BaseAction { pageId: string; collectionId?: string; pluginId: string; - runBehavior: ActionRunBehaviourType; + runBehaviour: ActionRunBehaviourType; dynamicBindingPathList: DynamicPath[]; isValid: boolean; invalids: string[]; diff --git a/app/client/src/pages/Editor/EntityNavigation/JSObjectsPane/index.ts b/app/client/src/pages/Editor/EntityNavigation/JSObjectsPane/index.ts index 9bf7b7dca3..dfa7a8b09c 100644 --- a/app/client/src/pages/Editor/EntityNavigation/JSObjectsPane/index.ts +++ b/app/client/src/pages/Editor/EntityNavigation/JSObjectsPane/index.ts @@ -81,7 +81,7 @@ export default class JSObjectsPaneNavigation extends PaneNavigation { *getTab(propertyPath: string) { if ( - propertyPath.includes("runBehavior") || + propertyPath.includes("runBehaviour") || propertyPath.includes("confirmBeforeExecute") ) { return JSEditorTab.SETTINGS; diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx index 4d4fce5505..edd5a7a3db 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx @@ -44,11 +44,11 @@ describe("JSFunctionSettings", () => { const updatedJSActions = [ { ...actions[0], - runBehavior: ActionRunBehaviour.ON_PAGE_LOAD, + runBehaviour: ActionRunBehaviour.ON_PAGE_LOAD, }, { ...actions[1], - runBehavior: ActionRunBehaviour.MANUAL, + runBehaviour: ActionRunBehaviour.MANUAL, }, ]; diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx index 1b83af49b8..ea180c9b02 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx @@ -46,22 +46,22 @@ interface FunctionSettingsRowProps extends Omit { } const FunctionSettingRow = (props: FunctionSettingsRowProps) => { - const [runBehavior, setRunBehavior] = useState(props.action.runBehavior); + const [runBehaviour, setRunBehaviour] = useState(props.action.runBehaviour); const options = RUN_BEHAVIOR_VALUES as SelectOptionProps[]; - const selectedValue = options.find((opt) => opt.value === runBehavior); + const selectedValue = options.find((opt) => opt.value === runBehaviour); const onSelectOptions = useCallback( - (newRunBehavior: ActionRunBehaviourType) => { - setRunBehavior(newRunBehavior); + (newRunBehaviour: ActionRunBehaviourType) => { + setRunBehaviour(newRunBehaviour); props.onUpdateSettings?.({ - value: newRunBehavior, - propertyName: "runBehavior", + value: newRunBehaviour, + propertyName: "runBehaviour", action: props.action, }); AnalyticsUtil.logEvent("JS_OBJECT_SETTINGS_CHANGED", { toggleSetting: "ON_PAGE_LOAD", - toggleValue: newRunBehavior, + toggleValue: newRunBehaviour, }); }, [props], @@ -81,7 +81,7 @@ const FunctionSettingRow = (props: FunctionSettingsRowProps) => { {props.action.name} { pageId: "page-id", collectionId: "collection-id", pluginId: "plugin-id", - runBehavior: ActionRunBehaviour.MANUAL, + runBehaviour: ActionRunBehaviour.MANUAL, dynamicBindingPathList: [], isValid: false, invalids: [], diff --git a/app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json b/app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json index 0967533627..7b500b4344 100644 --- a/app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json +++ b/app/client/src/pages/Editor/SaaSEditor/__data__/FinalState.json @@ -83,7 +83,7 @@ } ] }, - "runBehavior": "MANUAL", + "runBehaviour": "MANUAL", "dynamicBindingPathList": [], "isValid": true, "invalids": [], @@ -2544,7 +2544,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2590,7 +2590,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2636,7 +2636,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2688,7 +2688,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2727,7 +2727,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2773,7 +2773,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2819,7 +2819,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json b/app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json index 94d3027906..b4d8f0b251 100644 --- a/app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json +++ b/app/client/src/pages/Editor/SaaSEditor/__data__/InitialState.json @@ -82,7 +82,7 @@ } ] }, - "runBehavior": "MANUAL", + "runBehaviour": "MANUAL", "dynamicBindingPathList": [], "isValid": true, "invalids": [], @@ -2543,7 +2543,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2589,7 +2589,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2635,7 +2635,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2687,7 +2687,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2726,7 +2726,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2772,7 +2772,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ @@ -2818,7 +2818,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/client/src/sagas/ActionExecution/PluginActionSaga.ts b/app/client/src/sagas/ActionExecution/PluginActionSaga.ts index 7b9b6b5dac..444695c83a 100644 --- a/app/client/src/sagas/ActionExecution/PluginActionSaga.ts +++ b/app/client/src/sagas/ActionExecution/PluginActionSaga.ts @@ -1554,15 +1554,15 @@ function triggerFileUploadInstrumentation( }); } -// Function to clear the action responses for the actions which are not runBehavior: ON_PAGE_LOAD. +// Function to clear the action responses for the actions which are not runBehaviour: ON_PAGE_LOAD. function* clearTriggerActionResponse() { const currentPageActions: ActionData[] = yield select(getCurrentActions); for (const action of currentPageActions) { - // Clear the action response if the action has data and is not runBehavior: ON_PAGE_LOAD. + // Clear the action response if the action has data and is not runBehaviour: ON_PAGE_LOAD. if ( action.data && - action.config.runBehavior !== ActionRunBehaviour.ON_PAGE_LOAD + action.config.runBehaviour !== ActionRunBehaviour.ON_PAGE_LOAD ) { yield put(clearActionResponse(action.config.id)); yield put( diff --git a/app/client/src/sagas/ActionSagas.ts b/app/client/src/sagas/ActionSagas.ts index a0ada1e718..d8e6489d12 100644 --- a/app/client/src/sagas/ActionSagas.ts +++ b/app/client/src/sagas/ActionSagas.ts @@ -1039,12 +1039,12 @@ export function* setActionPropertySaga( ), ); - if (propertyName === "runBehavior") { + if (propertyName === "runBehaviour") { yield put({ type: ReduxActionTypes.UPDATE_ACTION_RUN_BEHAVIOR_INIT, payload: { actionId, - runBehavior: value as ActionRunBehaviourType, + runBehaviour: value as ActionRunBehaviourType, }, }); @@ -1061,17 +1061,17 @@ export function* setActionPropertySaga( if (!skipSave) yield put(updateAction({ id: actionId })); } -function* updateActionRunBehaviorSaga( +function* updateActionRunBehaviourSaga( action: ReduxAction<{ actionId: string; - runBehavior: ActionRunBehaviourType; + runBehaviour: ActionRunBehaviourType; }>, ) { try { const response: ApiResponse = yield call( - ActionAPI.updateActionRunBehavior, + ActionAPI.updateActionRunBehaviour, action.payload.actionId, - action.payload.runBehavior, + action.payload.runBehaviour, ); const isValidResponse: boolean = yield validateResponse(response); @@ -1267,7 +1267,7 @@ export function* watchActionSagas() { takeEvery(ReduxActionErrorTypes.COPY_ACTION_ERROR, handleMoveOrCopySaga), takeLatest( ReduxActionTypes.UPDATE_ACTION_RUN_BEHAVIOR_INIT, - updateActionRunBehaviorSaga, + updateActionRunBehaviourSaga, ), takeLatest(ReduxActionTypes.EXECUTE_COMMAND, executeCommandSaga), takeLatest( diff --git a/app/client/src/sagas/BuildingBlockSagas/tests/fixtures.ts b/app/client/src/sagas/BuildingBlockSagas/tests/fixtures.ts index f45895b285..7d6f7c64ad 100644 --- a/app/client/src/sagas/BuildingBlockSagas/tests/fixtures.ts +++ b/app/client/src/sagas/BuildingBlockSagas/tests/fixtures.ts @@ -129,7 +129,7 @@ export const newlyCreatedActions: Action[] = [ }, ], }, - runBehavior: "ON_PAGE_LOAD", + runBehaviour: "ON_PAGE_LOAD", dynamicBindingPathList: [ { key: "body", diff --git a/app/client/src/sagas/JSPaneSagas.ts b/app/client/src/sagas/JSPaneSagas.ts index 279fe73a3f..085d47d8bb 100644 --- a/app/client/src/sagas/JSPaneSagas.ts +++ b/app/client/src/sagas/JSPaneSagas.ts @@ -783,13 +783,13 @@ function* setFunctionPropertySaga( const actionId = action.id; - if (propertyName === "runBehavior") { + if (propertyName === "runBehaviour") { yield put({ type: ReduxActionTypes.UPDATE_FUNCTION_RUN_BEHAVIOR_INIT, payload: { collectionId: action.collectionId, actionId, - runBehavior: value, + runBehaviour: value, }, }); @@ -847,19 +847,19 @@ function* handleUpdateJSFunctionPropertySaga( } } -function* updateFunctionRunBehaviorSaga( +function* updateFunctionRunBehaviourSaga( action: ReduxAction<{ collectionId: string; actionId: string; - runBehavior: ActionRunBehaviourType; + runBehaviour: ActionRunBehaviourType; }>, ) { try { - const { actionId, collectionId, runBehavior } = action.payload; + const { actionId, collectionId, runBehaviour } = action.payload; const response: ApiResponse = yield call( - ActionAPI.updateActionRunBehavior, + ActionAPI.updateActionRunBehaviour, actionId, - runBehavior, + runBehaviour, ); const isValidResponse: boolean = yield validateResponse(response); @@ -869,7 +869,7 @@ function* updateFunctionRunBehaviorSaga( payload: { actionId: actionId, collectionId: collectionId, - runBehavior, + runBehaviour, }, }); } @@ -945,7 +945,7 @@ export default function* root() { ), takeLatest( ReduxActionTypes.UPDATE_FUNCTION_RUN_BEHAVIOR_INIT, - updateFunctionRunBehaviorSaga, + updateFunctionRunBehaviourSaga, ), takeLatest( ReduxActionTypes.CREATE_NEW_JS_FROM_ACTION_CREATOR, diff --git a/app/client/src/utils/DynamicBindingUtils.test.ts b/app/client/src/utils/DynamicBindingUtils.test.ts index 85b3c9b704..8fb63315fe 100644 --- a/app/client/src/utils/DynamicBindingUtils.test.ts +++ b/app/client/src/utils/DynamicBindingUtils.test.ts @@ -120,7 +120,7 @@ describe("DynamicBindingPathlist", () => { }, ], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", dynamicBindingPathList: [ { key: "body", diff --git a/app/client/src/utils/FilterInternalProperties/JsAction.ts b/app/client/src/utils/FilterInternalProperties/JsAction.ts index 7638f2305f..d9757eef33 100644 --- a/app/client/src/utils/FilterInternalProperties/JsAction.ts +++ b/app/client/src/utils/FilterInternalProperties/JsAction.ts @@ -18,7 +18,7 @@ export const getJsActionPeekData = ( if ( jsAction.data?.[jsChild.id] && - jsChild.runBehavior === ActionRunBehaviour.ON_PAGE_LOAD + jsChild.runBehaviour === ActionRunBehaviour.ON_PAGE_LOAD ) { // TODO: Fix this the next time the file is edited // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/app/client/src/utils/JSPaneUtils.test.ts b/app/client/src/utils/JSPaneUtils.test.ts index 18335ce5b9..f3726aa878 100644 --- a/app/client/src/utils/JSPaneUtils.test.ts +++ b/app/client/src/utils/JSPaneUtils.test.ts @@ -41,7 +41,7 @@ const JSObject1: JSCollection = { body: "async () => {\n\t\t//use async-await or promises\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -83,7 +83,7 @@ const JSObject1: JSCollection = { body: "() => {\n\t\t//write code here\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -151,7 +151,7 @@ const JSObject2: JSCollection = { body: "() => {\n\t\t//write code here\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -193,7 +193,7 @@ const JSObject2: JSCollection = { body: "async () => {\n\t\t//use async-await or promises\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -277,7 +277,7 @@ const resultRenamedActions = { body: "() => {\n\t\t//write code here\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -358,7 +358,7 @@ const resultDeletedActions = { body: "async () => {\n\t\t//use async-await or promises\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -469,7 +469,7 @@ const resultChangedBody = { body: "async () => {\n\t\t//use async-await or promises\n\tconsole.log('content changed')}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -549,7 +549,7 @@ const resultChangedParameters = { { name: "b", value: undefined }, ], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -624,7 +624,7 @@ const resultRemovedAsync = { body: "() => {\n\t\t//use async-await or promises\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -699,7 +699,7 @@ const resultAddedAsync = { body: "async () => {\n\t\t//write code here\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -754,7 +754,7 @@ const resultAddedAction = { newActions: [ { name: "myFun3", - runBehavior: "MANUAL", + runBehaviour: "MANUAL", pageId: "page123", collectionId: "1234", workspaceId: "workspace123", diff --git a/app/client/src/utils/JSPaneUtils.tsx b/app/client/src/utils/JSPaneUtils.tsx index 02665ee003..92cf4407b7 100644 --- a/app/client/src/utils/JSPaneUtils.tsx +++ b/app/client/src/utils/JSPaneUtils.tsx @@ -131,7 +131,7 @@ export const getDifferenceInJSCollection = ( const obj = { name: action.name, collectionId: jsAction.id, - runBehavior: ActionRunBehaviour.MANUAL, + runBehaviour: ActionRunBehaviour.MANUAL, pageId: jsAction.pageId, workspaceId: jsAction.workspaceId, actionConfiguration: { @@ -230,7 +230,7 @@ export const createDummyJSCollectionActions = ( { name: "myFun1", workspaceId, - runBehavior: ActionRunBehaviour.MANUAL, + runBehaviour: ActionRunBehaviour.MANUAL, actionConfiguration: { body: "function () {}", timeoutInMillisecond: 0, @@ -242,7 +242,7 @@ export const createDummyJSCollectionActions = ( { name: "myFun2", workspaceId, - runBehavior: ActionRunBehaviour.MANUAL, + runBehaviour: ActionRunBehaviour.MANUAL, actionConfiguration: { body: "async function () {}", timeoutInMillisecond: 0, @@ -282,7 +282,7 @@ export const createSingleFunctionJsCollection = ( { name: functionName, workspaceId, - runBehavior: ActionRunBehaviour.MANUAL, + runBehaviour: ActionRunBehaviour.MANUAL, actionConfiguration: { body: "function () {}", timeoutInMillisecond: 0, diff --git a/app/client/test/factories/Actions/API.ts b/app/client/test/factories/Actions/API.ts index 17d15e2fe4..77d961dfc1 100644 --- a/app/client/test/factories/Actions/API.ts +++ b/app/client/test/factories/Actions/API.ts @@ -63,7 +63,7 @@ export const APIFactory = Factory.Sync.makeFactory({ datasourceConfiguration: { url: "www.mock-api.appsmith.com" }, }, dynamicBindingPathList: [], - runBehavior: "MANUAL", + runBehaviour: "MANUAL", invalids: [], isValid: true, jsonPathKeys: [], diff --git a/app/client/test/factories/Actions/GoogleSheetFactory.ts b/app/client/test/factories/Actions/GoogleSheetFactory.ts index 830dafe7be..d447d64e40 100644 --- a/app/client/test/factories/Actions/GoogleSheetFactory.ts +++ b/app/client/test/factories/Actions/GoogleSheetFactory.ts @@ -63,7 +63,7 @@ export const GoogleSheetFactory = Factory.Sync.makeFactory({ }, }, }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", isValid: true, invalids: [], messages: [], diff --git a/app/client/test/factories/Actions/JSObject.ts b/app/client/test/factories/Actions/JSObject.ts index a78b14252b..97b37bb759 100644 --- a/app/client/test/factories/Actions/JSObject.ts +++ b/app/client/test/factories/Actions/JSObject.ts @@ -30,7 +30,7 @@ export const JSObjectFactory = Factory.Sync.makeFactory({ body: "function (){\n\t\t//\twrite code here\n\t\t//\tthis.myVar1 = [1,2,3]\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { @@ -70,7 +70,7 @@ export const JSObjectFactory = Factory.Sync.makeFactory({ body: "async function () {\n\t\t//\tuse async-await or promises\n\t\t//\tawait storeValue('varName', 'hello world')\n\t}", jsArguments: [], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", clientSideExecution: true, dynamicBindingPathList: [ { diff --git a/app/client/test/factories/Actions/Postgres.ts b/app/client/test/factories/Actions/Postgres.ts index dabcf188cb..2f31146f79 100644 --- a/app/client/test/factories/Actions/Postgres.ts +++ b/app/client/test/factories/Actions/Postgres.ts @@ -31,7 +31,7 @@ export const PostgresFactory = Factory.Sync.makeFactory({ }, ], }, - runBehavior: "MANUAL", + runBehaviour: "MANUAL", dynamicBindingPathList: [], isValid: true, invalids: [], diff --git a/app/client/test/factories/MockPluginsState.ts b/app/client/test/factories/MockPluginsState.ts index 5083e1245e..f2c78870fc 100644 --- a/app/client/test/factories/MockPluginsState.ts +++ b/app/client/test/factories/MockPluginsState.ts @@ -6953,7 +6953,7 @@ export default { children: [ { label: "Run behavior", - configProperty: "runBehavior", + configProperty: "runBehaviour", controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ @@ -7033,7 +7033,7 @@ export default { children: [ { label: "Run behavior", - configProperty: "runBehavior", + configProperty: "runBehaviour", controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ @@ -7113,7 +7113,7 @@ export default { children: [ { label: "Run behavior", - configProperty: "runBehavior", + configProperty: "runBehaviour", controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ @@ -7157,7 +7157,7 @@ export default { children: [ { label: "Run behavior", - configProperty: "runBehavior", + configProperty: "runBehaviour", controlType: "DROP_DOWN", initialValue: "MANUAL", options: [ diff --git a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json index 8a6023f66a..4f94c3d58b 100644 --- a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json index 626323a792..29eeef3f90 100644 --- a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json index 626323a792..29eeef3f90 100644 --- a/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/appsmithAiPlugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json index eb645fbe35..b40e119aa1 100644 --- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json index 626323a792..29eeef3f90 100644 --- a/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/googleAiPlugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json index cfb1a0b66c..6ef51a8260 100644 --- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json index 108bf972ad..d3b65d1318 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json index e5522e5309..c6d9b84f30 100644 --- a/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mssqlPlugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json index e5522e5309..c6d9b84f30 100644 --- a/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/mysqlPlugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json index 626323a792..29eeef3f90 100644 --- a/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/openAiPlugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json index 664b53a828..1b1100df59 100755 --- a/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/oraclePlugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [ diff --git a/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json b/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json index e5522e5309..c6d9b84f30 100644 --- a/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json +++ b/app/server/appsmith-plugins/postgresPlugin/src/main/resources/setting.json @@ -6,7 +6,7 @@ "children": [ { "label": "Run behavior", - "configProperty": "runBehavior", + "configProperty": "runBehaviour", "controlType": "DROP_DOWN", "initialValue": "MANUAL", "options": [