From ecdfb8034f450b40fb9f2172e939af97cd60967a Mon Sep 17 00:00:00 2001 From: "stonezdj(Daojun Zhang)" Date: Wed, 8 Aug 2018 10:40:35 +0800 Subject: [PATCH] Add API Test setup and fix Add Member button verify (#5548) --- tests/resources/APITest-Util.robot | 4 ++++ tests/resources/Harbor-Pages/Project-Members.robot | 2 +- tests/robot-cases/Group11-Nightly/Setup.robot | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/resources/APITest-Util.robot b/tests/resources/APITest-Util.robot index 027e8d5ca..eb21f2cb3 100644 --- a/tests/resources/APITest-Util.robot +++ b/tests/resources/APITest-Util.robot @@ -1,4 +1,8 @@ *** Keywords *** +Setup API Test + ${rc} ${output}= Run And Return Rc And Output make swagger_client + Log ${output} + Should Be Equal As Integers ${rc} 0 Harbor API Test [Arguments] ${testcase_name} ${rc} ${output}= Run And Return Rc And Output SWAGGER_CLIENT_PATH=./harborclient HARBOR_HOST=${ip} python ${testcase_name} diff --git a/tests/resources/Harbor-Pages/Project-Members.robot b/tests/resources/Harbor-Pages/Project-Members.robot index c14400dc4..33d199639 100644 --- a/tests/resources/Harbor-Pages/Project-Members.robot +++ b/tests/resources/Harbor-Pages/Project-Members.robot @@ -90,7 +90,7 @@ Non-admin View Member Account Xpath Should Match X Times //clr-dg-row-master ${times} User Can Not Add Member - Page Should Contain Element xpath=//button[@disabled='' and contains(.,'New')] + Page Should Contain Element xpath=//button[@disabled='' and contains(.,'User')] Add Guest Member To Project [arguments] ${member} diff --git a/tests/robot-cases/Group11-Nightly/Setup.robot b/tests/robot-cases/Group11-Nightly/Setup.robot index beb1ac212..c437c6d48 100644 --- a/tests/robot-cases/Group11-Nightly/Setup.robot +++ b/tests/robot-cases/Group11-Nightly/Setup.robot @@ -19,4 +19,5 @@ Default Tags Nightly *** Test Cases *** Test Suites Setup - Nightly Test Setup ${ip} ${HARBOR_PASSWORD} ${ip1} \ No newline at end of file + Nightly Test Setup ${ip} ${HARBOR_PASSWORD} ${ip1} + Setup API Test \ No newline at end of file