def test_verify_restore_device_minio_dmaas_schedule(self, driver, url, minio): print("Restore device dmaas schedule") Platform(driver).launch(url) \ .login("*****@*****.**", "OEPuser@123") \ .open_clusters_page() \ .open_cluster_details("oep-cluster-cluster2", "Active") \ .open_applications_page() \ .search_application("minio-deployment") \ .click_on_application("minio-deployment", "Deployment", "device-minio") \ .verify_application_type("minio-deployment", "Deployment") \ .verify_volume_cas_type("minio-pv", "local-device") \ .click_dmass_button() \ .click_new_schedule_button() \ .select_cloud_provider("MINIO") \ .select_provider_credential("minio-cred") \ .enter_minio_url(minio) \ .select_interval("Hourly") \ .select_minutes("05") \ .select_hour("03") \ .click_schedule_now_button() \ .confirm_aws_schedule() \ .verify_dmass_schedule_present() \ .search_dmaas_schedule() \ .click_dmaas_schedule("Active") \ .verify_status_of_backups("Completed") \ .click_on_restore_dmaas_schedule_icon() \ .select_restore_cluster("oep-cluster-cluster3") \ .click_start_restore_button() \ .click_restore_link() \ .open_dmaas_page() \ .find_schedule() \ .enter_schedule() \ .open_schedules_page() \ .verify_restore_status("Success")
def test_verify_restore_cstor_minio_non_restic_dmaas_schedule(self, driver, url, region): print("Restore cStor dmaas schedule") Platform(driver).launch(url) \ .login("*****@*****.**", "OEPuser@123") \ .open_clusters_page() \ .open_cluster_details("oep-cluster-cluster2", "active") \ .open_applications_page() \ .search_application("minio-deploy-spc") \ .click_on_application("minio-deploy-spc", "Deployment", "delete-spc") \ .verify_application_type("minio-deploy-spc", "Deployment") \ .verify_volume_cas_type("minio-claim", "cStor") \ .click_dmass_button() \ .click_new_schedule_button() \ .click_cstor_based_backup() \ .select_cloud_provider("AWS") \ .select_provider_credential("aws-cred") \ .select_region(region) \ .select_interval("Hourly") \ .select_minutes("05") \ .select_hour("03") \ .click_schedule_now_button() \ .confirm_aws_schedule() \ .verify_dmass_schedule_present() \ .search_dmaas_schedule() \ .click_dmaas_schedule("active") \ .verify_status_of_backups("Completed") \ .click_on_restore_dmaas_schedule_icon() \ .select_restore_cluster("oep-cluster-cluster3") \ .click_start_restore_button() \ .click_restore_link() \ .open_dmaas_page() \ .find_schedule() \ .enter_schedule() \ .open_schedules_page() \ .verify_restore_status("success")
def test_verify_change_pwd_local_auth_account(self, driver, url): print( "To verify the Change password functionality for local auth account" ) prefix = Utils.random_string(6) Platform(driver).launch(url) \ .click_create_account_link() \ .enter_first_name(prefix + "test") \ .enter_last_name(prefix + "auto") \ .enter_email(prefix + "*****@*****.**") \ .enter_password("123qweA!") \ .click_signup_button() \ .wait_onboarding_page_loaded() \ .verify_onboarding_page_title_equals("Update your profile") \ .click_continue_button() \ .enter_project_name(prefix) \ .click_continue_button() \ .enter_cluster_name(prefix) \ .click_connect_button() \ .click_close_button() \ .open_user_profile_page() \ .click_change_password_button() \ .enter_current_password("123qweA!") \ .enter_new_password("1333rteA!") \ .enter_retype_password("1333rteA!") \ .click_update_password_button() \ .side_panel() \ .logout() \ .login(prefix + "*****@*****.**", "1333rteA!") \ .verify_user_profile_item_present()
def test_verify_unique_email_for_each_user(self, driver, url): print("To verify unique Email ID for each user") prefix = Utils.random_string(6) Platform(driver).launch(url) \ .click_create_account_link() \ .enter_first_name(prefix + "test") \ .enter_last_name(prefix + "auto") \ .enter_email(prefix + "*****@*****.**") \ .enter_password("123qweA!") \ .click_signup_button() \ .wait_onboarding_page_loaded() \ .verify_onboarding_page_title_equals("Update your profile") \ .click_continue_button() \ .enter_project_name(prefix) \ .click_continue_button() \ .enter_cluster_name(prefix) \ .click_connect_button() \ .click_close_button() \ .logout() \ .click_create_account_link() \ .enter_first_name(prefix + "test") \ .enter_last_name(prefix + "auto") \ .enter_email(prefix + "*****@*****.**") \ .enter_password("123qweA!") \ .click_signup_button_for_validation() \ .verify_error_message_present("Please use a different email as this email is already taken") \ .enter_email(prefix + "*****@*****.**") \ .click_signup_button() \ .wait_onboarding_page_loaded() \ .verify_onboarding_page_title_equals("Update your profile")
def test_verify_dmaas_schedules_deletion(self, driver, url): print("Delete Dmaas schedules") prefix = Utils.random_string(6) Platform(driver).launch(url) \ .login("*****@*****.**", "OEPuser@123") \ .open_dmaas_page() \ .delete_dmaas_schedules("minio-deployment", "-minio")
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_first_and_last_name_update_in_profile_details(self, driver, url): print("To verify first and last name can be modified for local Auth user") prefix = Utils.random_string(6) phone = Utils.random_number(4) Platform(driver).launch(url) \ .click_create_account_link() \ .enter_first_name(prefix + "test") \ .enter_last_name(prefix + "auto") \ .enter_email(prefix + "*****@*****.**") \ .enter_password("123qweA!") \ .click_signup_button() \ .wait_onboarding_page_loaded() \ .verify_onboarding_page_title_equals("Update your profile") \ .enter_company_name(prefix + "Putbox.com") \ .enter_role(prefix + "Automation") \ .enter_phone_number("201-555-" + phone) \ .click_continue_button() \ .verify_onboarding_page_title_equals("We have created a project for you!") \ .enter_project_name(prefix) \ .click_continue_button() \ .enter_cluster_name(prefix) \ .click_connect_button() \ .click_close_button() \ .logout() \ .login(prefix + "*****@*****.**", "123qweA!") \ .open_user_profile_page() \ .enter_first_name("First") \ .enter_last_name("Last") \ .click_update_profile_button() \ .side_panel() \ .logout() \ .login(prefix + "*****@*****.**", "123qweA!") \ .open_user_profile_page() \ .verify_first_name_equals(prefix + "test" + "First") \ .verify_last_name_equals(prefix + "auto" + "Last")
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_project_read_admin_user_invite(self, driver, url): print( "ProjectOwner can invite users as ProjectReadAdmin role in Project." ) prefix = Utils.random_string(6) Platform(driver).launch(url) \ .click_create_account_link() \ .enter_first_name(prefix + "test") \ .enter_last_name(prefix + "auto") \ .enter_email(prefix + "*****@*****.**") \ .enter_password("123qweA!") \ .click_signup_button() \ .wait_onboarding_page_loaded() \ .verify_onboarding_page_title_equals("Update your profile") \ .click_continue_button() \ .enter_project_name(prefix) \ .click_continue_button() \ .enter_cluster_name(prefix) \ .click_connect_button() \ .click_close_button() \ .logout() \ .login_as_admin() \ .open_user_roles_page() \ .click_invite_button() \ .enter_email(prefix + "*****@*****.**") \ .select_profile() \ .select_role("ProjectReadAdmin") \ .click_send_invite_button() \ .logout() \ .login(prefix + "*****@*****.**", "123qweA!") \ .open_invitations_page() \ .verify_received_invitations("DefaultProject", "ProjectReadAdmin", "Administrator") \ .click_accept_invitation("DefaultProject", "ProjectReadAdmin", "Administrator")
def test_verify_error_message_shown_for_wrong_email(self, driver, url): print("To verify error message is shown if wrong email ID is provided") Platform(driver).launch(url) \ .enter_email('Administratorrrrr') \ .enter_password("password") \ .click_login_button() \ .verify_alert_present("The email address or password you entered is incorrect.")
def test_verify_profile_details_same_with_onboarding_profile_details(self, driver, url): print("To verify the profile info is same as whatever provided during onboarding time") prefix = Utils.random_string(6) phone = Utils.random_number(4) Platform(driver).launch(url) \ .click_create_account_link() \ .enter_first_name(prefix + "test") \ .enter_last_name(prefix + "auto") \ .enter_email(prefix + "*****@*****.**") \ .enter_password("123qweA!") \ .click_signup_button() \ .wait_onboarding_page_loaded() \ .verify_onboarding_page_title_equals("Update your profile") \ .enter_company_name(prefix + "Putbox.com") \ .enter_role(prefix + "Automation") \ .enter_phone_number("201-555-" + phone) \ .click_continue_button() \ .verify_onboarding_page_title_equals("We have created a project for you!") \ .enter_project_name(prefix) \ .click_continue_button() \ .enter_cluster_name(prefix) \ .click_connect_button() \ .click_close_button() \ .logout() \ .login(prefix + "*****@*****.**", "123qweA!") \ .open_user_profile_page() \ .verify_first_name_equals(prefix + "test") \ .verify_last_name_equals(prefix + "auto") \ .verify_email_equals(prefix + "*****@*****.**") \ .verify_company_equals(prefix + "Putbox.com")\ .verify_role_equals(prefix + "Automation") \ .verify_phone_equals("201-555-" + phone)
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_dmaas_dashboard(self, driver, url): print( "Dmaas dashboard should show list of schedules and list of restores" ) Platform(driver).launch(url) \ .login("Administrator", "password") \ .open_dmaas_page() \ .verify_header_text_equals("DMaaS")
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_status_shown_for_each_cluster(self, driver, url): print( "Cluster dashboard should show the status of all the cluster connected to DOP" ) Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .verify_status_shown_for_each_cluster()
def test_verify_k8_version_shown_for_each_cluster(self, driver, url): print( "To verify the k8s version for different active and offline clusters in DOP" ) Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .verify_kub_version_shown_for_active_offline_clusters()
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_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_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_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_cluster_name_field(self, driver, url): print("To verify cluster name should not be less than 5 character and special characters not allowed") Platform(driver).launch(url) \ .login_as_admin() \ .open_clusters_page() \ .click_connect_new_cluster_button() \ .enter_cluster_name("clust") \ .click_connect_button() \ .verify_error_message_present("Cluster name should be greater than 5 and less than 25 characters and should not contain any special characters.")
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_graphs_shown_home_dashboards(self, driver, url): print("To verify graphs are shown in Home dashboards") Platform(driver).launch(url) \ .login_as_admin() \ .open_dashboard_page() \ .switch_to_graph_container() \ .verify_graph_present("Storage capacity") \ .verify_graph_present("Total capacity of all clusters") \ .verify_graph_present("IOPS of all clusters") \ .verify_graph_present("Throughput of all clusters")
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_admin_first_and_last_name_update_fail(self, driver, url): print("To verify First and last Name cannot be modified for local Auth Admin user") phone = Utils.random_number(4) Platform(driver).launch(url) \ .login_as_admin() \ .open_user_profile_page() \ .enter_first_name("First") \ .enter_last_name("Last") \ .enter_phone_field("201-555-" + phone) \ .click_update_profile_button() \ .verify_error_message("Please fill in all required fields")
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_cluster_connection_link_generation(self, driver, url): print("To verify that connection link getting generated while connecting new cluster.") prefix = Utils.random_string(5) Platform(driver).launch(url) \ .login_as_admin() \ .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() \
def test_verify_signup_func_in_local_auth(self, driver, url): print("To verify signup functionality in Local Auth") prefix = Utils.random_string(5) Platform(driver).launch(url) \ .click_create_account_link() \ .enter_first_name(prefix + "test") \ .enter_last_name(prefix + "auto") \ .enter_email(prefix + "*****@*****.**") \ .enter_password("123qweA!") \ .click_signup_button() \ .wait_onboarding_page_loaded() \ .verify_onboarding_page_title_equals("Update your profile")