Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Click Action From Actions Menu" and CustomServingRuntime test #1117

Merged
merged 6 commits into from
Jan 15, 2024

Conversation

bdattoma
Copy link
Contributor

@bdattoma bdattoma commented Jan 12, 2024

Fixing Verify RHODS Admins Can Delete A Custom Serving Runtime Template which got broken after patternfly update.
It involves fixing Click Action From Actions Menu kw

  • making the xpath slightly more robust, hopefully
  • replace keyword duplications in Workbenches, DataConnections,Storage and Projects resources in order to reduce the maintanance (I didn't change it in Pipelines resource files because I'm unable to test the change due to some infrastructure issues. Will do in a later PR)

Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
397 0 0 397 100

@bdattoma bdattoma marked this pull request as ready for review January 15, 2024 14:11
Wait Until Page Contains Element xpath=//tr[td[@data-label="Name"]//*[text()="${item_title}"]]/td[@class="pf-v5-c-table__action"]/div/ul/li/button[text()="${action}"]
Click Element xpath=//tr[td[@data-label="Name"]//*[text()="${item_title}"]]/td[@class="pf-v5-c-table__action"]/div/ul/li/button[text()="${action}"]
Wait Until Page Contains Element xpath=//tr[td[@data-label="Name"]//*[text()="${item_title}"]]//td//li//*[text()="${action}"]
Click Element xpath=//tr[td[@data-label="Name"]//*[text()="${item_title}"]]//td//li//*[text()="${action}"]

Check warning

Code scanning / Robocop

File has too many lines ({{ lines_count }}/{{max_allowed_count }}) Warning test

File has too many lines (865/400)
@bdattoma bdattoma self-assigned this Jan 15, 2024
@bdattoma bdattoma added needs testing Needs to be tested in Jenkins enhancements Bugfixes, enhancements, refactoring, ... in tests or libraries (PR will be listed in release-notes) labels Jan 15, 2024
diegolovison
diegolovison previously approved these changes Jan 15, 2024
@bdattoma
Copy link
Contributor Author

bdattoma commented Jan 15, 2024

PR Validation

  1. CustomServingRuntime suite: rhods-ci-pr-test/2313 PASS
  2. Smoke suite: rhods-ci-pr-test/2315 There are failures, but none of them related to the changes in this PR. I'll consider a PASS

Copy link
Contributor

@FedeAlonso FedeAlonso left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -837,9 +837,9 @@ Handle Deletion Confirmation Modal
Click Action From Actions Menu
[Documentation] Clicks an action from Actions menu (3-dots menu on the right)
[Arguments] ${item_title} ${action} ${item_type}=${NONE}
Click Element xpath=//tr[td[@data-label="Name"]//*[text()="${item_title}"]]/td[@class="pf-v5-c-table__action"]/div/button[@aria-label="Actions"]
Click Element xpath=//tr[td[@data-label="Name"]//*[text()="${item_title}"]]/td[contains(@class,"-table__action")]//button[@aria-label="Kebab toggle"] # robocop: disable
Copy link
Member

Choose a reason for hiding this comment

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

Note to self, for the future we should have keywords for clicking common paternfly UI elements. Locators of this style appear many times. @aria-label="Kebab toggle" is beginning to hound my dreams.

Copy link
Member

Choose a reason for hiding this comment

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

Click Action From Actions Menu, like that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep I agree, that would help also reducing the code duplication. However I don't kow now from top of my head some more keywords like this one we could have. But if you find any, welcome to have it in a common place to be re-used

@bdattoma bdattoma merged commit f902fb9 into red-hat-data-services:master Jan 15, 2024
5 of 6 checks passed
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

jiridanek added a commit to jiridanek/ods-ci that referenced this pull request Jan 15, 2024
jiridanek added a commit to jiridanek/ods-ci that referenced this pull request Jan 15, 2024
jiridanek added a commit to jiridanek/ods-ci that referenced this pull request Jan 15, 2024
jiridanek added a commit that referenced this pull request Jan 16, 2024
* Fix ODS-2206, ODS-2226 for ODH 2.6

The Pipelines-related UI has changed in the Dashboard

Signed-off-by: Jiri Daněk <[email protected]>

* fixup contains

Signed-off-by: Jiri Daněk <[email protected]>

* fixup paths

Signed-off-by: Jiri Daněk <[email protected]>

* fixup texts

Signed-off-by: Jiri Daněk <[email protected]>

* fixup use kebab menu locators from #1117


Signed-off-by: Jiri Daněk <[email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancements Bugfixes, enhancements, refactoring, ... in tests or libraries (PR will be listed in release-notes) needs testing Needs to be tested in Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants