mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 04:05:40 +01:00
Replace keyword without waiting to one which had waiting
1. Replace all keywords without using waiting; 2. Add a debug line in Go Into Repo for UI hung trouble shooting. Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
parent
fe7fdeb723
commit
de2ec7d063
@ -21,28 +21,28 @@ Resource ../../resources/Util.robot
|
||||
*** Keywords ***
|
||||
Assign User Admin
|
||||
[Arguments] ${user}
|
||||
Click Element xpath=//harbor-user//hbr-filter//clr-icon
|
||||
Retry Element Click xpath=//harbor-user//hbr-filter//clr-icon
|
||||
Input Text xpath=//harbor-user//hbr-filter//input ${user}
|
||||
Sleep 2
|
||||
#select checkbox
|
||||
Click Element //clr-dg-row[contains(.,'${user}')]//label
|
||||
Retry Element Click //clr-dg-row[contains(.,'${user}')]//label
|
||||
#click assign admin
|
||||
Click Element //*[@id='set-admin']
|
||||
Retry Element Click //*[@id='set-admin']
|
||||
Sleep 1
|
||||
|
||||
Switch to User Tag
|
||||
Click Element xpath=${administration_user_tag_xpath}
|
||||
Retry Element Click xpath=${administration_user_tag_xpath}
|
||||
Sleep 1
|
||||
|
||||
Administration Tag Should Display
|
||||
Page Should Contain Element xpath=${administration_tag_xpath}
|
||||
Retry Wait Until Page Contains Element xpath=${administration_tag_xpath}
|
||||
|
||||
User Email Should Exist
|
||||
[Arguments] ${email}
|
||||
Sign In Harbor ${HARBOR_URL} %{HARBOR_ADMIN} %{HARBOR_PASSWORD}
|
||||
Switch to User Tag
|
||||
Page Should Contain Element xpath=//clr-dg-cell[contains(., '${email}')]
|
||||
Retry Wait Until Page Contains Element xpath=//clr-dg-cell[contains(., '${email}')]
|
||||
|
||||
Add User Button Should Be Disabled
|
||||
Sleep 1
|
||||
Page Should Contain Element //button[contains(.,'New') and @disabled='']
|
||||
Retry Wait Until Page Contains Element //button[contains(.,'New') and @disabled='']
|
||||
|
@ -140,10 +140,10 @@ Self Reg Should Be Enabled
|
||||
Checkbox Should Be Selected xpath=${self_reg_xpath}
|
||||
|
||||
Project Creation Should Display
|
||||
Page Should Contain Element xpath=${project_create_xpath}
|
||||
Retry Wait Until Page Contains Element xpath=${project_create_xpath}
|
||||
|
||||
Project Creation Should Not Display
|
||||
Page Should Not Contain Element xpath=${project_create_xpath}
|
||||
Retry Wait Until Page Not Contains Element xpath=${project_create_xpath}
|
||||
|
||||
## System settings
|
||||
Switch To System Settings
|
||||
|
@ -37,7 +37,7 @@ Capture Screenshot And Source
|
||||
Log Source
|
||||
|
||||
Sign Up Should Not Display
|
||||
Page Should Not Contain Element xpath=${sign_up_button_xpath}
|
||||
Retry Wait Until Page Not Contains Element xpath=${sign_up_button_xpath}
|
||||
|
||||
Create An New User
|
||||
[Arguments] ${url} ${username} ${email} ${realname} ${newPassword} ${comment}
|
||||
|
@ -21,8 +21,8 @@ Resource ../../resources/Util.robot
|
||||
*** Keywords ***
|
||||
|
||||
Ldap User Should Not See Change Password
|
||||
Click Element //clr-header//clr-dropdown[2]//button
|
||||
Sleep 1
|
||||
Retry Element Click //clr-header//clr-dropdown[2]//button
|
||||
Sleep 2
|
||||
Page Should Not Contain Password
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ Public Should Be Selected
|
||||
|
||||
Project Should Be Public
|
||||
[Arguments] ${projectName}
|
||||
Page Should Contain Element //clr-dg-row[contains(.,'${projectName}')]//clr-dg-cell[contains(.,'Public')]
|
||||
Retry Wait Until Page Contains Element //clr-dg-row[contains(.,'${projectName}')]//clr-dg-cell[contains(.,'Public')]
|
||||
|
||||
Content Trust Should Be Selected
|
||||
Checkbox Should Be Selected //hbr-project-policy-config//input[@name='content-trust']
|
||||
|
@ -70,13 +70,13 @@ User Can Change Role
|
||||
[arguments] ${username}
|
||||
Retry Element Click xpath=//clr-dg-row[contains(.,'${username}')]//input/../label
|
||||
Retry Element Click xpath=//*[@id='member-action']
|
||||
Page Should Not Contain Element xpath=//button[@disabled='' and contains(.,'Admin')]
|
||||
Retry Wait Until Page Not Contains Element xpath=//button[@disabled='' and contains(.,'Admin')]
|
||||
|
||||
User Can Not Change Role
|
||||
[arguments] ${username}
|
||||
Retry Element Click xpath=//clr-dg-row[contains(.,'${username}')]//input/../label
|
||||
Retry Element Click xpath=//*[@id='member-action']
|
||||
Page Should Contain Element xpath=//button[@disabled='' and contains(.,'Admin')]
|
||||
Retry Wait Until Page Contains Element xpath=//button[@disabled='' and contains(.,'Admin')]
|
||||
|
||||
#this keyworkd seems will not use any more, will delete in the future
|
||||
Non-admin View Member Account
|
||||
@ -84,7 +84,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(.,'User')]
|
||||
Retry Wait Until Page Contains Element xpath=//button[@disabled='' and contains(.,'User')]
|
||||
|
||||
Add Guest Member To Project
|
||||
[arguments] ${member}
|
||||
@ -153,7 +153,7 @@ User Should Be Guest
|
||||
Go Into Project ${project}
|
||||
Switch To Member
|
||||
User Can Not Add Member
|
||||
Page Should Contain Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Guest')]
|
||||
Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Guest')]
|
||||
Logout Harbor
|
||||
Pull image ${ip} ${user} ${password} ${project} hello-world
|
||||
Cannot Push image ${ip} ${user} ${password} ${project} hello-world
|
||||
@ -168,7 +168,7 @@ User Should Be Developer
|
||||
Go Into Project ${project}
|
||||
Switch To Member
|
||||
User Can Not Add Member
|
||||
Page Should Contain Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Developer')]
|
||||
Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Developer')]
|
||||
Logout Harbor
|
||||
Push Image With Tag ${ip} ${user} ${password} ${project} hello-world v1
|
||||
|
||||
@ -183,7 +183,7 @@ User Should Be Admin
|
||||
Switch To Member
|
||||
Add Guest Member To Project ${guest}
|
||||
User Can Change Role ${guest}
|
||||
Page Should Contain Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Admin')]
|
||||
Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Admin')]
|
||||
Logout Harbor
|
||||
Push Image With Tag ${ip} ${user} ${password} ${project} hello-world v2
|
||||
|
||||
@ -197,7 +197,7 @@ User Should Be Master
|
||||
Go Into Project ${project}
|
||||
Delete Repo ${project}
|
||||
Switch To Member
|
||||
Page Should Contain Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Master')]
|
||||
Retry Wait Until Page Contains Element xpath=//clr-dg-row[contains(.,'${user}')]//clr-dg-cell[contains(.,'Master')]
|
||||
Logout Harbor
|
||||
Push Image With Tag ${ip} ${user} ${password} ${project} hello-world v3
|
||||
|
||||
@ -206,5 +206,5 @@ Project Should Have Member
|
||||
Sign In Harbor ${HARBOR_URL} %{HARBOR_ADMIN} %{HARBOR_PASSWORD}
|
||||
Go Into Project ${project}
|
||||
Switch To Member
|
||||
Page Should Contain Element xpath=//clr-dg-cell[contains(., '${user}')]
|
||||
Retry Wait Until Page Contains Element xpath=//clr-dg-cell[contains(., '${user}')]
|
||||
Logout Harbor
|
||||
|
@ -21,3 +21,6 @@ ${first_cve_xpath} //clr-dg-row[1]//clr-dg-cell//a
|
||||
${view_log_xpath} //clr-dg-row[1]//clr-dg-cell[4]//a
|
||||
${build_history_btn} //button[contains(.,'Build History')]
|
||||
${build_history_data} //clr-dg-row
|
||||
${push_image_command_btn} //hbr-push-image-button//button
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@ Create An New Project
|
||||
Capture Page Screenshot
|
||||
Retry Text Input xpath=${project_name_xpath} ${projectname}
|
||||
${element_project_public}= Set Variable xpath=${project_public_xpath}
|
||||
Run Keyword If '${public}' == 'true' Run Keywords Wait Until Element Is Visible And Enabled ${element_project_public} AND Click Element ${element_project_public}
|
||||
Run Keyword If '${public}' == 'true' Run Keywords Wait Until Element Is Visible And Enabled ${element_project_public} AND Retry Element Click ${element_project_public}
|
||||
Run Keyword If '${count_quota}'!='${null}' Input Count Quota ${count_quota}
|
||||
Run Keyword If '${storage_quota}'!='${null}' Input Storage Quota ${storage_quota} ${storage_quota_unit}
|
||||
Capture Page Screenshot
|
||||
|
@ -43,4 +43,4 @@ Logout Harbor
|
||||
Retry Link Click Log Out
|
||||
Capture Page Screenshot Logout.png
|
||||
Sleep 2
|
||||
Wait Until Keyword Succeeds 5x 1 Page Should Contain Element ${sign_in_title_xpath}
|
||||
Wait Until Keyword Succeeds 5x 1 Retry Wait Until Page Contains Element ${sign_in_title_xpath}
|
@ -406,7 +406,7 @@ Test Case - Developer Operate Labels
|
||||
Sign In Harbor ${HARBOR_URL} user022 Test1@34
|
||||
Go Into Project project${d} has_image=${false}
|
||||
Sleep 3
|
||||
Page Should Not Contain Element xpath=//a[contains(.,'Labels')]
|
||||
Retry Wait Until Page Not Contains Element xpath=//a[contains(.,'Labels')]
|
||||
Close Browser
|
||||
|
||||
Test Case - Retag A Image Tag
|
||||
@ -431,7 +431,7 @@ Test Case - Retag A Image Tag
|
||||
Page Should Contain ${target_image_name}
|
||||
Go Into Repo project${random_num1}${random_num2}/${target_image_name}
|
||||
Sleep 1
|
||||
Page Should Contain Element xpath=${tag_value_xpath}
|
||||
Retry Wait Until Page Contains Element xpath=${tag_value_xpath}
|
||||
Close Browser
|
||||
|
||||
Test Case - Create An New Project With Quotas Set
|
||||
|
@ -44,6 +44,7 @@ Test Case - System Admin On-board New Member
|
||||
${d}= Get Current Date result_format=%m%s
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
Switch To User Tag
|
||||
Sleep 2
|
||||
Page Should Not Contain mike02
|
||||
Navigate To Projects
|
||||
Create An New Project project${d}
|
||||
@ -60,8 +61,10 @@ Test Case - LDAP User On-borad New Member
|
||||
Create An New Project project${d}
|
||||
Go Into Project project${d} has_image=${false}
|
||||
Switch To Member
|
||||
Sleep 2
|
||||
Page Should Not Contain mike04
|
||||
Add Guest Member To Project mike04
|
||||
Sleep 2
|
||||
Page Should Contain mike04
|
||||
Close Browser
|
||||
|
||||
|
@ -393,7 +393,7 @@ TestCase - Developer Operate Labels
|
||||
Sign In Harbor ${HARBOR_URL} bob${d} Test1@34
|
||||
Go Into Project project${d} has_image=${false}
|
||||
Sleep 3
|
||||
Page Should Not Contain Element xpath=//a[contains(.,'Labels')]
|
||||
Retry Wait Until Page Not Contains Element xpath=//a[contains(.,'Labels')]
|
||||
Close Browser
|
||||
|
||||
Test Case - Scan A Tag In The Repo
|
||||
|
@ -36,7 +36,7 @@ Test Case - Home Page Differences With DB Mode
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
Logout Harbor
|
||||
Sleep 2
|
||||
Page Should Not Contain Sign up
|
||||
Page Should Not Contain Sign up
|
||||
Page Should Not Contain Forgot password
|
||||
Close Browser
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user