Skip to content

Conversation

asirvadAbrahamVarghese
Copy link
Contributor

@asirvadAbrahamVarghese asirvadAbrahamVarghese commented Aug 27, 2025

PR to enhance form elements selector commands to make it more readable as discussed in this thread

  • renamed commands
  • received args as object
  • updated docs
  • Switching from input#${inputId}], select#${selectId}] ==> input[id="${inputId}"], select[id="${selectId}"].
    When ids are separated by dots("endpoints.default.hostname"), input#${inputId}], select#${selectId}] these selectors fail.
image Unless the dots are escaped with double backslashes("endpoints\\.default\\.hostname"). Using attribute selectors avoids this problem.

@miq-bot assign @GilbertCherrie
@miq-bot add-reviewer @elsamaryv
@miq-bot add-label cypress
@miq-bot add-label test
@miq-bot add-label refactoring

@asirvadAbrahamVarghese
Copy link
Contributor Author

TODO

Carry over this change to:
#9562
#9549
#9535
#9532
#9517

@asirvadAbrahamVarghese asirvadAbrahamVarghese force-pushed the enhance-form-element-selectors branch from d59e2e5 to 3b49046 Compare September 10, 2025 05:42
@asirvadAbrahamVarghese asirvadAbrahamVarghese force-pushed the enhance-form-element-selectors branch from 3b49046 to 84dcf23 Compare September 10, 2025 05:45
'getFormFooterButtonByTypeWithText',
({ buttonType = 'button', buttonText } = {}) => {
if (!buttonText) {
cy.logAndThrowError('buttonName is required');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a follow up, we call the function WithText, perhaps buttonText would be a better term to use in the error message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops...

Copy link
Member

@jrafanie jrafanie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please review the one followup typo/suggestion in the error output. Merging.

@jrafanie jrafanie assigned jrafanie and unassigned GilbertCherrie Sep 10, 2025
@jrafanie jrafanie merged commit 105e909 into ManageIQ:master Sep 10, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants