Skip to content

Commit

Permalink
Fix test_odf_storagesystems_ui (red-hat-storage#8438)
Browse files Browse the repository at this point in the history
* Update overview locator
* Improve condition
* Remove elif block

Signed-off-by: Elena Bondarenko <[email protected]>
  • Loading branch information
ebondare authored Sep 12, 2023
1 parent a79f1b3 commit d35ad8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ocs_ci/ocs/ui/page_objects/storage_system_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ def __init__(self):

def nav_details_overview(self):
logger.info("Click on Overview tab")
if (
self.ocp_version_semantic == version.VERSION_4_11
and self.ocs_version_semantic == version.VERSION_4_10
):
if self.ocp_version_semantic >= version.VERSION_4_14:
self.do_click(
self.validation_loc["overview_odf_4_10"], enable_screenshot=True
self.validation_loc["storagesystems_overview"], enable_screenshot=True
)
else:
self.do_click(self.validation_loc["overview"], enable_screenshot=True)
Expand Down
8 changes: 8 additions & 0 deletions ocs_ci/ocs/ui/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,13 @@

validation_4_13 = {"topology_tab": ("//a[normalize-space()='Topology']", By.XPATH)}

validation_4_14 = {
"storagesystems_overview": (
"//button[@data-test='horizontal-link-Overview']",
By.XPATH,
)
}

topology = {
"topology_graph": ("//*[@data-kind='graph']", By.XPATH),
"node_label": ("//*[@class='pf-topology__node__label']", By.XPATH),
Expand Down Expand Up @@ -1610,6 +1617,7 @@
**validation_4_11,
**validation_4_12,
**validation_4_13,
**validation_4_14,
},
"block_pool": {**block_pool, **block_pool_4_12, **block_pool_4_13},
"storageclass": {**storageclass, **storageclass_4_9},
Expand Down

0 comments on commit d35ad8b

Please sign in to comment.