ocs_ci.ocs.ui package

Submodules

ocs_ci.ocs.ui.base_ui module

class ocs_ci.ocs.ui.base_ui.BaseUI(driver)

Bases: object

Base Class for UI Tests

check_element_text(expected_text)

Check if the text matches the expected text.

Parameters

expected_text (string) – The expected text.

Returns

True if the text matches the expected text, False otherwise

Return type

bool

choose_expanded_mode(mode, locator)

Select the element mode (expanded or collapsed)

mode (bool): True if element expended, False otherwise locator (set): (GUI element needs to operate on (str), type (By))

do_click(locator, timeout=30)

Click on Button/link on OpenShift Console

locator (set): (GUI element needs to operate on (str), type (By)) timeout (int): Looks for a web element repeatedly until timeout (sec) happens.

do_send_keys(locator, text, timeout=30)

Send text to element on OpenShift Console

locator (set): (GUI element needs to operate on (str), type (By)) text (str): Send text to element timeout (int): Looks for a web element repeatedly until timeout (sec) happens.

get_checkbox_status(locator, timeout=30)

Checkbox Status

Parameters
  • locator (set) – (GUI element needs to operate on (str), type (By))

  • timeout (int) – Looks for a web element repeatedly until timeout (sec) happens.

Returns

True if element is Enabled, False otherwise

Return type

bool

is_expanded(locator, timeout=30)

Check whether an element is in an expanded or collapsed state

Parameters
  • locator (set) – (GUI element needs to operate on (str), type (By))

  • timeout (int) – Looks for a web element repeatedly until timeout (sec) happens.

Returns

True if element expended, False otherwise

Return type

bool

refresh_page()

Refresh Web Page

select_checkbox_status(status, locator)

Select checkbox status (enable or disable)

status (bool): True if checkbox enable, False otherwise locator (set): (GUI element needs to operate on (str), type (By))

take_screenshot()

Take screenshot using python code

class ocs_ci.ocs.ui.base_ui.PageNavigator(driver)

Bases: ocs_ci.ocs.ui.base_ui.BaseUI

Page Navigator Class

navigate_alerting_page()

Navigate to Alerting Page

navigate_dashboards_page()

Navigate to Dashboards Page

navigate_events_page()

Navigate to Events Page

navigate_explore_page()

Navigate to Explore Page

navigate_installed_operators_page()

Navigate to Installed Operators Page

navigate_metrics_page()

Navigate to Metrics Page

navigate_object_bucket_claims_page()

Navigate to Object Bucket Claims Page

navigate_object_buckets_page()

Navigate to Object Buckets Page

navigate_operatorhub_page()

Navigate to OperatorHub Page

navigate_overview_page()

Navigate to Overview Page

navigate_persistentvolumeclaims_page()

Navigate to Persistent Volume Claims Page

navigate_persistentvolumes_page()

Navigate to Persistent Volumes Page

navigate_projects_page()

Navigate to Projects Page

navigate_search_page()

Navigate to Search Page

navigate_storageclasses_page()

Navigate to Storage Classes Page

navigate_volumesnapshotclasses_page()

Navigate to Volume Snapshot Classes Page

navigate_volumesnapshotcontents_page()

Navigate to Volume Snapshot Contents Page

navigate_volumesnapshots_page()

Navigate to Storage Volume Snapshots Page

ocs_ci.ocs.ui.base_ui.close_browser(driver)

Close Selenium WebDriver

Parameters

driver (Selenium WebDriver) –

ocs_ci.ocs.ui.base_ui.login_ui()

Login to OpenShift Console

Returns

driver (Selenium WebDriver)

ocs_ci.ocs.ui.deployment_ui module

class ocs_ci.ocs.ui.deployment_ui.DeploymentUI(driver)

Bases: ocs_ci.ocs.ui.base_ui.PageNavigator

Deployment OCS Operator via User Interface

property class_encryption
configure_encryption()

Configure Encryption

configure_kms()

Configure KMS

create_catalog_source_yaml()

Create OLM YAML file

install_internal_cluster()

Install Internal Cluster

install_ocs_operator()

Install OCS Opeartor

install_ocs_ui()

Install OCS via UI

install_storage_cluster()

Install Storage Cluster

property select_kms_address
property select_kms_address_port
property select_kms_token
property select_mode
property select_osd_size
property select_service_name
property select_storage_class
property use_kms
verify_ocs_operator_succeeded(timeout_install=300, sleep=20)

Verify OCS Installation

timeout_install (int): Time in seconds to wait sleep (int): Sampling time in seconds

property wide_encryption

ocs_ci.ocs.ui.pvc_ui module

class ocs_ci.ocs.ui.pvc_ui.PvcUI(driver)

Bases: ocs_ci.ocs.ui.base_ui.PageNavigator

User Interface Selenium

create_pvc_ui(sc_type, pvc_name, access_mode, pvc_size)

Create PVC via UI.

sc_type (str): storage class type pvc_name (str): the name of pvc access_mode (str): access mode pvc_size (str): the size of pvc (GB)

delete_pvc_ui(pvc_name)

Delete pvc via UI

pvc_name (str): Name of the pvc

ocs_ci.ocs.ui.views module

Module contents