Skip to content

Commit 5e881fe

Browse files
authored
Merge pull request #9701 from asirvadAbrahamVarghese/enhance-form-element-selectors
Enhance form element selectors
2 parents 60484aa + 6e97b7c commit 5e881fe

File tree

13 files changed

+68
-75
lines changed

13 files changed

+68
-75
lines changed

cypress/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ ManageIQ implements the following cypress extensions:
8282

8383
##### element_selectors
8484

85-
* `cy.getFormFooterButtonByTypeWithText({ buttonType, buttonText, buttonWrapperClass })` - retrieves form footer button by its name and type. `buttonText` is the name or text content of the button. `buttonType` is the HTML button type (e.g., 'button', 'submit', 'reset'). Defaults to 'button'. `buttonWrapperClass` is the CSS class of the wrapper element containing the buttons. Defaults to 'bx--btn-set'. e.g. `cy.getFormFooterButtonByTypeWithText({buttonText: 'Cancel'});`, `cy.getFormFooterButtonByTypeWithText({buttonText: 'Submit', buttonType: 'submit'});`, `cy.getFormFooterButtonByTypeWithText({buttonText: 'Save', buttonWrapperClass: 'custom-wrapper'});`
85+
* `cy.getFormButtonByTypeWithText({ buttonType, buttonText })` - retrieves form footer button by its name and type. `buttonText` is the name or text content of the button. `buttonType` is the HTML button type (e.g., 'button', 'submit', 'reset'). Defaults to 'button'. e.g. `cy.getFormButtonByTypeWithText({buttonText: 'Cancel'});`, `cy.getFormButtonByTypeWithText({buttonText: 'Submit', buttonType: 'submit'});`
8686
* `cy.getFormInputFieldByIdAndType({ inputId, inputType })` - retrieves a form input field by its ID and type. `inputId` is the ID of the input field. `inputType` is the HTML input type (e.g., 'text', 'email', 'password'). Defaults to 'text'. e.g. `cy.getFormInputFieldByIdAndType({inputId: 'name'});`, `cy.getFormInputFieldByIdAndType({inputId: 'name', inputType: 'text'});`
8787
* `cy.getFormLabelByForAttribute({ forValue })` - retrieves a form label associated with a specific input field by its 'for' attribute. `forValue` is the value of the 'for' attribute that matches the input field's ID. e.g. `cy.getFormLabelByForAttribute({forValue: 'name'});`
8888
* `cy.getFormLegendByText({ legendText })` - retrieves a form legend element by its text content. Legend elements are typically used as captions for fieldset elements in forms. `legendText` is the text content of the legend element. e.g. `cy.getFormLegendByText({legendText: 'Basic Information'});`
@@ -93,7 +93,7 @@ ManageIQ implements the following cypress extensions:
9393

