From d2c49ec12f4f770f52d86e278f900a6a2bee8430 Mon Sep 17 00:00:00 2001 From: asirvadAbrahamVarghese Date: Thu, 6 Nov 2025 11:59:03 +0530 Subject: [PATCH 1/2] Updated getFormButtonByTypeWithText JSDoc --- cypress/support/commands/element_selectors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/support/commands/element_selectors.js b/cypress/support/commands/element_selectors.js index c8422e0cffa..391ef80878a 100644 --- a/cypress/support/commands/element_selectors.js +++ b/cypress/support/commands/element_selectors.js @@ -1,5 +1,5 @@ /** - * Retrieves a form footer button by its text content and type using an object parameter. + * Retrieves a form button, often found in form footers, by its name and type using an object parameter. * * @param {Object} options - The options object. * @param {string} options.buttonText - The text content of the button (required). From 814242850ad6e83b8c49ad48563bd764878d5972 Mon Sep 17 00:00:00 2001 From: asirvadAbrahamVarghese Date: Thu, 6 Nov 2025 11:59:35 +0530 Subject: [PATCH 2/2] Updated getFormButtonByTypeWithText section in cypress README --- cypress/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/README.md b/cypress/README.md index b9bbacd1d62..030d37034e6 100644 --- a/cypress/README.md +++ b/cypress/README.md @@ -82,7 +82,7 @@ ManageIQ implements the following cypress extensions: ##### element_selectors -* `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'});` +* `cy.getFormButtonByTypeWithText({ buttonType, buttonText })` - retrieves a form button, often found in form footers, 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'});` * `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'});` * `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'});` * `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'});`