Skip to content

Commit

Permalink
test_dashboard_validation_ui-adjust-locator-4.14 (red-hat-storage#8607)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Osypenko <[email protected]>
  • Loading branch information
DanielOsypenko authored Oct 3, 2023
1 parent 50e0131 commit 46d769e
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 31 deletions.
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(
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 @@ -1264,7 +1264,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

0 comments on commit 46d769e

Please sign in to comment.