PromucFlow_constructor/app/client/cypress/locators/WidgetLocators.ts
NandanAnantharamu 2b1823217e
test: Added test for a bug (#14904)
* Added test for a bug

* Added the widget details
2022-07-10 18:20:22 +00:00

22 lines
711 B
TypeScript

export const WIDGET = {
INPUT_WIDGET_V2: "inputwidgetv2",
TEXT: "textwidget",
PHONE_INPUT_WIDGET: "phoneinputwidget",
CURRENCY_INPUT_WIDGET: "currencyinputwidget",
BUTTON_WIDGET: "buttonwidget",
MULTISELECT_WIDGET: "multiselectwidgetv2",
} 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`;