chore: Updating the spelling for runBehaviour (#40490)

## Description

Updating the spelling for `runBehaviour`

Fixes #

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
This commit is contained in:
Ankita Kinger 2025-05-02 17:58:26 +05:30 committed by GitHub
parent c5d2f5dc56
commit bc2dcec672
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
53 changed files with 176 additions and 175 deletions

View File

@ -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,
},

View File

@ -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": [],

File diff suppressed because one or more lines are too long

View File

@ -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,
);
}

View File

@ -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();

View File

@ -15,7 +15,7 @@ import {
const BASE_ACTION: ApiAction = {
dynamicBindingPathList: [],
cacheResponse: "",
runBehavior: "MANUAL",
runBehaviour: "MANUAL",
invalids: [],
isValid: false,
workspaceId: "",

View File

@ -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;

View File

@ -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,
});
}
}

View File

@ -70,7 +70,7 @@ export interface SavePageResponseData {
dsl: Partial<DSLWidget>;
messages: string[];
actionUpdates: Array<{
runBehavior: ActionRunBehaviourType;
runBehaviour: ActionRunBehaviourType;
id: string;
name: string;
collectionId?: string;

View File

@ -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: [
{

View File

@ -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;
}
});
},

View File

@ -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;
}
});
}

View File

@ -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));
}
}

View File

@ -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: [
{

View File

@ -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: [
{

View File

@ -31,7 +31,7 @@ const TEST_JS_FUNCTION = {
jsArguments: [],
isAsync: true,
},
runBehavior: ActionRunBehaviour.MANUAL,
runBehaviour: ActionRunBehaviour.MANUAL,
clientSideExecution: true,
dynamicBindingPathList: [
{

View File

@ -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) => {

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -10,7 +10,7 @@ const DEFAULT_ACTION: Action = {
id: "randomDatasource",
},
dynamicBindingPathList: [],
runBehavior: "MANUAL",
runBehaviour: "MANUAL",
id: "",
baseId: "",
invalids: [],

View File

@ -140,7 +140,7 @@ export interface BaseAction {
pageId: string;
collectionId?: string;
pluginId: string;
runBehavior: ActionRunBehaviourType;
runBehaviour: ActionRunBehaviourType;
dynamicBindingPathList: DynamicPath[];
isValid: boolean;
invalids: string[];

View File

@ -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;

View File

@ -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,
},
];

View File

@ -46,22 +46,22 @@ interface FunctionSettingsRowProps extends Omit<Props, "actions"> {
}
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}
</Text>
<StyledSelect
data-testid={`t--dropdown-runBehavior`}
data-testid={`t--dropdown-runBehaviour`}
defaultValue={selectedValue}
id={props.action.id}
isDisabled={props.disabled}

View File

@ -45,7 +45,7 @@ const BASE_JS_ACTION = (useLiterals = false) => {
pageId: "page-id",
collectionId: "collection-id",
pluginId: "plugin-id",
runBehavior: ActionRunBehaviour.MANUAL,
runBehaviour: ActionRunBehaviour.MANUAL,
dynamicBindingPathList: [],
isValid: false,
invalids: [],

View File

@ -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": [

View File

@ -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": [

View File

@ -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(

View File

@ -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(

View File

@ -129,7 +129,7 @@ export const newlyCreatedActions: Action[] = [
},
],
},
runBehavior: "ON_PAGE_LOAD",
runBehaviour: "ON_PAGE_LOAD",
dynamicBindingPathList: [
{
key: "body",

View File

@ -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,

View File

@ -120,7 +120,7 @@ describe("DynamicBindingPathlist", () => {
},
],
},
runBehavior: "MANUAL",
runBehaviour: "MANUAL",
dynamicBindingPathList: [
{
key: "body",

View File

@ -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

View File

@ -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",

View File

@ -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,

View File

@ -63,7 +63,7 @@ export const APIFactory = Factory.Sync.makeFactory<ApiAction>({
datasourceConfiguration: { url: "www.mock-api.appsmith.com" },
},
dynamicBindingPathList: [],
runBehavior: "MANUAL",
runBehaviour: "MANUAL",
invalids: [],
isValid: true,
jsonPathKeys: [],

View File

@ -63,7 +63,7 @@ export const GoogleSheetFactory = Factory.Sync.makeFactory<SaaSAction>({
},
},
},
runBehavior: "MANUAL",
runBehaviour: "MANUAL",
isValid: true,
invalids: [],
messages: [],

View File

@ -30,7 +30,7 @@ export const JSObjectFactory = Factory.Sync.makeFactory<JSCollection>({
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<JSCollection>({
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: [
{

View File

@ -31,7 +31,7 @@ export const PostgresFactory = Factory.Sync.makeFactory<QueryAction>({
},
],
},
runBehavior: "MANUAL",
runBehaviour: "MANUAL",
dynamicBindingPathList: [],
isValid: true,
invalids: [],

View File

@ -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: [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [

View File

@ -6,7 +6,7 @@
"children": [
{
"label": "Run behavior",
"configProperty": "runBehavior",
"configProperty": "runBehaviour",
"controlType": "DROP_DOWN",
"initialValue": "MANUAL",
"options": [