9494
* `cy.validateFormLabels(labelConfigs)` - validates form field labels based on provided configurations. `labelConfigs` is an array of label configuration objects with properties: `forValue` (required) - the 'for' attribute value of the label, `expectedText` (optional) - the expected text content of the label. e.g. `cy.validateFormLabels([{ forValue: 'name', expectedText: 'Name' }, { forValue: 'email', expectedText: 'Email Address' }]);` or using constants: `cy.validateFormLabels([{ [LABEL_CONFIG_KEYS.FOR_VALUE]: 'name', [LABEL_CONFIG_KEYS.EXPECTED_TEXT]: 'Name' }]);`
9595
* `cy.validateFormFields(fieldConfigs)` - validates form input fields based on provided configurations. `fieldConfigs` is an array of field configuration objects with properties: `id` (required) - the ID of the form field, `fieldType` (optional, default: 'input') - the type of field ('input', 'select', 'textarea'), `inputFieldType` (optional, default: 'text') - the type of input field ('text', 'password', 'number'), `shouldBeDisabled` (optional, default: false) - whether the field should be disabled, `expectedValue` (optional) - the expected value of the field. e.g. `cy.validateFormFields([{ id: 'name', shouldBeDisabled: true }, { id: 'role', fieldType: 'select', expectedValue: 'admin' }]);` or using constants: `cy.validateFormFields([{ [FIELD_CONFIG_KEYS.ID]: 'email', [FIELD_CONFIG_KEYS.INPUT_FIELD_TYPE]: 'email' }, { [FIELD_CONFIG_KEYS.ID]: 'name', [FIELD_CONFIG_KEYS.SHOULD_BE_DISABLED]: true }]);`
96-
* `cy.validateFormFooterButtons(buttonConfigs)` - validates form buttons based on provided configurations. `buttonConfigs` is an array of button configuration objects with properties: `buttonText` (required) - the text of the button, `buttonType` (optional, default: 'button') - the type of button (e.g., 'submit', 'reset'), `shouldBeDisabled` (optional, default: false) - whether the button should be disabled, `buttonWrapperClass` (optional, default: 'bx--btn-set') - the CSS class of the wrapper element containing the buttons. e.g. `cy.validateFormFooterButtons([{ buttonText: 'Cancel' }, { buttonText: 'Submit', buttonType: 'submit', shouldBeDisabled: true }]);`, `cy.validateFormFooterButtons([{ buttonText: 'Save', buttonWrapperClass: 'custom-wrapper' }]);` or using constants: `cy.validateFormFooterButtons([{ [BUTTON_CONFIG_KEYS.TEXT]: 'Cancel', [BUTTON_CONFIG_KEYS.BUTTON_WRAPPER_CLASS]: 'custom-button-wrapper' }]);`
96+
* `cy.validateFormButtons(buttonConfigs)` - validates form buttons based on provided configurations. `buttonConfigs` is an array of button configuration objects with properties: `buttonText` (required) - the text of the button, `buttonType` (optional, default: 'button') - the type of button (e.g., 'submit', 'reset'), `shouldBeDisabled` (optional, default: false) - whether the button should be disabled. e.g. `cy.validateFormButtons([{ buttonText: 'Cancel' }, { buttonText: 'Submit', buttonType: 'submit', shouldBeDisabled: true }]);` or using constants: `cy.validateFormButtons([{ [BUTTON_CONFIG_KEYS.TEXT]: 'Cancel', [BUTTON_CONFIG_KEYS.BUTTON_WRAPPER_CLASS]: 'custom-button-wrapper' }]);`
9797

9898
#### Assertions
9999

