Nightly test case <List Helm Charts> is not stable, due to keyword <Go Back To Versions And Delete> failed at delete button click on a rare occasion, so I wrap 2 related action into one transaction, it does help. (#7050)

Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
danfengliu 2019-03-01 18:25:45 +08:00 committed by GitHub
parent 321874c815
commit 62bb10d2e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 10 deletions

View File

@ -46,5 +46,12 @@ Go Back To Versions And Delete
Retry Element Click xpath=${version_bread_crumbs}
Retry Element Click xpath=${version_checkbox}
Retry Element Click xpath=${version_delete}
Retry Element Click xpath=${version_confirm_delete}
Retry Wait Until Page Contains Element xpath=${helmchart_content}
:For ${n} IN RANGE 1 6
\ Log To Console Trying Go Back To Versions And Delete ${n} times ...
\ Retry Element Click xpath=${version_confirm_delete}
\ Capture Page Screenshot
\ ${out} Run Keyword And Ignore Error Retry Wait Until Page Contains Element xpath=${helmchart_content}
\ Capture Page Screenshot
\ Log To Console Return value is ${out[0]}
\ Exit For Loop If '${out[0]}'=='PASS'
\ Sleep 1

View File

@ -23,23 +23,21 @@ ${HARBOR_VERSION} v1.1.1
Delete Success
[Arguments] @{obj}
:For ${obj} in @{obj}
\ Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape='success-standard']
\ Retry Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape='success-standard']
Sleep 1
Capture Page Screenshot
Delete Fail
[Arguments] @{obj}
:For ${obj} in @{obj}
\ Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape='error-standard']
\ Retry Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape='error-standard']
Sleep 1
Capture Page Screenshot
Filter Object
#Filter project repo user tag.
[Arguments] ${kw}
${element}= Set Variable xpath=//hbr-filter//clr-icon
Wait Until Element Is Visible And Enabled ${element}
Click Element ${element}
Retry Element Click xpath=//hbr-filter//clr-icon
${element}= Set Variable xpath=//hbr-filter//input
Wait Until Element Is Visible And Enabled ${element}
Input Text ${element} ${kw}
@ -48,9 +46,7 @@ Filter Object
Select Object
#select single element such as user project repo tag
[Arguments] ${obj}
${element}= Set Variable xpath=//clr-dg-row[contains(.,'${obj}')]//label
Wait Until Element Is Visible And Enabled ${element}
Click Element ${element}
Retry Element Click xpath=//clr-dg-row[contains(.,'${obj}')]//label
# This func cannot support as the delete user flow changed.
Multi-delete Object
@ -58,10 +54,13 @@ Multi-delete Object
: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 ${repo_delete_btn}
Sleep 1
Capture Page Screenshot
Retry Element Click ${repo_delete_on_card_view_btn}
Sleep 1
Capture Page Screenshot
Sleep 1