Skip to content

Conversation

@yonasberhe23
Copy link
Contributor

@yonasberhe23 yonasberhe23 commented Oct 14, 2025

Summary

Fixes #rancher/qa-tasks#2043

This PR fixes failing cloud credential tests by improving the labeled input selector to handle dynamically loaded form elements:

  • Updated LabeledInputPo.byLabel() to use cy.contains() instead of .find().contains() for better reliability with asynchronous content loading.

Technical notes summary

The original selector failed because .find() has no automatic retry mechanism and only searches elements already present in the DOM. When the Access Key input loaded asynchronously (after 1 second), the selector couldn't find it. The updated approach uses cy.contains(), which automatically retries for 4 seconds until the label text appears, ensuring reliable interaction with dynamically loaded form elements.

Screenshot/Video

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility

@yonasberhe23 yonasberhe23 self-assigned this Oct 14, 2025
@yonasberhe23 yonasberhe23 added this to the v2.13.0 milestone Oct 14, 2025
@yonasberhe23 yonasberhe23 marked this pull request as ready for review October 14, 2025 21:33
@yonasberhe23 yonasberhe23 requested review from IsaSih and izaac October 14, 2025 21:33
@yonasberhe23 yonasberhe23 force-pushed the fix_cloud_cred_test branch 2 times, most recently from cfcf1f2 to b41b229 Compare October 15, 2025 13:25
@yonasberhe23 yonasberhe23 marked this pull request as draft October 15, 2025 13:38
@yonasberhe23 yonasberhe23 marked this pull request as ready for review October 16, 2025 19:16
Copy link
Contributor

@izaac izaac left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@yonasberhe23 yonasberhe23 merged commit 71b993b into rancher:master Oct 21, 2025
87 of 89 checks passed
@yonasberhe23 yonasberhe23 deleted the fix_cloud_cred_test branch October 21, 2025 03:47
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.

2 participants