Skip to content

Commit 2687f76

Browse files
Renamed validateFormFooterButtons > validateFormButtons
1 parent ed4b72a commit 2687f76

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

cypress/e2e/ui/Services/Catalogs/catalog.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function validateElements({ isEditForm }) {
8787
},
8888
]);
8989
// Validate form footer buttons
90-
cy.validateFormFooterButtons([
90+
cy.validateFormButtons([
9191
{
9292
[BUTTON_CONFIG_KEYS.BUTTON_TEXT]: isEditForm
9393
? SAVE_BUTTON_TEXT

cypress/e2e/ui/Services/Catalogs/copy_catalog.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ describe('Automate Catalog form operations: Services > Catalogs > Catalogs > Con
9595
[FIELD_CONFIG_KEYS.INPUT_FIELD_TYPE]: 'checkbox',
9696
},
9797
]);
98-
cy.validateFormFooterButtons([
98+
cy.validateFormButtons([
9999
{
100100
[BUTTON_CONFIG_KEYS.BUTTON_TEXT]: ADD_BUTTON_TEXT,
101101
[BUTTON_CONFIG_KEYS.BUTTON_TYPE]: 'submit',

cypress/e2e/ui/Settings/Application-Settings/c_and_u_gap_collection.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describe('Automate C & U Gap Collection form operations: Settings > Application
106106
{ [FIELD_CONFIG_KEYS.ID]: 'endDate' },
107107
]);
108108
// Validate form footer buttons
109-
cy.validateFormFooterButtons([
109+
cy.validateFormButtons([
110110
{
111111
[BUTTON_CONFIG_KEYS.BUTTON_TEXT]: 'Save',
112112
[BUTTON_CONFIG_KEYS.BUTTON_TYPE]: 'submit',

cypress/e2e/ui/Settings/Application-Settings/zone.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function validateFormElements(isEditForm = false) {
124124
},
125125
]);
126126
// Validate form footer buttons
127-
cy.validateFormFooterButtons([
127+
cy.validateFormButtons([
128128
{
129129
[BUTTON_CONFIG_KEYS.BUTTON_TEXT]: CANCEL_BUTTON_TEXT,
130130
},

cypress/support/commands/form_elements_validation_commands.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,23 +210,23 @@ Cypress.Commands.add('validateFormFields', (fieldConfigs) => {
210210
* @param {boolean} [buttonConfigs[].shouldBeDisabled=false] - Whether the button should be disabled
211211
*
212212
* Example:
213-
* cy.validateFormFooterButtons([
213+
* cy.validateFormButtons([
214214
* { [BUTTON_CONFIG_KEYS.BUTTON_TEXT]: 'Cancel' },
215215
* { [BUTTON_CONFIG_KEYS.BUTTON_TEXT]: 'Reset', [BUTTON_CONFIG_KEYS.SHOULD_BE_DISABLED]: true },
216216
* { [BUTTON_CONFIG_KEYS.BUTTON_TEXT]: 'Submit', [BUTTON_CONFIG_KEYS.BUTTON_TYPE]: 'submit' },
217217
* { [BUTTON_CONFIG_KEYS.BUTTON_TEXT]: 'Save', [BUTTON_CONFIG_KEYS.BUTTON_WRAPPER_CLASS]: 'custom-wrapper' }
218218
* ]);
219219
*
220220
* Or using regular object keys:
221-
* cy.validateFormFooterButtons([
221+
* cy.validateFormButtons([
222222
* { buttonText: 'Cancel' },
223223
* { buttonText: 'Reset', shouldBeDisabled: true },
224224
* { buttonText: 'Submit', buttonType: 'submit' },
225225
* ]);
226226
*
227227
* Both approaches work but using config-keys object(BUTTON_CONFIG_KEYS) is recommended to avoid typos and unknown keys
228228
*/
229-
Cypress.Commands.add('validateFormFooterButtons', (buttonConfigs) => {
229+
Cypress.Commands.add('validateFormButtons', (buttonConfigs) => {
230230
if (!Array.isArray(buttonConfigs)) {
231231
cy.logAndThrowError('buttonConfigs must be an array');
232232
}

0 commit comments

Comments
 (0)