2018-09-19 18:57:15 +02:00
|
|
|
# Copyright Project Harbor Authors
|
2017-08-07 08:02:38 +02:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License
|
|
|
|
|
|
|
|
*** Settings ***
|
|
|
|
Documentation This resource provides any keywords related to the Harbor private registry appliance
|
|
|
|
Resource ../../resources/Util.robot
|
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
Sign In Harbor
|
2019-12-27 07:11:01 +01:00
|
|
|
[Arguments] ${url} ${user} ${pw} ${is_close_scan_plugin_mesg}=${false}
|
2017-09-07 12:29:05 +02:00
|
|
|
Go To ${url}
|
2019-01-30 07:22:31 +01:00
|
|
|
Retry Wait Element ${harbor_span_title}
|
|
|
|
Retry Wait Element ${login_name}
|
|
|
|
Retry Wait Element ${login_pwd}
|
2018-12-25 08:44:44 +01:00
|
|
|
Input Text ${login_name} ${user}
|
|
|
|
Input Text ${login_pwd} ${pw}
|
2019-01-30 07:22:31 +01:00
|
|
|
Retry Wait Element ${login_btn}
|
|
|
|
Retry Button Click ${login_btn}
|
2017-09-07 12:29:05 +02:00
|
|
|
Log To Console ${user}
|
2019-01-30 07:22:31 +01:00
|
|
|
Retry Wait Element xpath=//span[contains(., '${user}')]
|
2019-12-27 07:11:01 +01:00
|
|
|
Run Keyword If ${is_close_scan_plugin_mesg}==${true} Run Keyword And Ignore Error Retry Element Click ${close_scan_plugin_mesg}
|
2017-08-07 08:02:38 +02:00
|
|
|
|
2018-08-10 07:53:48 +02:00
|
|
|
Capture Screenshot And Source
|
|
|
|
Capture Page Screenshot
|
|
|
|
Log Source
|
|
|
|
|
2017-08-07 08:02:38 +02:00
|
|
|
Sign Up Should Not Display
|
2019-12-27 07:11:01 +01:00
|
|
|
Retry Wait Until Page Not Contains Element xpath=${sign_up_button_xpath}
|
2017-08-07 08:02:38 +02:00
|
|
|
|
|
|
|
Create An New User
|
|
|
|
[Arguments] ${url} ${username} ${email} ${realname} ${newPassword} ${comment}
|
2017-09-07 12:29:05 +02:00
|
|
|
Go To ${url}
|
2019-09-24 04:55:38 +02:00
|
|
|
Retry Wait Element ${harbor_span_title}
|
|
|
|
Retry Element Click xpath=${sign_up_for_an_account_xpath}
|
|
|
|
Retry Text Input xpath=${username_xpath} ${username}
|
|
|
|
Retry Text Input xpath=${email_xpath} ${email}
|
|
|
|
Retry Text Input xpath=${realname_xpath} ${realname}
|
|
|
|
Retry Text Input xpath=${newPassword_xpath} ${newPassword}
|
|
|
|
Retry Text Input xpath=${confirmPassword_xpath} ${newPassword}
|
|
|
|
Retry Text Input xpath=${comment_xpath} ${comment}
|
|
|
|
Retry Double Keywords When Error Retry Element Click ${signup_xpath} Retry Wait Until Page Not Contains Element ${signup_xpath}
|
|
|
|
Retry Text Input ${login_name} ${username}
|
|
|
|
Retry Text Input ${login_pwd} ${newPassword}
|
|
|
|
Retry Double Keywords When Error Retry Element Click ${login_btn} Retry Wait Until Page Not Contains Element ${login_btn}
|
|
|
|
Retry Wait Element xpath=//span[contains(., '${username}')]
|