From e2e8f00f35fdca90502099b2395c89d9b755ac49 Mon Sep 17 00:00:00 2001 From: Yang Jiao <72076317+YangJiao0817@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:55:22 +0800 Subject: [PATCH] Remove email config testcases (#17763) Because the email config page has been removed #17711 Signed-off-by: Yang Jiao --- .../Harbor-Pages/Configuration.robot | 28 ------------------- .../Harbor-Pages/Configuration_Elements.robot | 1 - tests/resources/Harbor-Pages/Verify.robot | 9 ------ tests/robot-cases/Group1-Nightly/Common.robot | 15 ---------- .../robot-cases/Group1-Nightly/Routing.robot | 1 - 5 files changed, 54 deletions(-) diff --git a/tests/resources/Harbor-Pages/Configuration.robot b/tests/resources/Harbor-Pages/Configuration.robot index fee584b55..ba59b855f 100644 --- a/tests/resources/Harbor-Pages/Configuration.robot +++ b/tests/resources/Harbor-Pages/Configuration.robot @@ -185,34 +185,6 @@ Switch To System Replication Should Verify Remote Cert Be Enabled Checkbox Should Not Be Selected xpath=//*[@id='clr-checkbox-verifyRemoteCert'] -## Email -Switch To Email - Switch To Configure - Retry Element Click xpath=//*[@id='config-email'] - Sleep 1 - -Config Email - Input Text xpath=//*[@id='mailServer'] smtp.harbortest.com - Input Text xpath=//*[@id='emailPort'] 25 - Input Text xpath=//*[@id='emailUsername'] example@harbortest.com - Input Text xpath=//*[@id='emailPassword'] example - Input Text xpath=//*[@id='emailFrom'] example - Sleep 1 - Retry Element Click xpath=//*[@id='emailSSL-wrapper']/label - Sleep 1 - Retry Element Click xpath=//*[@id='emailInsecure-wrapper']/label - Sleep 1 - Retry Element Click xpath=${config_email_save_button_xpath} - Sleep 6 - -Verify Email - Textfield Value Should Be xpath=//*[@id='mailServer'] smtp.harbortest.com - Textfield Value Should Be xpath=//*[@id='emailPort'] 25 - Textfield Value Should Be xpath=//*[@id='emailUsername'] example@harbortest.com - Textfield Value Should Be xpath=//*[@id='emailFrom'] example - Checkbox Should Be Selected xpath=//*[@id='emailSSL'] - Checkbox Should Not Be Selected xpath=//*[@id='emailInsecure'] - Set Scan All To None Retry Element Click //vulnerability-config//select Retry Element Click //vulnerability-config//select/option[@value='none'] diff --git a/tests/resources/Harbor-Pages/Configuration_Elements.robot b/tests/resources/Harbor-Pages/Configuration_Elements.robot index 8ce85ae1f..691e17d86 100644 --- a/tests/resources/Harbor-Pages/Configuration_Elements.robot +++ b/tests/resources/Harbor-Pages/Configuration_Elements.robot @@ -20,7 +20,6 @@ ${project_create_xpath} //clr-dg-action-bar//button[contains(.,'New')] ${self_reg_xpath} //input[@id='selfReg'] ${test_ldap_xpath} //*[@id='ping-test'] ${config_save_button_xpath} //config//div/button[contains(.,'SAVE')] -${config_email_save_button_xpath} //*[@id='config_email_save'] ${config_auth_save_button_xpath} //*[@id='config_auth_save'] ${config_system_save_button_xpath} //*[@id='config_system_save'] ${config_security_save_button_xpath} //*[@id='security_save'] diff --git a/tests/resources/Harbor-Pages/Verify.robot b/tests/resources/Harbor-Pages/Verify.robot index 638d18971..a6ad2fd40 100644 --- a/tests/resources/Harbor-Pages/Verify.robot +++ b/tests/resources/Harbor-Pages/Verify.robot @@ -391,10 +391,6 @@ Verify System Setting @{authtype}= Get Value From Json ${json} $.configuration.authmode @{creation}= Get Value From Json ${json} $.configuration..projectcreation @{selfreg}= Get Value From Json ${json} $.configuration..selfreg - @{emailserver}= Get Value From Json ${json} $.configuration..emailserver - @{emailport}= Get Value From Json ${json} $.configuration..emailport - @{emailuser}= Get Value From Json ${json} $.configuration..emailuser - @{emailfrom}= Get Value From Json ${json} $.configuration..emailfrom @{token}= Get Value From Json ${json} $.configuration..token @{robot_token}= Get Value From Json ${json} $.configuration..robot_token @{scanschedule}= Get Value From Json ${json} $.configuration..scanall @@ -405,11 +401,6 @@ Verify System Setting Page Should Contain @{authtype}[0] Run Keyword If @{selfreg}[0] == 'True' Checkbox Should Be Checked //clr-checkbox-wrapper[@id='selfReg']//label Run Keyword If @{selfreg}[0] == 'False' Checkbox Should Not Be Checked //clr-checkbox-wrapper[@id='selfReg']//label - Switch To Email - Textfield Value Should Be xpath=//*[@id='mailServer'] @{emailserver}[0] - Textfield Value Should Be xpath=//*[@id='emailPort'] @{emailport}[0] - Textfield Value Should Be xpath=//*[@id='emailUsername'] @{emailuser}[0] - Textfield Value Should Be xpath=//*[@id='emailFrom'] @{emailfrom}[0] Switch To System Settings ${ret} Get Selected List Value xpath=//select[@id='proCreation'] Should Be Equal As Strings ${ret} @{creation}[0] diff --git a/tests/robot-cases/Group1-Nightly/Common.robot b/tests/robot-cases/Group1-Nightly/Common.robot index caaf1d10d..5f7c01dbc 100644 --- a/tests/robot-cases/Group1-Nightly/Common.robot +++ b/tests/robot-cases/Group1-Nightly/Common.robot @@ -199,21 +199,6 @@ Test Case - Verify Download Ca Link Page Should Contain Registry Root Certificate Close Browser -Test Case - Edit Email Settings - Init Chrome Driver - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - - Switch To Email - Config Email - - Logout Harbor - Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} - - Switch To Email - Verify Email - - Close Browser - Test Case - Edit Token Expire Init Chrome Driver Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} diff --git a/tests/robot-cases/Group1-Nightly/Routing.robot b/tests/robot-cases/Group1-Nightly/Routing.robot index 22f277125..28530d65d 100644 --- a/tests/robot-cases/Group1-Nightly/Routing.robot +++ b/tests/robot-cases/Group1-Nightly/Routing.robot @@ -40,7 +40,6 @@ Test Case - Main Menu Routing ... harbor/clearing-job/gc=//gc-history//h5[contains(.,'GC History')] ... harbor/clearing-job/audit-log-purge=//app-purge-history//h5[contains(.,'Purge History')] ... harbor/configs/auth=//config//config-auth//label[contains(.,'Auth Mode')] - ... harbor/configs/email=//config//config-email//label[contains(.,'Email Server Port')] ... harbor/configs/security=//config//app-security//span[contains(.,'CVE allowlist')] ... harbor/configs/setting=//config//system-settings//label[contains(.,'Project Creation')] FOR ${key} IN @{routing.keys()}