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

test_dashboard_validation_ui-adjust-locator-4.14 #8607

Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion ocs_ci/framework/conf/default_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ EXTERNAL_MODE:
UI_SELENIUM:
browser_type: "chrome"
chrome_type: "google-chrome"
headless: True
headless: False
screenshot: True
ignore_ssl: True

Expand Down
70 changes: 40 additions & 30 deletions ocs_ci/ocs/ui/validation_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,23 +285,23 @@ def odf_overview_ui(
4. Verify if Storage System popup works
5. Ensure that Block and File status, on Storage System popup is Ready
6. Navigate to Storage System details via Storage System popup
7. Verify only one Block Pool present on Storage System details page
7. Verify only one Block Pool present on Storage System details page - optional. No BlockPools in External mode
8. Navigate Storage System via breadcrumb
9. Verify if Overview tab is active
10. Verify if System Capacity Card is present
11. Navigate to Storage System details via System Capacity Card
12. Verify if Storage System details breadcrumb is present
13. Navigate to ODF Overview tab via tab bar
11. Navigate to Storage System details via System Capacity Card - optional. Card not presented in External mode
12. Verify if Storage System details breadcrumb is present - optional. If step 11 was performed
13. Navigate to ODF Overview tab via tab bar - optional. If step 11 was performed
14. Verify if Performance Card is present and link works
15. Navigate to Storage System details via Performance Card
16. Verify if Storage System details breadcrumb is present and link works
17. Navigate ODF Backing store tab via Object Storage tab or PageNavigator
18. Verify if Backing Store is present and link to Backing Store resource works
19. Navigate to Storage System details via breadcrumb
20. Navigate to Storage Systems tab via breadcrumb
19. Navigate to Backing Store tab via breadcrumb
20. Navigate to Bucket class tab
21. Navigate to the default Bucket Class details via Bucket Class tab
22. Verify the status of a default Bucket Class
23. Navigate to Storage System details via breadcrumb
23. Navigate to Bucket class via breadcrumb
24. Navigate to Namespace Store tab via Bucket Class tab
25. Navigate to ODF Overview tab via tab bar
"""
Expand Down Expand Up @@ -336,10 +336,13 @@ def odf_overview_ui(
odf_overview_tab.nav_storage_system_details_from_storage_status_popup()
)

log_step("Verify only one Block Pool present on Storage System details page")
res_dict[
"blockpools_tabs_bz_2096513"
] = storage_system_details_page.check_only_one_block_pools_tab()
if not config.DEPLOYMENT["external_mode"]:
log_step(
"Verify only one Block Pool present on Storage System details page"
)
res_dict[
"blockpools_tabs_bz_2096513"
] = storage_system_details_page.check_only_one_block_pools_tab()

log_step("Navigate Storage System via breadcrumb")
storage_systems_tab = (
Expand All @@ -354,24 +357,27 @@ def odf_overview_ui(
"system_capacity_card_present"
] = odf_overview_tab.validate_system_capacity_card_present()

log_step("Navigate to Storage System details via System Capacity Card")
storage_system_details_page = (
odf_overview_tab.nav_storage_system_details_via_system_capacity_card()
)
if not config.DEPLOYMENT["external_mode"]:
log_step("Navigate to Storage System details via System Capacity Card")
storage_system_details_page = (
odf_overview_tab.nav_storage_system_details_via_system_capacity_card()
)

log_step(
"Verify if Storage System details breadcrumb is present and link works"
)
res_dict[
"storagesystem-details-via-system-capacity-card-link-works"
] = storage_system_details_page.is_storage_system_details_breadcrumb_present()
log_step(
"Verify if Storage System details breadcrumb is present and link works"
)
res_dict[
"storagesystem-details-via-system-capacity-card-link-works"
] = (
storage_system_details_page.is_storage_system_details_breadcrumb_present()
)

storage_systems_tab = (
storage_system_details_page.nav_storage_systems_via_breadcrumb()
)
storage_systems_tab = (
storage_system_details_page.nav_storage_systems_via_breadcrumb()
)

log_step("Navigate to ODF Overview tab via tab bar")
odf_overview_tab = storage_systems_tab.nav_overview_tab()
log_step("Navigate to ODF Overview tab via tab bar")
odf_overview_tab = storage_systems_tab.nav_overview_tab()

log_step("Verify if Performance Card is present and link works")
res_dict[
Expand Down Expand Up @@ -418,10 +424,10 @@ def odf_overview_ui(
"backing_store_status_ready"
] = backing_store_tab.validate_backing_store_ready()

log_step("Navigate to Storage System details via breadcrumb")
log_step("Navigate to Backing Store tab via breadcrumb")
backing_store_tab.nav_backing_store_breadcrumb()

log_step("Navigate to Storage Systems tab via breadcrumb")
log_step("Navigate to Bucket class tab")
bucket_class_tab = backing_store_tab.nav_bucket_class_tab()

log_step("Navigate to the default Bucket Class details via Bucket Class tab")
Expand All @@ -432,7 +438,7 @@ def odf_overview_ui(
)
res_dict["bucket_class_status"] = bucket_class_tab.validate_bucket_class_ready()

log_step("Navigate to Storage System details via breadcrumb")
log_step("Navigate to Bucket class via breadcrumb")
bucket_class_tab.nav_bucket_class_breadcrumb()

log_step(
Expand Down Expand Up @@ -473,7 +479,11 @@ def odf_overview_ui(

if not all(res_dict.values()):
failed_checks = [check for check, res in res_dict.items() if not res]
pytest.fail("Following checks failed: {}".format(failed_checks))
pytest.fail(
"Following checks failed. 1 - Pass, 0 - Fail. \n{}".format(
Copy link
Member

Choose a reason for hiding this comment

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

Is this correct with pytest.fail and 0 failed?

Copy link
Contributor Author

@DanielOsypenko DanielOsypenko Oct 3, 2023

Choose a reason for hiding this comment

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

It is a legend for the log message.

In case of failure it will look like this. I did not have patience to replace "1" and "0" and run test validation job with readable True and False
so added a legend before printing this table

+------------+---------+
| check name | result  |
+============+=========+
| check_a    | 1       |
+------------+---------+
| check_b    | 1       |
+------------+---------+
| check_c    | 0       |
+------------+---------+
| check_d    | 1       |
+------------+---------+
| check_e    | 1       |
+------------+---------+

failed_checks
)
)

def odf_storagesystems_ui(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion ocs_ci/ocs/ui/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@
By.XPATH,
),
"storage-system-external-status-card-hyperlink": (
"(//a[contains(text(),'ocs-external-storagecluster-storagesystem')])[3]",
"//div[@role='dialog']//a[contains(text(),'ocs-external-storagecluster-storagesystem')]",
By.XPATH,
),
"storagesystem-details": (
Expand Down