def test_verify_cluster_search_functionality(self, driver, url): print("To verify the cluster search functionality") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .enter_cluster_name(Config.get("app", "cluster_name")) \ .verify_cluster_present(Config.get("app", "cluster_name"), "active") \ .verify_number_of_clusters_equals(1)
def test_verify_report_generation_functionality(self, driver, url): print("To verify the report generation functionality") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .open_cluster_details(Config.get("app", "cluster_name"), "Active") \ .open_monitor_page() \ .verify_volume_present("demo-vol1", "Offline", "5G", "busybox", "default", "1", "Jiva") \ .click_volume_analytics("demo-vol1") \ .open_volume_tiled_view_dashboard_page() \ .verify_title_text_present("Volume information") \ .verify_volume_info("demo-vol1-claim", Config.get("app", "cluster_name"), "0") \ .click_report_button() \ .verify_file_download_button_url("demo-vol1", "OpenEBS")
def test_verify_project_team_members_shown(self, driver, url): print("To verify in Home dashboards project team members are shown") Platform(driver).launch(url) \ .login_as_admin() \ .open_dashboard_page() \ .verify_team_member_present(Config.get("app", "admin_user"), "ProjectOwner")
def test_verify_self_connected_cluster_shown_admin_user(self, driver, url): print("To verify self connected cluster is shown for Admin user") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .verify_cluster_present(Config.get("app", "cluster_name"), "Active")
def test_verify_popup_disconnect_message(self, driver, url): print("To verify self connected cluster should not get disconnected") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .click_delete_icon_for_cluster(Config.get("app", "cluster_name")) \ .verify_cluster_delete_warning_message()
def test_verify_openebs_dashboard(self, driver, url): print("To verify OpenEBS dashboard") Platform(driver).launch(url) \ .login("Administrator", "password") \ .open_clusters_page() \ .open_cluster_details(Config.get("app", "cluster_name"), "active") \ .open_ebs_page() \ .verify_open_ebs_page()
def test_verify_alerts_dashboard(self, driver, url): print("To verify Alerts dashboard") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .open_cluster_details(Config.get("app", "cluster_name"), "active") \ .open_alerts_page() \ .verify_alerts_present()
def test_verify_volumes_details(self, driver, url): print("To verify volumes details are shown") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .open_cluster_details(Config.get("app", "cluster_name"), "Active") \ .open_monitor_page() \ .verify_volume_present("demo-vol1", "Offline", "5G", "busybox", "default", "1", "Jiva")
def test_verify_monitor_dashboard(self, driver, url): print("To verify Monitor dashboard") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .open_cluster_details(Config.get("app", "cluster_name"), "Active") \ .open_monitor_page() \ .verify_volumes_present()
def test_verify_pools_dashboard(self, driver, url): print("To verify Pools dashboard") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .open_cluster_details(Config.get("app", "cluster_name"), "Active") \ .open_pools_page() \ .verify_pools_page_loaded()
def test_verify_alerts_clickable_for_active_clusters(self, driver, url): print( "To verify alerts are shown and clickable for Active clusters in Home dashboard" ) Platform(driver).launch(url) \ .login_as_admin() \ .open_dashboard_page() \ .switch_to_cluster_tab("Active Cluster") \ .open_alert_for_cluster(Config.get("app", "cluster_name")) \ .verify_view_order_button_present()
def test_verify_topology_dashboard(self, driver, url): print("To verify Topology dashboard") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .open_cluster_details(Config.get("app", "cluster_name"), "active") \ .open_monitor_page() \ .open_topology_page() \ .switch_to_topology_container() \ .verify_connectivity_diagram_present()
def test_verify_volumes_dashboard(self, driver, url): print("To verify Volumes dashboard") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .open_cluster_details(Config.get("app", "cluster_name"), "Active") \ .open_volumes_page() \ .verify_volumes_present() \ .verify_volume_present("demo-vol1-claim", "Healthy", "Jiva", "openebs-jiva-default")
def test_verify_clusters_shown_home_dashboards(self, driver, url): print( "To verify active clusters and other clusters lists are shown in home dashboard" ) Platform(driver).launch(url) \ .login_as_admin() \ .open_dashboard_page() \ .switch_to_cluster_tab("Active Cluster") \ .verify_cluster_present(Config.get("app", "cluster_name")) \ .switch_to_cluster_tab("Other Cluster") \ .verify_clusters_inactive()
def test_verify_component_status_of_volume(self, driver, url): print("To verify different component status of volume") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .open_cluster_details(Config.get("app", "cluster_name"), "Active") \ .open_monitor_page() \ .verify_volume_present("demo-vol1", "Offline", "5G", "busybox", "default", "1", "Jiva") \ .click_volume_analytics("demo-vol1") \ .open_volume_tiled_view_dashboard_page() \ .verify_title_text_present("Volume information") \ .verify_volume_info("demo-vol1-claim", Config.get("app", "cluster_name"), "0") \ .verify_graph_present("Volume status") \ .verify_graph_present("Replica count") \ .verify_graph_present("Errors") \ .verify_graph_present("IOPS") \ .verify_graph_present("Latency") \ .verify_graph_present("Total capacity") \ .verify_graph_present("Storage usage") \ .verify_graph_present("Throughput") \ .verify_graph_present("Block size")
def test_verify_user_roles_dashboard_view(self, driver, url): print("To verify User and Roles dashboard view") Platform(driver).launch(url) \ .login_as_admin() \ .open_user_roles_page() \ .click_invite_button() \ .enter_email("*****@*****.**") \ .select_role("ProjectMember") \ .click_send_invite_button() \ .open_user_roles_page() \ .switch_to_filter_tab("All users") \ .verify_user_present(Config.get("app", "admin_user"), "ProjectOwner") \ .switch_to_filter_tab("Pending invites") \ .verify_user_present("*****@*****.**", "ProjectMember")
def test_verify_overview_dashboard(self, driver, url): print("To verify Overview dashboard") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .open_cluster_details(Config.get("app", "cluster_name"), "active") \ .verify_pool_card_present("CSTOR POOLS") \ .verify_pool_card_present("JIVA POOLS") \ .verify_pool_card_present("LOCALPV DEVICE POOLS") \ .verify_pool_card_present("LOCALPV HOSTPATH POOLS") \ .verify_pool_card_present("ZFS POOLS") \ .verify_cluster_overview_info_present() \ .switch_to_graph_container() \ .verify_graph_present("Storage capacity") \ .verify_graph_present("Total capacity of all volumes") \ .verify_graph_present("IOPS of all volumes") \ .verify_graph_present("Throughput of all volumes")
def test_verify_disconnect_text_shown_for_each_delete_icon( self, driver, url): print( "To verify that disconnect text present for delete icon and the pop up message" ) prefix = Utils.random_string(5) Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .verify_delete_text_shown_for_each_disconnect_icon() \ .click_delete_icon_for_cluster(Config.get("app", "cluster_name")) \ .verify_modal_dialog_text_equals("Are you sure you want to disconnect the cluster OpenEBSDirector?") \ .click_cancel_button_in_modal_dialog() \ .open_clusters_page() \ .click_connect_new_cluster_button() \ .enter_cluster_name(prefix + "Test") \ .click_connect_button() \ .verify_cluster_connection_link_present() \ .click_disconnect_cluster_link() \ .open_clusters_page() \ .click_delete_icon_for_cluster(prefix + "Test") \ .verify_modal_dialog_text_equals("Are you sure you want to disconnect the cluster %s" % (prefix + "Test"))
def login_as_admin(self): print("Click 'Login' button") self.enter_email(Config.get("app", "admin_user")) self.enter_password(Config.get("app", "admin_pwd")) self.click_login_button() return SidePanel(self.driver)