red-hat-storage / ocs-ci

https://ocs-ci.readthedocs.io/en/latest/
MIT License
108 stars 168 forks source link

test_storage_cluster_validation_ui and test_odf_storagesystems_ui - fix links with ns #10296

Open DanielOsypenko opened 3 months ago

DanielOsypenko commented 3 months ago

test_storage_cluster_validation_ui can't find the locator

"ocs-storagecluster-storgesystem": (
        ".co-resource-item__resource-name[data-test-operand-link='ocs-storagecluster-storagesystem']",
        By.CSS_SELECTOR,
    ),

image

test_odf_storagesystems_ui can't find the locator

 "ocs-external-storagecluster-storagesystem": (
        "a[href='/odf/system/ocs.openshift.io~v1~storagecluster/ocs-external-storagecluster-storagesystem/overview']",
        By.CSS_SELECTOR,
    ),

image


we need to modify link, apparently storage system and storage cluster are now under namespace. so for example this link(locator) is working on rosa hcp cluster: a[href='/odf/system/ns/odf-storage/ocs.openshift.io~v1~storagecluster/ocs-storagecluster-storagesystem/overview']

DanielOsypenko commented 1 month ago

issue happens on External mode clusters https://url.corp.redhat.com/a38883a


ocs_ci/ocs/ui/validation_ui.py:577: in validate_storage_cluster_ui
    self.do_click(
ocs_ci/ocs/ui/base_ui.py:217: in do_click
    _do_click(locator, timeout, enable_screenshot, copy_dom)
   ...
   _locator = (".co-resource-item__resource-name[data-test-operand-link='ocs-storagecluster-storagesystem']", 'css selector')
_timeout = 30, _enable_screenshot = True, _copy_dom = False