2018-09-19 18:57:15 +02:00
|
|
|
# Copyright Project Harbor Authors
|
2018-01-12 03:42:17 +01: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 ***
|
|
|
|
${HARBOR_VERSION} v1.1.1
|
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
Delete Success
|
2018-05-24 07:07:19 +02:00
|
|
|
[Arguments] @{obj}
|
2018-05-24 13:53:23 +02:00
|
|
|
:For ${obj} in @{obj}
|
2019-03-01 11:25:45 +01:00
|
|
|
\ Retry Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape='success-standard']
|
2018-01-12 03:42:17 +01:00
|
|
|
Sleep 1
|
2018-10-23 03:08:33 +02:00
|
|
|
Capture Page Screenshot
|
2018-01-12 03:42:17 +01:00
|
|
|
|
2018-05-24 07:07:19 +02:00
|
|
|
Delete Fail
|
|
|
|
[Arguments] @{obj}
|
|
|
|
:For ${obj} in @{obj}
|
2019-03-01 11:25:45 +01:00
|
|
|
\ Retry Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape='error-standard']
|
2018-01-12 03:42:17 +01:00
|
|
|
Sleep 1
|
2018-10-23 03:08:33 +02:00
|
|
|
Capture Page Screenshot
|
2018-01-12 03:42:17 +01:00
|
|
|
|
|
|
|
Filter Object
|
2018-03-12 07:20:37 +01:00
|
|
|
#Filter project repo user tag.
|
2018-01-12 03:42:17 +01:00
|
|
|
[Arguments] ${kw}
|
2019-03-01 11:25:45 +01:00
|
|
|
Retry Element Click xpath=//hbr-filter//clr-icon
|
2019-01-11 04:26:10 +01:00
|
|
|
${element}= Set Variable xpath=//hbr-filter//input
|
2019-02-26 11:43:24 +01:00
|
|
|
Wait Until Element Is Visible And Enabled ${element}
|
2019-01-11 04:26:10 +01:00
|
|
|
Input Text ${element} ${kw}
|
|
|
|
Sleep 3
|
2018-01-12 03:42:17 +01:00
|
|
|
|
|
|
|
Select Object
|
2018-03-12 07:20:37 +01:00
|
|
|
#select single element such as user project repo tag
|
2018-01-12 03:42:17 +01:00
|
|
|
[Arguments] ${obj}
|
2019-03-01 11:25:45 +01:00
|
|
|
Retry Element Click xpath=//clr-dg-row[contains(.,'${obj}')]//label
|
2018-01-12 03:42:17 +01:00
|
|
|
|
2018-07-19 11:02:09 +02:00
|
|
|
# This func cannot support as the delete user flow changed.
|
2018-01-12 03:42:17 +01:00
|
|
|
Multi-delete Object
|
2019-03-11 03:34:53 +01:00
|
|
|
[Arguments] ${delete_btn} @{obj}
|
2018-01-12 03:42:17 +01:00
|
|
|
:For ${obj} in @{obj}
|
2019-01-11 04:26:10 +01:00
|
|
|
\ ${element}= Set Variable xpath=//clr-dg-row[contains(.,'${obj}')]//label
|
2019-02-26 11:43:24 +01:00
|
|
|
\ Retry Element Click ${element}
|
2019-03-01 11:25:45 +01:00
|
|
|
Sleep 1
|
2018-10-23 03:08:33 +02:00
|
|
|
Capture Page Screenshot
|
2019-03-11 03:34:53 +01:00
|
|
|
Retry Element Click ${delete_btn}
|
2019-03-01 11:25:45 +01:00
|
|
|
Sleep 1
|
2018-10-23 03:08:33 +02:00
|
|
|
Capture Page Screenshot
|
2019-02-26 11:43:24 +01:00
|
|
|
Retry Element Click ${repo_delete_on_card_view_btn}
|
2019-03-01 11:25:45 +01:00
|
|
|
Sleep 1
|
2018-10-23 03:08:33 +02:00
|
|
|
Capture Page Screenshot
|
2019-02-26 11:43:24 +01:00
|
|
|
Sleep 1
|
2018-01-12 03:42:17 +01:00
|
|
|
|
2018-07-19 11:02:09 +02:00
|
|
|
Multi-delete User
|
|
|
|
[Arguments] @{obj}
|
|
|
|
:For ${obj} in @{obj}
|
2019-04-11 09:15:35 +02:00
|
|
|
\ Retry Element Click //clr-dg-row[contains(.,'${obj}')]//label
|
|
|
|
Retry Element Click ${member_action_xpath}
|
|
|
|
Retry Element Click //clr-dropdown/clr-dropdown-menu/button[2]
|
|
|
|
Retry Double Keywords When Error Retry Element Click ${delete_btn} Retry Wait Until Page Not Contains Element ${delete_btn}
|
|
|
|
|
2018-07-19 11:02:09 +02:00
|
|
|
|
2019-02-26 11:43:24 +01:00
|
|
|
Multi-delete Member
|
2018-01-30 12:04:24 +01:00
|
|
|
[Arguments] @{obj}
|
|
|
|
:For ${obj} in @{obj}
|
2019-08-01 09:10:54 +02:00
|
|
|
\ Retry Element Click //clr-dg-row[contains(.,'${obj}')]//clr-checkbox-wrapper
|
2019-07-08 09:28:28 +02:00
|
|
|
Retry Double Keywords When Error Retry Element Click ${member_action_xpath} Retry Wait Until Page Contains Element ${delete_action_xpath}
|
|
|
|
Retry Double Keywords When Error Retry Element Click ${delete_action_xpath} Retry Wait Until Page Contains Element ${delete_btn}
|
2019-04-11 09:15:35 +02:00
|
|
|
Retry Double Keywords When Error Retry Element Click ${delete_btn} Retry Wait Until Page Not Contains Element ${delete_btn}
|
|
|
|
|
2018-01-30 12:04:24 +01:00
|
|
|
|
2018-01-25 13:35:44 +01:00
|
|
|
Multi-delete Object Without Confirmation
|
|
|
|
[Arguments] @{obj}
|
|
|
|
:For ${obj} in @{obj}
|
2019-04-11 09:15:35 +02:00
|
|
|
\ Retry Element Click //clr-dg-row[contains(.,'${obj}')]//label
|
|
|
|
Retry Double Keywords When Error Retry Element Click ${delete_btn_2} Retry Wait Until Page Not Contains Element ${delete_btn_2}
|
|
|
|
|
2018-01-25 13:35:44 +01:00
|
|
|
|
2018-01-12 03:42:17 +01:00
|
|
|
Select All On Current Page Object
|
2019-04-11 09:15:35 +02:00
|
|
|
Retry Element Click //div[@class='datagrid-head']//label
|