ocs_ci.ocs.ui package¶
Submodules¶
ocs_ci.ocs.ui.base_ui module¶
-
class
ocs_ci.ocs.ui.base_ui.BaseUI(driver)¶ Bases:
objectBase 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
-
Bases:
ocs_ci.ocs.ui.base_ui.BaseUIPage Navigator Class
Navigate to Alerting Page
Navigate to Dashboards Page
Navigate to Events Page
Navigate to Explore Page
Navigate to Installed Operators Page
Navigate to Metrics Page
Navigate to Object Bucket Claims Page
Navigate to Object Buckets Page
Navigate to OperatorHub Page
Navigate to Overview Page
Navigate to Persistent Volume Claims Page
Navigate to Persistent Volumes Page
Navigate to Projects Page
Navigate to Search Page
Navigate to Storage Classes Page
Navigate to Volume Snapshot Classes Page
Navigate to Volume Snapshot Contents 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.PageNavigatorDeployment 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¶
-
property
ocs_ci.ocs.ui.pvc_ui module¶
-
class
ocs_ci.ocs.ui.pvc_ui.PvcUI(driver)¶ Bases:
ocs_ci.ocs.ui.base_ui.PageNavigatorUser 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
-