def ocs_odf_upgrade_ui(): """ Function to upgrade OCS 4.8 to ODF 4.9 via UI on OCP 4.9 Pass proper versions and upgrade_ui.yaml while running this function for validation to pass """ setup_ui = login_ui() val_obj = ValidationUI(setup_ui) pagenav_obj = ValidationUI(setup_ui) dep_obj = DeploymentUI(setup_ui) dep_obj.operator = ODF_OPERATOR dep_obj.install_ocs_operator() original_ocs_version = config.ENV_DATA.get("ocs_version") upgrade_in_current_source = config.UPGRADE.get("upgrade_in_current_source", False) upgrade_ocs = OCSUpgrade( namespace=config.ENV_DATA["cluster_namespace"], version_before_upgrade=original_ocs_version, ocs_registry_image=config.UPGRADE.get("upgrade_ocs_registry_image"), upgrade_in_current_source=upgrade_in_current_source, ) logger.info( "Click on Storage System under Provided APIs on Installed Operators Page" ) val_obj.do_click( upgrade_ocs.validation_loc["storage-system-on-installed-operators"]) logger.info( "Click on 'ocs-storagecluster-storagesystem' on Operator details page") val_obj.do_click( upgrade_ocs.validation_loc["ocs-storagecluster-storgesystem"], enable_screenshot=True, ) logger.info("Click on Resources") val_obj.do_click(upgrade_ocs.validation_loc["resources-tab"], enable_screenshot=True) logger.info("Storage Cluster Status Check") storage_cluster_status_check = val_obj.wait_until_expected_text_is_found( locator=("//*[text()= 'Ready']", By.XPATH), expected_text="Ready", timeout=1200) assert ( storage_cluster_status_check ), "Storage Cluster Status reported on UI is not 'Ready', Timeout 1200 seconds exceeded" logger.info( "Storage Cluster Status reported on UI is 'Ready', verification successful" ) logger.info("Click on 'ocs-storagecluster") val_obj.do_click(upgrade_ocs.validation_loc["ocs-storagecluster"]) val_obj.take_screenshot() pagenav_obj.odf_overview_ui() pagenav_obj.odf_storagesystems_ui()
def test_dashboard_validation_ui(self, setup_ui): """ Validate User Interface Args: setup_ui: login function on conftest file """ validation_ui_obj = ValidationUI(setup_ui) ocs_version = version.get_semantic_ocs_version_from_config() if ocs_version >= version.VERSION_4_9: validation_ui_obj.odf_overview_ui() else: validation_ui_obj.verification_ui()