* fix: [WIP] reset meta to default value * refactor * fix reset child widget and type in metaReducer * Fix type and refactor test * fix multiselect click * Add jest test for reset widget action * Add cypress test * Add comments * Add more cases as per comment * remove `only` from test case * Add default value case of array with values * MultiSelect spec fix * fix currencyInput reset * refactor test code suggested in comments * fix type * fix more type * fix cypress test Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
21 lines
666 B
TypeScript
21 lines
666 B
TypeScript
export const WIDGET = {
|
|
INPUT_WIDGET_V2: "inputwidgetv2",
|
|
TEXT: "textwidget",
|
|
PHONE_INPUT_WIDGET: "phoneinputwidget",
|
|
CURRENCY_INPUT_WIDGET: "currencyinputwidget",
|
|
BUTTON_WIDGET: "buttonwidget",
|
|
} as const;
|
|
|
|
export const PROPERTY_SELECTOR = {
|
|
onClick: ".t--property-control-onclick",
|
|
onSubmit: ".t--property-control-onsubmit",
|
|
text: ".t--property-control-text",
|
|
defaultValue: ".t--property-control-defaultvalue",
|
|
};
|
|
type ValueOf<T> = T[keyof T];
|
|
|
|
export const getWidgetSelector = (widget: ValueOf<typeof WIDGET>) =>
|
|
`.t--widget-${widget}`;
|
|
export const getWidgetInputSelector = (widget: ValueOf<typeof WIDGET>) =>
|
|
`.t--widget-${widget} input`;
|