Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

replaced form btn to btn #5917

Closed
wants to merge 9 commits into from
30 changes: 12 additions & 18 deletions app/client/cypress/fixtures/formInputTableDsl.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@
"text": "Submit",
"isDefaultClickDisabled": true,
"buttonStyle": "PRIMARY_BUTTON",
"disabledWhenInvalid": true,
"resetFormOnClick": true,
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"onClick": "{{resetWidget(\"Form1\", true)}}",
"isLoading": false,
"leftColumn": 12,
"rightColumn": 16,
Expand All @@ -69,9 +68,8 @@
"text": "Reset",
"isDefaultClickDisabled": true,
"buttonStyle": "SECONDARY_BUTTON",
"disabledWhenInvalid": false,
"resetFormOnClick": true,
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"onClick": "{{resetWidget(\"Form1\", true)}}",
"isLoading": false,
"leftColumn": 8,
"rightColumn": 12,
Expand Down Expand Up @@ -133,7 +131,7 @@
}
},
{
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
Expand All @@ -145,12 +143,11 @@
"props": {
"text": "Submit",
"buttonStyle": "PRIMARY_BUTTON",
"disabledWhenInvalid": true,
"resetFormOnClick": true
"onClick": "{{resetWidget(\"Form1\", true)}}"
}
},
{
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
Expand All @@ -162,8 +159,7 @@
"props": {
"text": "Reset",
"buttonStyle": "SECONDARY_BUTTON",
"disabledWhenInvalid": false,
"resetFormOnClick": true
"onClick": "{{resetWidget(\"Form1\", true)}}"
}
}
]
Expand Down Expand Up @@ -212,7 +208,7 @@
}
},
{
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
Expand All @@ -224,12 +220,11 @@
"props": {
"text": "Submit",
"buttonStyle": "PRIMARY_BUTTON",
"disabledWhenInvalid": true,
"resetFormOnClick": true
"onClick": "{{resetWidget(\"Form1\", true)}}"
}
},
{
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
Expand All @@ -241,8 +236,7 @@
"props": {
"text": "Reset",
"buttonStyle": "SECONDARY_BUTTON",
"disabledWhenInvalid": false,
"resetFormOnClick": true
"onClick": "{{resetWidget(\"Form1\", true)}}"
}
}
]
Expand Down
36 changes: 18 additions & 18 deletions app/client/cypress/fixtures/formResetDsl.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"text": "Submit",
"isDefaultClickDisabled": true,
"buttonStyle": "PRIMARY_BUTTON",
"disabledWhenInvalid": true,
"resetFormOnClick": true,
"type": "FORM_BUTTON_WIDGET",
"isDisabled": false,
"onClick": "{{resetWidget(\"Form1\", true)}}",
"type": "BUTTON_WIDGET",
"isLoading": false,
"leftColumn": 12,
"rightColumn": 16,
Expand All @@ -69,9 +69,9 @@
"text": "Reset",
"isDefaultClickDisabled": true,
"buttonStyle": "SECONDARY_BUTTON",
"disabledWhenInvalid": false,
"resetFormOnClick": true,
"type": "FORM_BUTTON_WIDGET",
"isDisabled": false,
"onClick": "{{resetWidget(\"Form1\", true)}}",
"type": "BUTTON_WIDGET",
"isLoading": false,
"leftColumn": 8,
"rightColumn": 12,
Expand Down Expand Up @@ -178,7 +178,7 @@
}
},
{
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
Expand All @@ -190,12 +190,12 @@
"props": {
"text": "Submit",
"buttonStyle": "PRIMARY_BUTTON",
"disabledWhenInvalid": true,
"resetFormOnClick": true
"isDisabled": false,
"onClick":"{{resetWidget(\"Form1\", true)}}"
}
},
{
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
Expand All @@ -207,8 +207,8 @@
"props": {
"text": "Reset",
"buttonStyle": "SECONDARY_BUTTON",
"disabledWhenInvalid": false,
"resetFormOnClick": true
"isDisabled": false,
"onClick":"{{resetWidget(\"Form1\", true)}}"
}
}
]
Expand Down Expand Up @@ -258,7 +258,7 @@
}
},
{
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
Expand All @@ -270,12 +270,12 @@
"props": {
"text": "Submit",
"buttonStyle": "PRIMARY_BUTTON",
"disabledWhenInvalid": true,
"resetFormOnClick": true
"isDisabled": false,
"onClick":"{{resetWidget(\"Form1\", true)}}"
}
},
{
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
Expand All @@ -287,8 +287,8 @@
"props": {
"text": "Reset",
"buttonStyle": "SECONDARY_BUTTON",
"disabledWhenInvalid": false,
"resetFormOnClick": true
"isDisabled": false,
"onClick":"{{resetWidget(\"Form1\", true)}}"
}
}
]
Expand Down
10 changes: 4 additions & 6 deletions app/client/cypress/fixtures/formSwitchDsl.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@
"isDefaultClickDisabled": true,
"version": 1,
"buttonStyle": "PRIMARY_BUTTON",
"disabledWhenInvalid": true,
"resetFormOnClick": true,
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"onClick": "{{resetWidget(\"Form1\", true)}}",
"isLoading": false,
"leftColumn": 12,
"rightColumn": 16,
Expand All @@ -73,9 +72,8 @@
"isDefaultClickDisabled": true,
"version": 1,
"buttonStyle": "SECONDARY_BUTTON",
"disabledWhenInvalid": false,
"resetFormOnClick": true,
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"onClick": "{{resetWidget(\"Form1\", true)}}",
"isLoading": false,
"leftColumn": 8,
"rightColumn": 12,
Expand Down
10 changes: 4 additions & 6 deletions app/client/cypress/fixtures/formWidgetdsl.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@
"text": "Submit",
"isDefaultClickDisabled": true,
"buttonStyle": "PRIMARY_BUTTON",
"disabledWhenInvalid": true,
"resetFormOnClick": true,
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"onClick": "{{resetWidget(\"Form1\", true)}}",
"isLoading": false,
"leftColumn": 12,
"rightColumn": 16,
Expand All @@ -101,9 +100,8 @@
"text": "Reset",
"isDefaultClickDisabled": true,
"buttonStyle": "SECONDARY_BUTTON",
"disabledWhenInvalid": false,
"resetFormOnClick": true,
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"onClick": "{{resetWidget(\"Form1\", true)}}",
"isLoading": false,
"leftColumn": 8,
"rightColumn": 12,
Expand Down
34 changes: 20 additions & 14 deletions app/client/cypress/fixtures/formdsl.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,13 @@
"top": 11,
"left": 12
},
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"props": {
"resetFormOnClick": false,
"disabledWhenInvalid": true,
"buttonStyle": "PRIMARY_BUTTON",
"text": "Submit"
"text": "Submit",
"onClick": "{{resetWidget(\"Form1\", true)}}"
}
},
{
Expand All @@ -257,12 +258,13 @@
"top": 11,
"left": 8
},
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"props": {
"resetFormOnClick": true,
"disabledWhenInvalid": false,
"buttonStyle": "SECONDARY_BUTTON",
"text": "Reset"
"text": "Reset",
"onClick": "{{resetWidget(\"Form1\", true)}}"
}
}
]
Expand Down Expand Up @@ -318,12 +320,13 @@
"top": 11,
"left": 12
},
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"props": {
"resetFormOnClick": false,
"disabledWhenInvalid": true,
"buttonStyle": "PRIMARY_BUTTON",
"text": "Submit"
"text": "Submit",
"onClick": "{{resetWidget(\"Form1\", true)}}"
}
},
{
Expand All @@ -335,12 +338,13 @@
"top": 11,
"left": 8
},
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"props": {
"resetFormOnClick": true,
"disabledWhenInvalid": false,
"buttonStyle": "SECONDARY_BUTTON",
"text": "Reset"
"text": "Reset",
"onClick": "{{resetWidget(\"Form1\", true)}}"
}
}
]
Expand All @@ -366,37 +370,39 @@
},
{
"resetFormOnClick": false,
"widgetName": "FormButton1",
"widgetName": "Button1",
"rightColumn": 16,
"isDefaultClickDisabled": true,
"widgetId": "tf20n9k4z2",
"buttonStyle": "PRIMARY_BUTTON",
"topRow": 11,
"bottomRow": 12,
"isVisible": true,
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"dynamicBindingPathList": [],
"isLoading": false,
"disabledWhenInvalid": true,
"leftColumn": 12,
"text": "Submit"
"text": "Submit",
"onClick": "{{resetWidget(\"Form1\", true)}}"
},
{
"resetFormOnClick": true,
"widgetName": "FormButton2",
"widgetName": "Button2",
"rightColumn": 12,
"isDefaultClickDisabled": true,
"widgetId": "6xnpe13jie",
"buttonStyle": "SECONDARY_BUTTON",
"topRow": 11,
"bottomRow": 12,
"isVisible": true,
"type": "FORM_BUTTON_WIDGET",
"type": "BUTTON_WIDGET",
"dynamicBindingPathList": [],
"isLoading": false,
"disabledWhenInvalid": false,
"leftColumn": 8,
"text": "Reset"
"text": "Reset",
"onClick": "{{resetWidget(\"Form1\", true)}}"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("Form reset functionality", function() {
.invoke("attr", "value")
.should("contain", "lindsay.ferguson@reqres.in");

cy.get(widgetsPage.formButtonWidget)
cy.get(widgetsPage.buttonWidget)
.contains("Reset")
.click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/constants/WidgetConstants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const layoutConfigurations: LayoutConfigurations = {
FLUID: { minWidth: -1, maxWidth: -1 },
};

export const LATEST_PAGE_VERSION = 32;
export const LATEST_PAGE_VERSION = 33;

export const GridDefaults = {
DEFAULT_CELL_SIZE: 1,
Expand Down
Loading