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 test_odf_storagesystems_ui #9656

Merged
merged 6 commits into from
Apr 10, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions ocs_ci/ocs/ui/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1369,12 +1369,17 @@
By.XPATH,
),
"odf-performanceCardLink": (
"td[class='pf-u-w-10 performanceCard--verticalAlign'] a",
"td[class='pf-u-w-10 performanceCard--verticalAlign'] a, "
"td[class='pf-v5-c-table__td pf-v5-u-w-10 performanceCard--verticalAlign'] a",
Copy link
Contributor

Choose a reason for hiding this comment

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

CSS_Selector is too long, is there any other locator available which is short but robust?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually you're right, I can just replace it with class*='performanceCard--verticalAlign'. Thank you. Fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

this is one class name pf-v5-c-table__td pf-v5-u-w-10 performanceCard--verticalAlign as far as I see, so it will not make difference if we use long class name or short class name

By.CSS_SELECTOR,
),
"storagesystems": (
".pf-c-breadcrumb__link, .pf-v5-c-breadcrumb__link",
By.CSS_SELECTOR,
),
"storagesystems": (".pf-c-breadcrumb__link", By.CSS_SELECTOR),
"console_plugin_option": (
".pf-c-button.pf-m-link.pf-m-inline[data-test='edit-console-plugin']",
".pf-c-button.pf-m-link.pf-m-inline[data-test='edit-console-plugin'], "
"button[data-test='edit-console-plugin']",
By.CSS_SELECTOR,
),
"save_console_plugin_settings": ("#confirm-action", By.CSS_SELECTOR),
Expand Down Expand Up @@ -1409,7 +1414,8 @@
"system-capacity": ("//h2[normalize-space()='System Capacity']", By.XPATH),
"ocs-storagecluster": ("//a[normalize-space()='ocs-storagecluster']", By.XPATH),
"storagesystem-status-card": (
".pf-c-button.pf-m-link.pf-m-inline.co-dashboard-card__button-link.co-status-card__popup",
".pf-c-button.pf-m-link.pf-m-inline.co-dashboard-card__button-link.co-status-card__popup, "
"button[data-test='health-popover-link']",
By.CSS_SELECTOR,
),
"block-and-file-health-message": ("div[class='text-muted']", By.CSS_SELECTOR),
Expand All @@ -1430,7 +1436,7 @@
By.CSS_SELECTOR,
),
"storagecluster-blockpool-details-compress-status": (
"article[data-test-id='compression-details-card'] dd[class='co-overview-details-card__item-value']",
"[data-test-id='compression-details-card'] dd[class='co-overview-details-card__item-value']",
By.CSS_SELECTOR,
),
"performance-card": (
Expand Down Expand Up @@ -1481,7 +1487,7 @@
),
"performance-card": ("//div[contains(text(),'Performance')]", By.XPATH),
"storagesystem-status-card": (
".pf-c-button.pf-m-link.pf-m-inline.co-status-card__popup",
".pf-c-button.pf-m-link.pf-m-inline.co-status-card__popup, button[data-test='health-popover-link']",
By.CSS_SELECTOR,
),
"storage-system-health-card-hyperlink": (
Expand Down Expand Up @@ -1549,6 +1555,8 @@
),
"namespace-store-tab-active": (
"//button[@class='pf-c-tabs__link' and @aria-selected='true']"
"//span[normalize-space()='Namespace Store'] | "
"//button[@class='pf-v5-c-tabs__link' and @aria-selected='true']"
"//span[normalize-space()='Namespace Store']",
By.XPATH,
),
Expand Down
Loading