Modify nightly test case for user view logs and other

Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
danfengliu 2020-03-23 11:09:55 +08:00
parent 8688f78cd2
commit 08a070a124
4 changed files with 26 additions and 8 deletions

View File

@ -160,10 +160,11 @@ Advanced Search Should Display
# it's not a common keywords, only used into log case. # it's not a common keywords, only used into log case.
Do Log Advanced Search Do Log Advanced Search
Capture Page Screenshot LogAdvancedSearch.png Capture Page Screenshot LogAdvancedSearch.png
Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'pull')] Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'artifact') and contains(.,'pull')]
Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'push')] Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'artifact') and contains(.,'create')]
Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'create')] Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'artifact') and contains(.,'delete')]
Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'delete')] Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'project') and contains(.,'create')]
Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'repository') and contains(.,'delete')]
Retry Element Click xpath=//audit-log//div[@class='flex-xs-middle']/button Retry Element Click xpath=//audit-log//div[@class='flex-xs-middle']/button
Retry Element Click xpath=//project-detail//audit-log//clr-dropdown/button Retry Element Click xpath=//project-detail//audit-log//clr-dropdown/button
#pull log #pull log
@ -247,13 +248,15 @@ Add Labels To Tag
Retry Element Click xpath=//clr-dg-row[contains(.,'${tagName}')]//label Retry Element Click xpath=//clr-dg-row[contains(.,'${tagName}')]//label
Capture Page Screenshot add_${labelName}.png Capture Page Screenshot add_${labelName}.png
Retry Element Click xpath=//clr-dg-action-bar//clr-dropdown//span Retry Element Click xpath=//clr-dg-action-bar//clr-dropdown//span
Retry Element Click xpath=//clr-dropdown-menu//clr-dropdown//button[contains(.,'labels')] Retry Element Click xpath=//clr-dropdown-menu//clr-dropdown//button[contains(.,'Add labels')]
Retry Element Click xpath=//clr-dropdown//div//label[contains(.,'${labelName}')] Retry Element Click xpath=//clr-dropdown//div//label[contains(.,'${labelName}')]
Retry Wait Until Page Contains Element xpath=//clr-dg-row//label[contains(.,'${labelName}')] Retry Wait Until Page Contains Element xpath=//clr-dg-row//label[contains(.,'${labelName}')]
Filter Labels In Tags Filter Labels In Tags
[Arguments] ${labelName1} ${labelName2} [Arguments] ${labelName1} ${labelName2}
Retry Element Click xpath=//*[@id='filterArea']//hbr-filter/span/clr-icon Retry Element Click xpath=//*[@id='filterArea']//hbr-filter/span/clr-icon
Retry Element Click xpath=//clr-main-container//artifact-list-tab//clr-select-container//select
Retry Element Click xpath=//clr-main-container//artifact-list-tab//clr-select-container//select/option[@value='labels']
Retry Wait Until Page Contains Element xpath=//*[@id='filterArea']//div//button[contains(.,'${labelName1}')] Retry Wait Until Page Contains Element xpath=//*[@id='filterArea']//div//button[contains(.,'${labelName1}')]
Retry Element Click xpath=//*[@id='filterArea']//div//button[contains(.,'${labelName1}')] Retry Element Click xpath=//*[@id='filterArea']//div//button[contains(.,'${labelName1}')]
Retry Element Click xpath=//*[@id='filterArea']//hbr-filter/span/clr-icon Retry Element Click xpath=//*[@id='filterArea']//hbr-filter/span/clr-icon

View File

@ -40,7 +40,7 @@ ${repo_retag_confirm_dlg} css=${modal-dialog}
${repo_delete_on_card_view_btn} //clr-modal//button[contains(.,'DELETE')] ${repo_delete_on_card_view_btn} //clr-modal//button[contains(.,'DELETE')]
${delete_btn} //button[contains(.,'Delete')] ${delete_btn} //button[contains(.,'Delete')]
${repo_delete_btn} xpath=//hbr-repository-gridview//button[contains(.,'Delete')] ${repo_delete_btn} xpath=//hbr-repository-gridview//button[contains(.,'Delete')]
${project_delete_btn} xpath=//list-project//clr-datagrid//button[contains(.,'Delete')] ${project_delete_btn} xpath=//button[@id='delete-project']
${tag_delete_btn} xpath=//tag-repository//clr-datagrid//button[contains(.,'Delete')] ${tag_delete_btn} xpath=//tag-repository//clr-datagrid//button[contains(.,'Delete')]
${user_delete_btn} xpath=/clr-dropdown-menu//button[contains(.,'Delete')] ${user_delete_btn} xpath=/clr-dropdown-menu//button[contains(.,'Delete')]
${repo_search_icon} xpath=//hbr-filter//clr-icon ${repo_search_icon} xpath=//hbr-filter//clr-icon

View File

@ -55,8 +55,23 @@ Select Object
[Arguments] ${obj} [Arguments] ${obj}
Retry Element Click xpath=//clr-dg-row[contains(.,'${obj}')]//label Retry Element Click xpath=//clr-dg-row[contains(.,'${obj}')]//label
# This func cannot support as the delete user flow changed.
Multi-delete Object Multi-delete Object
[Arguments] ${delete_btn} @{obj}
:For ${obj} in @{obj}
\ ${element}= Set Variable xpath=//clr-dg-row[contains(.,'${obj}')]//label
\ Retry Element Click ${element}
Sleep 1
Capture Page Screenshot
Retry Element Click ${delete_btn}
Sleep 1
Capture Page Screenshot
Retry Element Click ${repo_delete_on_card_view_btn}
Sleep 1
Capture Page Screenshot
Sleep 1
# This func cannot support as the delete user flow changed.
Multi-delete Artifact
[Arguments] ${delete_btn} @{obj} [Arguments] ${delete_btn} @{obj}
:For ${obj} in @{obj} :For ${obj} in @{obj}
\ ${element}= Set Variable xpath=//clr-dg-row[contains(.,'${obj}')]//label \ ${element}= Set Variable xpath=//clr-dg-row[contains(.,'${obj}')]//label

View File

@ -322,7 +322,7 @@ Test Case - Delete Multi Artifacts
Go Into Project project${d} Go Into Project project${d}
Go Into Repo redis Go Into Repo redis
@{tag_list} Create List 3.2.10-alpine 4.0.7-alpine @{tag_list} Create List 3.2.10-alpine 4.0.7-alpine
Multi-delete object ${tag_delete_btn} @{tag_list} Multi-delete Artifact ${tag_delete_btn} @{tag_list}
# Verify # Verify
Delete Success sha256:dd179737 sha256:28a85227 Delete Success sha256:dd179737 sha256:28a85227
Close Browser Close Browser