cypress/e2e/ui/Automation/Embedded-Automate/Explorer/namespace.cy.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function addDomainOrNamespace({ nameFieldValue }) {
5959
urlPattern: '/miq_ae_class/create_namespace/new?button=add',
6060
triggerFn: () =>
6161
cy
62-
.getFormFooterButtonByTypeWithText({
62+
.getFormButtonByTypeWithText({
6363
buttonText: ADD_BUTTON_TEXT,
6464
buttonType: 'submit',
6565
})
@@ -92,17 +92,17 @@ function validateNamespaceFormFields(isEditForm = false) {
9292
cy.getFormInputFieldByIdAndType({ inputId: 'description' })
9393
.should('be.visible')
9494
.and('be.enabled');
95-
cy.getFormFooterButtonByTypeWithText({ buttonText: CANCEL_BUTTON_TEXT })
95+
cy.getFormButtonByTypeWithText({ buttonText: CANCEL_BUTTON_TEXT })
9696
.should('be.visible')
9797
.and('be.enabled');
98-
cy.getFormFooterButtonByTypeWithText({
98+
cy.getFormButtonByTypeWithText({
9999
buttonText: isEditForm ? SAVE_BUTTON_TEXT : ADD_BUTTON_TEXT,
100100
buttonType: 'submit',
101101
})
102102
.should('be.visible')
103103
.and('be.disabled');
104104
if (isEditForm) {
105-
cy.getFormFooterButtonByTypeWithText({ buttonText: RESET_BUTTON_TEXT })
105+
cy.getFormButtonByTypeWithText({ buttonText: RESET_BUTTON_TEXT })
106106
.should('be.visible')
107107
.and('be.disabled');
108108
}
@@ -142,14 +142,14 @@ describe('Automate operations on Namespaces: Automation -> Embedded Automate ->
142142
it('Validate Add Namespace form fields', () => {
143143
cy.toolbar(TOOLBAR_CONFIGURATION, TOOLBAR_ADD_NEW_NAMESPACE);
144144
validateNamespaceFormFields();
145-
cy.getFormFooterButtonByTypeWithText({
145+
cy.getFormButtonByTypeWithText({
146146
buttonText: CANCEL_BUTTON_TEXT,
147147
}).click();
148148
});
149149

150150
it('Validate Cancel button', () => {
151151
cy.toolbar(TOOLBAR_CONFIGURATION, TOOLBAR_ADD_NEW_NAMESPACE);
152-
cy.getFormFooterButtonByTypeWithText({ buttonText: CANCEL_BUTTON_TEXT })
152+
cy.getFormButtonByTypeWithText({ buttonText: CANCEL_BUTTON_TEXT })
153153
.should('be.enabled')
154154
.click();
155155
cy.expect_flash(flashClassMap.warning, FLASH_MESSAGE_CANCELLED);
@@ -159,15 +159,15 @@ describe('Automate operations on Namespaces: Automation -> Embedded Automate ->
159159
cy.toolbar(TOOLBAR_CONFIGURATION, TOOLBAR_ADD_NEW_NAMESPACE);
160160
addDomainOrNamespace({ nameFieldValue: INVALID_NAMESPACE_NAME });
161161
cy.expect_flash(flashClassMap.error, FLASH_MESSAGE_INVALID_NAMESPACE);
162-
cy.getFormFooterButtonByTypeWithText({
162+
cy.getFormButtonByTypeWithText({
163163
buttonText: CANCEL_BUTTON_TEXT,
164164
}).click();
165165
});
166166

167167
it('Validate Edit Namespace form fields', () => {
168168
createNamespaceAndOpenEditForm();
169169
validateNamespaceFormFields(true);
170-
cy.getFormFooterButtonByTypeWithText({
170+
cy.getFormButtonByTypeWithText({
171171
buttonText: CANCEL_BUTTON_TEXT,
172172
}).click();
173173
});
@@ -182,14 +182,14 @@ describe('Automate operations on Namespaces: Automation -> Embedded Automate ->
182182
NAMESPACE_NAME,
183183
]);
184184
cy.toolbar(TOOLBAR_CONFIGURATION, TOOLBAR_EDIT_NAMESPACE);
185-
cy.getFormFooterButtonByTypeWithText({
185+
cy.getFormButtonByTypeWithText({
186186
buttonText: SAVE_BUTTON_TEXT,
187187
buttonType: 'submit',
188188
}).should('be.disabled');
189189
cy.getFormInputFieldByIdAndType({ inputId: 'description' })
190190
.clear()
191191
.type(EDITED_DESCRIPTION);
192-
cy.getFormFooterButtonByTypeWithText({
192+
cy.getFormButtonByTypeWithText({
193193
buttonText: SAVE_BUTTON_TEXT,
194194
buttonType: 'submit',
195195
})
@@ -211,15 +211,15 @@ describe('Automate operations on Namespaces: Automation -> Embedded Automate ->
211211
cy.toolbar(TOOLBAR_CONFIGURATION, TOOLBAR_ADD_NEW_NAMESPACE);
212212
addDomainOrNamespace({ nameFieldValue: NAMESPACE_NAME });
213213
cy.expect_flash(flashClassMap.error, FLASH_MESSAGE_NAME_ALREADY_EXISTS);
214-
cy.getFormFooterButtonByTypeWithText({
214+
cy.getFormButtonByTypeWithText({
215215
buttonText: CANCEL_BUTTON_TEXT,
216216
}).click();
217217
});
218218

219219
it('Checking whether Cancel & Reset buttons work fine in the Edit form', () => {
220220
createNamespaceAndOpenEditForm();
221221
/* Validating Reset button */
222-
cy.getFormFooterButtonByTypeWithText({
222+
cy.getFormButtonByTypeWithText({
223223
buttonText: RESET_BUTTON_TEXT,
224224
}).should('be.disabled');
225225
cy.getFormInputFieldByIdAndType({ inputId: 'name' })
@@ -228,7 +228,7 @@ describe('Automate operations on Namespaces: Automation -> Embedded Automate ->
228228
cy.getFormInputFieldByIdAndType({ inputId: 'description' })
229229
.clear()
230230
.type(EDITED_DESCRIPTION);
231-
cy.getFormFooterButtonByTypeWithText({ buttonText: RESET_BUTTON_TEXT })
231+
cy.getFormButtonByTypeWithText({ buttonText: RESET_BUTTON_TEXT })
232232
.should('be.enabled')
233233
.click();
234234
cy.expect_flash(flashClassMap.warning, FLASH_MESSAGE_RESET_NAMESPACE);
@@ -241,7 +241,7 @@ describe('Automate operations on Namespaces: Automation -> Embedded Automate ->
241241
DESCRIPTION
242242
);
243243
/* Validating Cancel button */
244-
cy.getFormFooterButtonByTypeWithText({
244+
cy.getFormButtonByTypeWithText({
245245
buttonText: CANCEL_BUTTON_TEXT,
246246
}).click();
247247
cy.expect_flash(flashClassMap.warning, FLASH_MESSAGE_CANCELLED);

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

Lines changed: 7 additions & 7 deletions
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
@@ -156,7 +156,7 @@ describe('Automate Catalog form operations: Services > Catalogs > Catalogs > Con
156156
// Validate elements
157157
validateElements({ isEditForm: false });
158158
// Cancel
159-
cy.getFormFooterButtonByTypeWithText({
159+
cy.getFormButtonByTypeWithText({
160160
buttonText: CANCEL_BUTTON_TEXT,
161161
}).click();
162162
cy.expect_flash(flashClassMap.success, FLASH_MESSAGE_CANCELLED);
@@ -174,7 +174,7 @@ describe('Automate Catalog form operations: Services > Catalogs > Catalogs > Con
174174
actionType: DUAL_LIST_ACTION_TYPE.ADD,
175175
optionsToSelect: [CATALOG_ITEM_NAME_1],
176176
});
177-
cy.getFormFooterButtonByTypeWithText({
177+
cy.getFormButtonByTypeWithText({
178178
buttonText: ADD_BUTTON_TEXT,
179179
buttonType: 'submit',
180180
}).click();
@@ -185,7 +185,7 @@ describe('Automate Catalog form operations: Services > Catalogs > Catalogs > Con
185185
cy.getFormInputFieldByIdAndType({ inputId: 'description' }).type(
186186
'-Updated'
187187
);
188-
cy.getFormFooterButtonByTypeWithText({
188+
cy.getFormButtonByTypeWithText({
189189
buttonText: SAVE_BUTTON_TEXT,
190190
buttonType: 'submit',
191191
}).click();
@@ -214,7 +214,7 @@ describe('Automate Catalog form operations: Services > Catalogs > Catalogs > Con
214214
actionType: DUAL_LIST_ACTION_TYPE.ADD,
215215
optionsToSelect: [CATALOG_ITEM_NAME_1],
216216
});
217-
cy.getFormFooterButtonByTypeWithText({
217+
cy.getFormButtonByTypeWithText({
218218
buttonText: ADD_BUTTON_TEXT,
219219
buttonType: 'submit',
220220
}).click();
@@ -230,7 +230,7 @@ describe('Automate Catalog form operations: Services > Catalogs > Catalogs > Con
230230
cy.getFormInputFieldByIdAndType({ inputId: 'description' }).type(
231231
'-Updated'
232232
);
233-
cy.getFormFooterButtonByTypeWithText({
233+
cy.getFormButtonByTypeWithText({
234234
buttonText: RESET_BUTTON_TEXT,
235235
}).click();
236236
cy.expect_flash(flashClassMap.warning, FLASH_MESSAGE_RESET);
@@ -239,7 +239,7 @@ describe('Automate Catalog form operations: Services > Catalogs > Catalogs > Con
239239
TEST_DESCRIPTION
240240
);
241241
// Cancel
242-
cy.getFormFooterButtonByTypeWithText({
242+
cy.getFormButtonByTypeWithText({
243243
buttonText: CANCEL_BUTTON_TEXT,
244244
}).click();
245245
cy.expect_flash(flashClassMap.success, FLASH_MESSAGE_CANCELLED);

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

Lines changed: 3 additions & 3 deletions
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',
@@ -105,7 +105,7 @@ describe('Automate Catalog form operations: Services > Catalogs > Catalogs > Con
105105
},
106106
]);
107107
// Cancel
108-
cy.getFormFooterButtonByTypeWithText({
108+
cy.getFormButtonByTypeWithText({
109109
buttonText: CANCEL_BUTTON_TEXT,
110110
}).click();
111111
cy.expect_flash(flashClassMap.warning, FLASH_MESSAGE_CANCELLED);
@@ -128,7 +128,7 @@ describe('Automate Catalog form operations: Services > Catalogs > Catalogs > Con
128128
cy.getFormLabelByForAttribute({
129129
forValue: 'copy_tags',
130130
}).click();
131-
cy.getFormFooterButtonByTypeWithText({
131+
cy.getFormButtonByTypeWithText({
132132
buttonText: ADD_BUTTON_TEXT,
133133
buttonType: 'submit',
134134
}).click();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function saveFormAndAssertFlashMessage(flashMessageType, flashMessage) {
5252
urlPattern: '/ops/cu_repair?button=submit',
5353
triggerFn: () =>
5454
cy
55-
.getFormFooterButtonByTypeWithText({
55+
.getFormButtonByTypeWithText({
5656
buttonText: 'Save',
5757
buttonType: 'submit',
5858
})
@@ -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/edit_collect_logs.cy.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function resetProtocolDropdown({ selectServerListItem = true } = {}) {
7171
// If the value is not default one(BLANK_VALUE), then setting it to blank
7272
if (currentValue !== DROPDOWN_BLANK_VALUE) {
7373
cy.wrap(selectField).select(DROPDOWN_BLANK_VALUE);
74-
cy.getFormFooterButtonByTypeWithText({
74+
cy.getFormButtonByTypeWithText({
7575
buttonText: SAVE_BUTTON_TEXT,
7676
buttonType: 'submit',
7777
}).click();
@@ -105,20 +105,20 @@ function validateFormElements() {
105105
.should('be.visible')
106106
.and('be.enabled');
107107
// Assert cancel button is visible and enabled
108-
cy.getFormFooterButtonByTypeWithText({
108+
cy.getFormButtonByTypeWithText({
109109
buttonText: CANCEL_BUTTON_TEXT,
110110
})
111111
.should('be.visible')
112112
.and('be.enabled');
113113
// Assert save button is visible and disabled
114-
cy.getFormFooterButtonByTypeWithText({
114+
cy.getFormButtonByTypeWithText({
115115
buttonText: SAVE_BUTTON_TEXT,
116116
buttonType: 'submit',
117117
})
118118
.should('be.visible')
119119
.and('be.disabled');
120120
// Assert reset button is visible and disabled
121-
cy.getFormFooterButtonByTypeWithText({
121+
cy.getFormButtonByTypeWithText({
122122
buttonText: RESET_BUTTON_TEXT,
123123
})
124124
.should('be.visible')
@@ -127,7 +127,7 @@ function validateFormElements() {
127127

128128
function cancelButtonValidation() {
129129
// Click cancel button in the form
130-
cy.getFormFooterButtonByTypeWithText({
130+
cy.getFormButtonByTypeWithText({
131131
buttonText: CANCEL_BUTTON_TEXT,
132132
}).click();
133133
// Validating confirmation flash message
@@ -140,7 +140,7 @@ function resetButtonValidation() {
140140
SAMBA_DROPDOWN_VALUE
141141
);
142142
// Confirm Reset button is enabled once dropdown value is changed and then click on Reset
143-
cy.getFormFooterButtonByTypeWithText({
143+
cy.getFormButtonByTypeWithText({
144144
buttonText: RESET_BUTTON_TEXT,
145145
})
146146
.should('be.enabled')
@@ -158,7 +158,7 @@ function saveButtonValidation() {
158158
SAMBA_DROPDOWN_VALUE
159159
);
160160
// Confirm Save button is enabled once dropdown value is changed and then click on Save
161-
cy.getFormFooterButtonByTypeWithText({
161+
cy.getFormButtonByTypeWithText({
162162
buttonText: SAVE_BUTTON_TEXT,
163163
buttonType: 'submit',
164164
})

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function selectConfigMenu(menuOption) {
9292

9393
function addSchedule() {
9494
selectConfigMenu(ADD_SCHEDULE_CONFIG_OPTION);
95-
cy.getFormFooterButtonByTypeWithText({
95+
cy.getFormButtonByTypeWithText({
9696
buttonText: SAVE_BUTTON_TEXT,
9797
buttonType: 'submit',
9898
}).should('be.disabled');
@@ -126,7 +126,7 @@ function addSchedule() {
126126
urlPattern: '/ops/schedule_edit/new?button=save',
127127
triggerFn: () =>
128128
cy
129-
.getFormFooterButtonByTypeWithText({
129+
.getFormButtonByTypeWithText({
130130
buttonText: SAVE_BUTTON_TEXT,
131131
buttonType: 'submit',
132132
})
@@ -432,20 +432,20 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
432432
cy.getFormInputFieldByIdAndType({ inputId: 'start_time' })
433433
.should('be.visible')
434434
.and('be.enabled');
435-
cy.getFormFooterButtonByTypeWithText({
435+
cy.getFormButtonByTypeWithText({
436436
buttonText: SAVE_BUTTON_TEXT,
437437
buttonType: 'submit',
438438
})
439439
.should('be.visible')
440440
.and('be.disabled');
441-
cy.getFormFooterButtonByTypeWithText({ buttonText: CANCEL_BUTTON_TEXT })
441+
cy.getFormButtonByTypeWithText({ buttonText: CANCEL_BUTTON_TEXT })
442442
.should('be.visible')
443443
.and('be.enabled');
444444
});
445445

446446
it('Checking whether Cancel button works on the Add form', () => {
447447
selectConfigMenu(ADD_SCHEDULE_CONFIG_OPTION);
448-
cy.getFormFooterButtonByTypeWithText({
448+
cy.getFormButtonByTypeWithText({
449449
buttonText: CANCEL_BUTTON_TEXT,
450450
}).click();
451451
cy.expect_flash(flashClassMap.success, FLASH_MESSAGE_OPERATION_CANCELED);
@@ -465,7 +465,7 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
465465
cy.getFormInputFieldByIdAndType({ inputId: 'description' })
466466
.clear()
467467
.type(EDITED_DESCRIPTION);
468-
cy.getFormFooterButtonByTypeWithText({
468+
cy.getFormButtonByTypeWithText({
469469
buttonText: SAVE_BUTTON_TEXT,
470470
buttonType: 'submit',
471471
})
@@ -490,7 +490,7 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
490490
cy.getFormInputFieldByIdAndType({ inputId: 'start_date' })
491491
.clear()
492492
.type(EDITED_START_DATE);
493-
cy.getFormFooterButtonByTypeWithText({ buttonText: RESET_BUTTON_TEXT })
493+
cy.getFormButtonByTypeWithText({ buttonText: RESET_BUTTON_TEXT })
494494
.should('be.enabled')
495495
.click();
496496
cy.expect_flash(flashClassMap.warning, FLASH_MESSAGE_RESET_SCHEDULE);
@@ -504,7 +504,7 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
504504
);
505505

506506
/* ===== Checking whether Cancel button works ===== */
507-
cy.getFormFooterButtonByTypeWithText({
507+
cy.getFormButtonByTypeWithText({
508508
buttonText: CANCEL_BUTTON_TEXT,
509509
}).click();
510510
cy.expect_flash(flashClassMap.success, FLASH_MESSAGE_OPERATION_CANCELED);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('Settings > Application Settings > Access Control', () => {
3737
cy.getFormInputFieldByIdAndType({ inputId: 'description' }).type(
3838
INITIAL_TENANT_DESCRIPTION
3939
);
40-
cy.getFormFooterButtonByTypeWithText({
40+
cy.getFormButtonByTypeWithText({
4141
buttonText: 'Add',
4242
buttonType: 'submit',
4343
}).click();

0 commit comments

Comments
 (0)