From 0ba9856c66a33686f653b449c292650cc9eaa4b2 Mon Sep 17 00:00:00 2001 From: Meina Zhou Date: Thu, 1 Nov 2018 09:38:49 +0800 Subject: [PATCH] fix nightly test Signed-off-by: Meina Zhou --- .../vulnerability-config.component.html | 2 +- .../app/config/auth/config-auth.component.html | 2 +- .../src/app/config/config.component.html | 2 +- .../config/email/config-email.component.html | 2 +- .../resources/Harbor-Pages/Configuration.robot | 18 +++++++++--------- .../Harbor-Pages/Configuration_Elements.robot | 4 ++++ .../resources/Harbor-Pages/Vulnerability.robot | 2 +- 7 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html index 67e701128..1697875f5 100644 --- a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html +++ b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html @@ -44,7 +44,7 @@ {{'CONFIG.TOOLTIP.SCANNING_POLICY' | translate}} - +
diff --git a/src/portal/src/app/config/auth/config-auth.component.html b/src/portal/src/app/config/auth/config-auth.component.html index 685d6a55e..db411ec50 100644 --- a/src/portal/src/app/config/auth/config-auth.component.html +++ b/src/portal/src/app/config/auth/config-auth.component.html @@ -216,7 +216,7 @@
- + diff --git a/src/portal/src/app/config/config.component.html b/src/portal/src/app/config/config.component.html index 0e0f164c9..6161381e4 100644 --- a/src/portal/src/app/config/config.component.html +++ b/src/portal/src/app/config/config.component.html @@ -50,7 +50,7 @@
- +
\ No newline at end of file diff --git a/src/portal/src/app/config/email/config-email.component.html b/src/portal/src/app/config/email/config-email.component.html index e591a25c0..737d46160 100644 --- a/src/portal/src/app/config/email/config-email.component.html +++ b/src/portal/src/app/config/email/config-email.component.html @@ -77,7 +77,7 @@
- + diff --git a/tests/resources/Harbor-Pages/Configuration.robot b/tests/resources/Harbor-Pages/Configuration.robot index 5a67eae51..7cda1cd6c 100644 --- a/tests/resources/Harbor-Pages/Configuration.robot +++ b/tests/resources/Harbor-Pages/Configuration.robot @@ -38,7 +38,7 @@ Init LDAP Sleep 1 Capture Page Screenshot Disable Ldap Verify Cert Checkbox - Click Element xpath=${config_save_button_xpath} + Click Element xpath=${config_auth_save_button_xpath} Sleep 2 Click Element xpath=/html/body/harbor-app/harbor-shell/clr-main-container/div/div/config/div/div/div/button[3] Sleep 1 @@ -99,7 +99,7 @@ Set Pro Create Admin Only Click Element xpath=//select[@id="proCreation"] Click Element xpath=//select[@id="proCreation"]//option[@value="adminonly"] Sleep 1 - Click Element xpath=${config_save_button_xpath} + Click Element xpath=${config_system_button_xpath} Capture Page Screenshot AdminCreateOnly.png Set Pro Create Every One @@ -111,7 +111,7 @@ Set Pro Create Every One Click Element xpath=//select[@id="proCreation"] Click Element xpath=//select[@id="proCreation"]//option[@value="everyone"] Sleep 1 - Click Element xpath=${config_save_button_xpath} + Click Element xpath=${config_system_save_button_xpath} Sleep 2 Capture Page Screenshot EveryoneCreate.png @@ -121,7 +121,7 @@ Disable Self Reg Mouse Up xpath=${self_reg_xpath} Sleep 1 Self Reg Should Be Disabled - Click Element xpath=${config_save_button_xpath} + Click Element xpath=${config_auth_save_button_xpath} Capture Page Screenshot DisableSelfReg.png Sleep 1 @@ -130,7 +130,7 @@ Enable Self Reg Mouse Up xpath=${self_reg_xpath} Sleep 1 Self Reg Should Be Enabled - Click Element xpath=${config_save_button_xpath} + Click Element xpath=${config_auth_save_button_xpath} Capture Page Screenshot EnableSelfReg.png Sleep 1 @@ -154,7 +154,7 @@ Switch To System Settings Modify Token Expiration [Arguments] ${minutes} Input Text xpath=//*[@id="tokenExpiration"] ${minutes} - Click Button xpath=${config_save_button_xpath} + Click Button xpath=${config_system_save_button_xpath} Sleep 1 Token Must Be Match @@ -197,7 +197,7 @@ Config Email Mouse Down xpath=//*[@id="clr-checkbox-emailInsecure"] Mouse Up xpath=//*[@id="clr-checkbox-emailInsecure"] Sleep 1 - Click Element xpath=${config_save_button_xpath} + Click Element xpath=${config_email_save_button_xpath} Sleep 6 Verify Email @@ -212,13 +212,13 @@ Set Scan All To None click element //vulnerability-config//select click element //vulnerability-config//select/option[@value='none'] sleep 1 - click element ${config_save_button_xpath} + click element ${vulnerbility_save_button_xpath} Set Scan All To Daily click element //vulnerability-config//select click element //vulnerability-config//select/option[@value='daily'] sleep 1 - click element ${config_save_button_xpath} + click element ${vulnerbility_save_button_xpath} Click Scan Now click element //vulnerability-config//button[contains(.,'SCAN')] diff --git a/tests/resources/Harbor-Pages/Configuration_Elements.robot b/tests/resources/Harbor-Pages/Configuration_Elements.robot index b31ff8b28..6dd7e87af 100644 --- a/tests/resources/Harbor-Pages/Configuration_Elements.robot +++ b/tests/resources/Harbor-Pages/Configuration_Elements.robot @@ -20,6 +20,10 @@ ${project_create_xpath} //clr-dg-action-bar//button[contains(.,'New')] ${self_reg_xpath} //input[@id="clr-checkbox-selfReg"] ${test_ldap_xpath} /html/body/harbor-app/harbor-shell/clr-main-container/div/div/config/div/div/div/button[3] ${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"] +${vulnerbility_save_button_xpath} //*[@id="config_vulnerbility_save"] ${configuration_xpath} //clr-vertical-nav-group-children/a[contains(.,'Configuration')] ${system_config_xpath} //*[@id="config-system"] ${garbage_collection_xpath} //*[@id="config-gc"] diff --git a/tests/resources/Harbor-Pages/Vulnerability.robot b/tests/resources/Harbor-Pages/Vulnerability.robot index 5a482c95e..96eeb0290 100644 --- a/tests/resources/Harbor-Pages/Vulnerability.robot +++ b/tests/resources/Harbor-Pages/Vulnerability.robot @@ -10,7 +10,7 @@ Disable Scan Schedule Click Element //vulnerability-config//button[@id="editSchedule"] Click Element //vulnerability-config//select[@id="scanAllPolicy"] Click Element //vulnerability-config//select[@id="scanAllPolicy"]//option[contains(.,'None')] - Click Element //button[contains(.,'SAVE')] + Click Element //button[@id="config_vulnerbility_save"] Go To Vulnerability Config Click Element //config//button[contains(.,'Vulnerability')]