From bd28eb45419b5467c464e017ee4f4f10775f0c1d Mon Sep 17 00:00:00 2001 From: pfh Date: Mon, 16 Apr 2018 11:37:20 +0800 Subject: [PATCH] Add Filter Label about imgs --- src/ui_ng/package.json | 2 +- tests/resources/Harbor-Pages/HomePage.robot | 17 ++++++++++++++++- tests/resources/Harbor-Pages/Project.robot | 16 +++++++++++----- .../robot-cases/Group11-Nightly/Nightly.robot | 18 +++++++++--------- 4 files changed, 37 insertions(+), 16 deletions(-) diff --git a/src/ui_ng/package.json b/src/ui_ng/package.json index 36d2c1ec8..8dbc0e596 100644 --- a/src/ui_ng/package.json +++ b/src/ui_ng/package.json @@ -30,7 +30,7 @@ "clarity-icons": "0.10.24", "clarity-ui": "0.10.24", "core-js": "^2.4.1", - "harbor-ui": "0.6.74", + "harbor-ui": "0.6.75", "intl": "^1.2.5", "mutationobserver-shim": "^0.3.2", "ngx-cookie": "^1.0.0", diff --git a/tests/resources/Harbor-Pages/HomePage.robot b/tests/resources/Harbor-Pages/HomePage.robot index 1387ea437..7756d21a3 100644 --- a/tests/resources/Harbor-Pages/HomePage.robot +++ b/tests/resources/Harbor-Pages/HomePage.robot @@ -19,7 +19,22 @@ Resource ../../resources/Util.robot *** Variables *** ${HARBOR_VERSION} v1.1.1 - +*** Keywords *** +Sign In Harbor + [Arguments] ${url} ${user} ${pw} + Go To ${url} + Sleep 5 + ${title}= Get Title + Log To Console ${title} + Should Be Equal ${title} Harbor + Sleep 2 + Input Text login_username ${user} + Input Text login_password ${pw} + Sleep 2 + Click button css=.btn + sleep 5 + Log To Console ${user} + Wait Until Page Contains ${user} Sign Up Should Not Display Page Should Not Contain Element xpath=${sign_up_button_xpath} diff --git a/tests/resources/Harbor-Pages/Project.robot b/tests/resources/Harbor-Pages/Project.robot index 7d5505c79..188e2a3ca 100644 --- a/tests/resources/Harbor-Pages/Project.robot +++ b/tests/resources/Harbor-Pages/Project.robot @@ -249,16 +249,22 @@ Add Labels To Tag Page Should Contain Element xpath=//clr-dg-row//label[contains(.,"${labelName}")] Filter Labels In Tags - [Argument] ${labelName1} ${labelName2} + [Arguments] ${labelName1} ${labelName2} Sleep 2 Click Element xpath=//clr-dropdown/hbr-filter/span/clr-icon - Capture Page Screenshot filter_${labelName1}.png Sleep 2 Page Should Contain Element xpath=//tag-repository//clr-dropdown-menu/div//button[contains(.,"${labelName1}")] Click Element xpath=//tag-repository//clr-dropdown-menu/div//button[contains(.,"${labelName1}")] Sleep 2 - Page Should Contain Element xpath=//clr-datagrid//clr-dg-cell[8]/hbr-label-piece/label[contains(.,"${labelName1}")] - Capture Page Screenshot filter_${labelName2}.png + Click Element xpath=//clr-dropdown/hbr-filter/span/clr-icon + Page Should Contain Element xpath=//clr-datagrid//label[contains(.,"${labelName1}")] + + Click Element xpath=//clr-dropdown/hbr-filter/span/clr-icon + Sleep 2 Click Element xpath=//tag-repository//clr-dropdown-menu/div//button[contains(.,"${labelName2}")] Sleep 2 - Page Should Not Contain Element xpath=//clr-datagrid//clr-dg-cell[8]/hbr-label-piece/label[contains(.,"${labelName2}")] + Click Element xpath=//clr-dropdown/hbr-filter/span/clr-icon + Sleep 2 + Capture Page Screenshot filter_${labelName2}.png + Page Should Contain Element xpath=//clr-dg-row[contains(.,"${labelName2}")] + Page Should Not Contain Element xpath=//clr-dg-row[contains(.,"${labelName1}")] diff --git a/tests/robot-cases/Group11-Nightly/Nightly.robot b/tests/robot-cases/Group11-Nightly/Nightly.robot index 0732a41d4..fca5aa0ad 100644 --- a/tests/robot-cases/Group11-Nightly/Nightly.robot +++ b/tests/robot-cases/Group11-Nightly/Nightly.robot @@ -36,10 +36,10 @@ Test Case - Vulnerability Data Not Ready Vulnerability Not Ready Config Hint Test Case - Read Only Mode - Init Chrome Driver - ${d}= Get Current Date result_format=%m%s + Init Chrome Driver + ${d}= Get Current Date result_format=%m%s Create An New Project With New User url=${HARBOR_URL} username=tester${d} email=tester${d}@vmware.com realname=tester${d} newPassword=Test1@34 comment=harbor projectname=project${d} public=true - + Enable Read Only Cannot Push image ${ip} tester${d} Test1@34 project${d} busybox:latest @@ -324,16 +324,16 @@ TestCase - Project Admin Add Labels To Repo Sleep 2 # Add labels Switch To Project Label - Create New Labels label_${d} + Create New Labels label111 Capture Page Screenshot CreateLabel1.png - Create New Labels label11111 + Create New Labels label22 Capture Page Screenshot CreateLabel2.png Sleep 2 Switch To Project Repo Go Into Repo project${d}/redis - Add Labels To Tag 3.2.10-alpine label_${d} - Add Labels To Tag 4.0.7-alpine label11111 - Filter Labels In Tags label_${d} + Add Labels To Tag 3.2.10-alpine label111 + Add Labels To Tag 4.0.7-alpine label22 + Filter Labels In Tags label111 label22 Close Browser TestCase - Developer Operate Labels @@ -632,4 +632,4 @@ Test Case - View Scan Error #Test Case - OVA reset # Reset VM ${vm_name} ${vc_host} ${vc_user} ${vc_password} -# Wait for Harbor Ready https ${ip} +# Wait for Harbor Ready https ${ip} \ No newline at end of file