From 8b6963f39770505849b25271aa161d7d292acf8a Mon Sep 17 00:00:00 2001 From: sigsbee <23101283+sigsbee@users.noreply.github.com> Date: Thu, 24 May 2018 13:07:19 +0800 Subject: [PATCH] Update testcase for task progress (#4987) update multi delete testcase for new delete progress --- .../Harbor-Pages/Configuration.robot | 7 +++--- tests/resources/Harbor-Pages/Project.robot | 7 +++--- tests/resources/Harbor-Pages/ToolKit.robot | 14 ++++++------ .../robot-cases/Group11-Nightly/Nightly.robot | 22 ++++++++----------- 4 files changed, 23 insertions(+), 27 deletions(-) diff --git a/tests/resources/Harbor-Pages/Configuration.robot b/tests/resources/Harbor-Pages/Configuration.robot index c9814b355..b0ec98489 100644 --- a/tests/resources/Harbor-Pages/Configuration.robot +++ b/tests/resources/Harbor-Pages/Configuration.robot @@ -257,7 +257,7 @@ Create New Labels Update A Label [Arguments] ${labelname} - Click Element xpath=//clr-dg-row[1]/div/clr-dg-cell[1]/clr-checkbox + Click Element xpath=//clr-dg-row[contains(.,'${labelname}')]//clr-checkbox Sleep 1 Click Element xpath=//button[contains(.,'Edit')] Sleep 1 @@ -268,10 +268,11 @@ Update A Label Wait Until Page Contains ${labelname}1 Delete A Label - Click Element xpath=//clr-dg-row[1]/div/clr-dg-cell[1]/clr-checkbox + [Arguments] ${labelname} + Click Element xpath=//clr-dg-row[contains(.,'${labelname}')]//clr-checkbox Sleep 1 Click ELement xpath=//button[contains(.,'Delete')] Sleep 3 Capture Page Screenshot Click Element xpath=//clr-modal//div//button[contains(.,'DELETE')] - Wait Until Page Contains Deleted successfully + Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${labelname}')]/../div/clr-icon[@shape="success-standard" diff --git a/tests/resources/Harbor-Pages/Project.robot b/tests/resources/Harbor-Pages/Project.robot index 1343efd5b..0a4ada974 100644 --- a/tests/resources/Harbor-Pages/Project.robot +++ b/tests/resources/Harbor-Pages/Project.robot @@ -120,21 +120,20 @@ Delete Project Sleep 1 Click Element xpath=//button[contains(.,"Delete")] Sleep 2 - Click Element xpath=//clr-modal//button[2] + Click Element //clr-modal//button[contains(.,'DELETE')] Sleep 1 - Click Element xpath=//button[contains(.,"CLOSE")] Project Should Not Be Deleted [Arguments] ${projname} Delete Project ${projname} Sleep 1 - Page Should Contain ${projname} + Page Should Contain Element //clr-tab-content//div[contains(.,'${projname}')]/../div/clr-icon[@shape="error-standard"] Project Should Be Deleted [Arguments] ${projname} Delete Project ${projname} Sleep 2 - Page Should Not Contain ${projname} + Page Should Contain Element //clr-tab-content//div[contains(.,'${projname}')]/../div/clr-icon[@shape="success-standard"] Advanced Search Should Display Page Should Contain Element xpath=//audit-log//div[@class="flex-xs-middle"]/button diff --git a/tests/resources/Harbor-Pages/ToolKit.robot b/tests/resources/Harbor-Pages/ToolKit.robot index 6a9088f1c..c7164c11f 100644 --- a/tests/resources/Harbor-Pages/ToolKit.robot +++ b/tests/resources/Harbor-Pages/ToolKit.robot @@ -21,15 +21,15 @@ ${HARBOR_VERSION} v1.1.1 *** Keywords *** Delete Success - Page Should Contain Deleted successfully - Page Should Not Contain Deleted failed - Click Element //clr-modal//button[contains(.,'CLOSE')] + [Arguments] @{obj} + :For ${obj} in @{obj} + \ Page Should Contain Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape="success-standard"] Sleep 1 -Partly Success - Page Should Contain Deleted successfully - Page Should Contain Deleted failed - Click Element //clr-modal//button[contains(.,'CLOSE')] +Delete Fail + [Arguments] @{obj} + :For ${obj} in @{obj} + \ Page Should Contain Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape="error-standard"] Sleep 1 Filter Object diff --git a/tests/robot-cases/Group11-Nightly/Nightly.robot b/tests/robot-cases/Group11-Nightly/Nightly.robot index 67279823d..c860eff4f 100644 --- a/tests/robot-cases/Group11-Nightly/Nightly.robot +++ b/tests/robot-cases/Group11-Nightly/Nightly.robot @@ -336,7 +336,7 @@ Test Case - Delete Label Switch To System Labels Create New Labels label_${d} Sleep 3 - Delete A Label + Delete A Label label_${d} Close Browser TestCase - Project Admin Operate Labels @@ -352,7 +352,7 @@ TestCase - Project Admin Operate Labels Sleep 2 Update A Label label_${d} Sleep 2 - Delete A Label + Delete A Label label_${d} Close Browser TestCase - Project Admin Add Labels To Repo @@ -546,10 +546,9 @@ Test Case - Delete Multi Project Push Image ${ip} test${d} Test1@34 projecta${d} hello-world Filter Object project Multi-delete Object projecta projectb - Partly Success # Verify delete project with image should not be deleted directly - Page Should Contain projecta${d} - Page Should Not Contain projectb${d} + Delete Fail projecta${d} + Delete Success projectb${d} Close Browser Test Case - Delete Multi User @@ -566,10 +565,8 @@ Test Case - Delete Multi User Filter Object delete Multi-delete Object deletea deleteb deletec # Assert delete - Delete Success + Delete Success deletea deleteb deletec Sleep 1 - # Filter object delete - Page Should Not Contain deletea Close Browser Test Case - Delete Multi Repo @@ -583,7 +580,7 @@ Test Case - Delete Multi Repo Go Into Project project${d} Multi-delete Object hello-world busybox # Verify - Delete Success + Delete Success hello-world busybox Close Browser Test Case - Delete Multi Tag @@ -598,7 +595,7 @@ Test Case - Delete Multi Tag Go Into Repo redis Multi-delete object 3.2.10-alpine 4.0.7-alpine # Verify - Delete Success + Delete Success 3.2.10-alpine 4.0.7-alpine Close Browser Test Case - Delete Repo on CardView @@ -613,7 +610,7 @@ Test Case - Delete Repo on CardView Switch To CardView Delete Repo on CardView busybox # Verify - Delete Success + Delete Success busybox Close Browser Test Case - Delete Multi Member @@ -630,8 +627,7 @@ Test Case - Delete Multi Member Add Guest Member to project testa${d} Add Guest Member to project testb${d} Multi-delete Member testa${d} testb${d} - Delete Success - Page Should Not Contain testa${d} + Delete Success testa${d} testb${d} Close Browser Test Case - Assign Sys Admin