From aee07fff969d4bef5cdeb1e064159cc93079a5ac Mon Sep 17 00:00:00 2001 From: Yogi_Wang Date: Sat, 29 Dec 2018 17:01:43 +0800 Subject: [PATCH] upgrade clarity components to 1.0 Signed-off-by: Yogi_Wang --- .../replication-config.component.html | 32 +- .../replication-config.component.scss | 3 + .../system/system-settings.component.html | 27 +- .../create-edit-endpoint.component.html | 47 +- .../create-edit-rule.component.html | 65 +- .../lib/src/endpoint/endpoint.component.scss | 2 +- .../lib/src/endpoint/endpoint.component.ts | 2 +- .../chart-detail-summary.component.html | 36 +- .../src/helm-chart/helm-chart.component.html | 41 +- .../src/helm-chart/helm-chart.component.ts | 2 +- .../versions/helm-chart-version.component.ts | 2 +- src/portal/lib/src/label/label.component.scss | 2 +- .../list-replication-rule.component.html | 4 +- .../list-replication-rule.component.ts | 2 +- .../lib/src/log/recent-log.component.scss | 3 + .../lib/src/log/recent-log.component.spec.ts | 31 +- .../lib/src/log/recent-log.component.ts | 2 +- .../project-policy-config.component.html | 106 +- .../project-policy-config.component.ts | 4 +- .../replication/replication.component.scss | 2 +- .../src/replication/replication.component.ts | 2 +- .../repository-gridview.component.spec.ts | 2 - .../repository-gridview.component.ts | 2 +- .../src/repository/repository.component.ts | 2 +- src/portal/lib/src/service/interface.ts | 30 + src/portal/lib/src/shared/shared.module.ts | 2 +- src/portal/lib/src/tag/tag.component.scss | 5 +- src/portal/lib/src/tag/tag.component.ts | 2 +- src/portal/lib/src/utils.ts | 2 +- src/portal/package-lock.json | 4763 +++++++++++------ src/portal/package.json | 190 +- .../app/account/sign-up/sign-up.component.ts | 2 +- .../config/auth/config-auth.component.html | 96 +- .../config/email/config-email.component.html | 59 +- .../config/email/config-email.component.scss | 3 + src/portal/src/app/core/core.module.ts | 2 +- .../app/dev-center/dev-center.component.html | 2 +- .../app/dev-center/dev-center.component.scss | 1 + .../src/app/dev-center/dev-center.module.ts | 2 +- src/portal/src/app/log/audit-log.component.ts | 2 +- .../chart-detail/chart-detail.component.html | 9 +- .../list-project/list-project.component.ts | 2 +- .../project-config.component.html | 2 +- .../project-config.component.scss | 2 +- .../src/app/project/project.component.html | 5 +- .../src/app/project/project.component.scss | 3 + .../list-project-ro.component.ts | 2 +- .../list-repository-ro.component.ts | 2 +- src/portal/src/app/shared/shared.utils.ts | 2 +- src/portal/src/app/user/user.component.scss | 5 +- .../Harbor-Pages/Configuration.robot | 16 +- .../Harbor-Pages/Configuration_Elements.robot | 2 +- .../Harbor-Pages/HomePage_Elements.robot | 3 +- .../Project-Helmcharts_Elements.robot | 2 +- .../Project-Repository_Elements.robot | 4 +- tests/resources/Harbor-Pages/Project.robot | 10 +- .../Harbor-Pages/Replication_Elements.robot | 4 +- tests/resources/Harbor-Pages/Verify.robot | 18 +- .../Harbor-Pages/Vulnerability.robot | 10 +- 59 files changed, 3584 insertions(+), 2105 deletions(-) diff --git a/src/portal/lib/src/config/replication/replication-config.component.html b/src/portal/lib/src/config/replication/replication-config.component.html index c5276a58a..3859f78d3 100644 --- a/src/portal/lib/src/config/replication/replication-config.component.html +++ b/src/portal/lib/src/config/replication/replication-config.component.html @@ -1,14 +1,20 @@
-
- -
- - - - - {{'CONFIG.TOOLTIP.VERIFY_REMOTE_CERT' | translate }} - - -
-
-
+
+ +
+
+ + + + + +
+
+
+ \ No newline at end of file diff --git a/src/portal/lib/src/config/replication/replication-config.component.scss b/src/portal/lib/src/config/replication/replication-config.component.scss index e69de29bb..f68fb69a4 100644 --- a/src/portal/lib/src/config/replication/replication-config.component.scss +++ b/src/portal/lib/src/config/replication/replication-config.component.scss @@ -0,0 +1,3 @@ +.top-7{ + top:-7px; +} \ No newline at end of file diff --git a/src/portal/lib/src/config/system/system-settings.component.html b/src/portal/lib/src/config/system/system-settings.component.html index 7b433c7d8..f405f15de 100644 --- a/src/portal/lib/src/config/system/system-settings.component.html +++ b/src/portal/lib/src/config/system/system-settings.component.html @@ -4,12 +4,13 @@
-
- + {{'CONFIG.TOOLTIP.PRO_CREATION_RESTRICTION' | translate}} @@ -39,17 +40,23 @@
- - + +
\ No newline at end of file diff --git a/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.html b/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.html index 9f46f881e..35bcba3d8 100644 --- a/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.html +++ b/src/portal/lib/src/create-edit-endpoint/create-edit-endpoint.component.html @@ -12,35 +12,47 @@
- -
- -
- - + +
- - + +
- - - + + + + @@ -56,8 +68,11 @@
\ No newline at end of file diff --git a/src/portal/lib/src/create-edit-rule/create-edit-rule.component.html b/src/portal/lib/src/create-edit-rule/create-edit-rule.component.html index d5570919e..c8ba35892 100644 --- a/src/portal/lib/src/create-edit-rule/create-edit-rule.component.html +++ b/src/portal/lib/src/create-edit-rule/create-edit-rule.component.html @@ -2,8 +2,8 @@
- - - + + +
\ No newline at end of file diff --git a/src/portal/src/app/config/email/config-email.component.scss b/src/portal/src/app/config/email/config-email.component.scss index e69de29bb..f68fb69a4 100644 --- a/src/portal/src/app/config/email/config-email.component.scss +++ b/src/portal/src/app/config/email/config-email.component.scss @@ -0,0 +1,3 @@ +.top-7{ + top:-7px; +} \ No newline at end of file diff --git a/src/portal/src/app/core/core.module.ts b/src/portal/src/app/core/core.module.ts index 6260a03e5..e76a6cf66 100644 --- a/src/portal/src/app/core/core.module.ts +++ b/src/portal/src/app/core/core.module.ts @@ -25,7 +25,7 @@ import { MarkdownModule } from 'ngx-markdown'; BrowserModule, FormsModule, HttpModule, - ClarityModule.forRoot(), + ClarityModule, CookieModule.forRoot(), MarkdownModule.forRoot(), BrowserAnimationsModule diff --git a/src/portal/src/app/dev-center/dev-center.component.html b/src/portal/src/app/dev-center/dev-center.component.html index 9eef24511..a45a70da8 100644 --- a/src/portal/src/app/dev-center/dev-center.component.html +++ b/src/portal/src/app/dev-center/dev-center.component.html @@ -1,2 +1,2 @@ -
+
diff --git a/src/portal/src/app/dev-center/dev-center.component.scss b/src/portal/src/app/dev-center/dev-center.component.scss index c95a6e969..5e810a686 100644 --- a/src/portal/src/app/dev-center/dev-center.component.scss +++ b/src/portal/src/app/dev-center/dev-center.component.scss @@ -5,4 +5,5 @@ bottom: 0; left: 0; right: 0; + overflow:scroll; } \ No newline at end of file diff --git a/src/portal/src/app/dev-center/dev-center.module.ts b/src/portal/src/app/dev-center/dev-center.module.ts index 2551d22c5..95fc2a899 100644 --- a/src/portal/src/app/dev-center/dev-center.module.ts +++ b/src/portal/src/app/dev-center/dev-center.module.ts @@ -14,7 +14,7 @@ import { DevCenterComponent } from "./dev-center.component"; path: "**", component: DevCenterComponent, }]), - ClarityModule.forRoot(), + ClarityModule, ], declarations: [ DevCenterComponent, diff --git a/src/portal/src/app/log/audit-log.component.ts b/src/portal/src/app/log/audit-log.component.ts index 518e7e175..17e567cb0 100644 --- a/src/portal/src/app/log/audit-log.component.ts +++ b/src/portal/src/app/log/audit-log.component.ts @@ -21,7 +21,7 @@ import { SessionUser } from '../shared/session-user'; import { AuditLogService } from './audit-log.service'; import { MessageHandlerService } from '../shared/message-handler/message-handler.service'; -import { State } from '@clr/angular'; +import { State } from '../../../lib/src/service/interface'; const optionalSearch: {} = { 0: 'AUDIT_LOG.ADVANCED', 1: 'AUDIT_LOG.SIMPLE' }; diff --git a/src/portal/src/app/project/chart-detail/chart-detail.component.html b/src/portal/src/app/project/chart-detail/chart-detail.component.html index eff3e5b8f..b4ac950df 100644 --- a/src/portal/src/app/project/chart-detail/chart-detail.component.html +++ b/src/portal/src/app/project/chart-detail/chart-detail.component.html @@ -6,11 +6,6 @@ < {{ 'HELM_CHART.CHARTVERSIONS'| translate}} - + \ No newline at end of file diff --git a/src/portal/src/app/project/list-project/list-project.component.ts b/src/portal/src/app/project/list-project/list-project.component.ts index 0d10f614c..355915924 100644 --- a/src/portal/src/app/project/list-project/list-project.component.ts +++ b/src/portal/src/app/project/list-project/list-project.component.ts @@ -22,7 +22,7 @@ import { } from "@angular/core"; import { Router } from "@angular/router"; -import { Comparator, State } from "@clr/angular"; +import { Comparator, State } from "../../../../lib/src/service/interface"; import {TranslateService} from "@ngx-translate/core"; import { RoleInfo, ConfirmationTargets, ConfirmationState, ConfirmationButtons } from "../../shared/shared.const"; diff --git a/src/portal/src/app/project/project-config/project-config.component.html b/src/portal/src/app/project/project-config/project-config.component.html index 06c89ae59..d51542b48 100644 --- a/src/portal/src/app/project/project-config/project-config.component.html +++ b/src/portal/src/app/project/project-config/project-config.component.html @@ -1,5 +1,5 @@
-
+
\ No newline at end of file diff --git a/src/portal/src/app/project/project-config/project-config.component.scss b/src/portal/src/app/project/project-config/project-config.component.scss index e80c2a23d..16c22562e 100644 --- a/src/portal/src/app/project/project-config/project-config.component.scss +++ b/src/portal/src/app/project/project-config/project-config.component.scss @@ -1,3 +1,3 @@ .config-top { top: 8px; -} \ No newline at end of file +} diff --git a/src/portal/src/app/project/project.component.html b/src/portal/src/app/project/project.component.html index 2ff6c0b86..4dc144113 100644 --- a/src/portal/src/app/project/project.component.html +++ b/src/portal/src/app/project/project.component.html @@ -1,5 +1,5 @@
-
+

{{'PROJECT.PROJECTS' | translate}}

@@ -15,7 +15,8 @@
- + diff --git a/src/portal/src/app/project/project.component.scss b/src/portal/src/app/project/project.component.scss index 841950f39..e8d3676d5 100644 --- a/src/portal/src/app/project/project.component.scss +++ b/src/portal/src/app/project/project.component.scss @@ -29,4 +29,7 @@ .projectPos { padding-left: 15px; padding-right: 15px; +} +.position-r{ + position: relative; } \ No newline at end of file diff --git a/src/portal/src/app/shared/list-project-ro/list-project-ro.component.ts b/src/portal/src/app/shared/list-project-ro/list-project-ro.component.ts index dd01e9b0f..ddf23bbe6 100644 --- a/src/portal/src/app/shared/list-project-ro/list-project-ro.component.ts +++ b/src/portal/src/app/shared/list-project-ro/list-project-ro.component.ts @@ -13,7 +13,7 @@ // limitations under the License. import { Component, EventEmitter, Output, Input, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core'; import { Router } from '@angular/router'; -import { State } from '@clr/angular'; +import { State } from '../../../../lib/src/service/interface'; import { SearchTriggerService } from '../../base/global-search/search-trigger.service'; import { Project } from '../../project/project'; diff --git a/src/portal/src/app/shared/list-repository-ro/list-repository-ro.component.ts b/src/portal/src/app/shared/list-repository-ro/list-repository-ro.component.ts index 328aefd05..4e1b8f8f0 100644 --- a/src/portal/src/app/shared/list-repository-ro/list-repository-ro.component.ts +++ b/src/portal/src/app/shared/list-repository-ro/list-repository-ro.component.ts @@ -15,7 +15,7 @@ import {filter} from 'rxjs/operators'; // limitations under the License. import { Component, Input, Output, OnDestroy, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, OnInit } from '@angular/core'; import { Router, NavigationEnd } from '@angular/router'; -import { State } from '@clr/angular'; +import { State } from '../../../../lib/src/service/interface'; import { Repository } from '@harbor/ui'; diff --git a/src/portal/src/app/shared/shared.utils.ts b/src/portal/src/app/shared/shared.utils.ts index 8c087dbfb..320b7d86b 100644 --- a/src/portal/src/app/shared/shared.utils.ts +++ b/src/portal/src/app/shared/shared.utils.ts @@ -13,7 +13,7 @@ // limitations under the License. import { NgForm } from '@angular/forms'; import {RequestOptions, Headers, Response} from "@angular/http"; -import { Comparator, State } from '@clr/angular'; +import { Comparator, State } from '../../../lib/src/service/interface'; import {RequestQueryParams} from "@harbor/ui"; import { MessageService } from '../global-message/message.service'; diff --git a/src/portal/src/app/user/user.component.scss b/src/portal/src/app/user/user.component.scss index 5cb18dacb..cfed7b09a 100644 --- a/src/portal/src/app/user/user.component.scss +++ b/src/portal/src/app/user/user.component.scss @@ -37,5 +37,8 @@ visibility: hidden !important; } .rightPos { - position: absolute; right: 20px; margin-top: -7px; height:32px; z-index: 100; + position: absolute; + right: 20px; + height:32px; + z-index: 100; } \ No newline at end of file diff --git a/tests/resources/Harbor-Pages/Configuration.robot b/tests/resources/Harbor-Pages/Configuration.robot index 677f8869a..114c23edf 100644 --- a/tests/resources/Harbor-Pages/Configuration.robot +++ b/tests/resources/Harbor-Pages/Configuration.robot @@ -191,11 +191,11 @@ Config Email Input Text xpath=//*[@id="emailPassword"] example Input Text xpath=//*[@id="emailFrom"] example Sleep 1 - Mouse Down xpath=//*[@id="clr-checkbox-emailSSL"] - Mouse Up xpath=//*[@id="clr-checkbox-emailSSL"] + Mouse Down xpath=//*[@id="emailSSL"] + Mouse Up xpath=//*[@id="emailSSL"] Sleep 1 - Mouse Down xpath=//*[@id="clr-checkbox-emailInsecure"] - Mouse Up xpath=//*[@id="clr-checkbox-emailInsecure"] + Mouse Down xpath=//*[@id="emailInsecure"] + Mouse Up xpath=//*[@id="emailInsecure"] Sleep 1 Click Element xpath=${config_email_save_button_xpath} Sleep 6 @@ -205,8 +205,8 @@ Verify Email Textfield Value Should Be xpath=//*[@id="emailPort"] 25 Textfield Value Should Be xpath=//*[@id="emailUsername"] example@vmware.com Textfield Value Should Be xpath=//*[@id="emailFrom"] example - Checkbox Should Be Selected xpath=//*[@id="clr-checkbox-emailSSL"] - Checkbox Should Not Be Selected xpath=//*[@id="clr-checkbox-emailInsecure"] + Checkbox Should Be Selected xpath=//*[@id="emailSSL"] + Checkbox Should Not Be Selected xpath=//*[@id="emailInsecure"] Set Scan All To None click element //vulnerability-config//select @@ -257,7 +257,7 @@ Create New Labels Update A Label [Arguments] ${labelname} - Click Element xpath=//clr-dg-row[contains(.,'${labelname}')]//clr-checkbox + Click Element xpath=//clr-dg-row[contains(.,'${labelname}')]//clr-checkbox-wrapper Sleep 1 Click Element xpath=//button[contains(.,'Edit')] Sleep 1 @@ -269,7 +269,7 @@ Update A Label Delete A Label [Arguments] ${labelname} - Click Element xpath=//clr-dg-row[contains(.,'${labelname}')]//clr-checkbox + Click Element xpath=//clr-dg-row[contains(.,'${labelname}')]//clr-checkbox-wrapper Sleep 1 Click ELement xpath=//button[contains(.,'Delete')] Sleep 3 diff --git a/tests/resources/Harbor-Pages/Configuration_Elements.robot b/tests/resources/Harbor-Pages/Configuration_Elements.robot index bfdf83725..ce557e292 100644 --- a/tests/resources/Harbor-Pages/Configuration_Elements.robot +++ b/tests/resources/Harbor-Pages/Configuration_Elements.robot @@ -17,7 +17,7 @@ Documentation This resource provides any keywords related to the Harbor private *** Variables *** ${project_create_xpath} //clr-dg-action-bar//button[contains(.,'New')] -${self_reg_xpath} //input[@id="clr-checkbox-selfReg"] +${self_reg_xpath} //input[@id="selfReg"] ${test_ldap_xpath} //*[@id="authentication"]/config-auth/div/button[3] ${config_save_button_xpath} //config//div/button[contains(.,'SAVE')] ${config_email_save_button_xpath} //*[@id="config_email_save"] diff --git a/tests/resources/Harbor-Pages/HomePage_Elements.robot b/tests/resources/Harbor-Pages/HomePage_Elements.robot index ca7d16947..6f4e0f19a 100644 --- a/tests/resources/Harbor-Pages/HomePage_Elements.robot +++ b/tests/resources/Harbor-Pages/HomePage_Elements.robot @@ -24,5 +24,6 @@ ${realname_xpath} //*[@id="realname"] ${newPassword_xpath} //*[@id="newPassword"] ${confirmPassword_xpath} //*[@id="confirmPassword"] ${comment_xpath} //*[@id="comment"] -${signup_xpath} /html/body/harbor-app/harbor-shell/clr-main-container/div/div/sign-in/sign-up/clr-modal/div/div[1]/div/div[1]/div/div[3]/button[2] +${signup_xpath} //clr-modal/div/div[1]/div/div/div[3]/button[2] + diff --git a/tests/resources/Harbor-Pages/Project-Helmcharts_Elements.robot b/tests/resources/Harbor-Pages/Project-Helmcharts_Elements.robot index 5e72aa4e7..dd6c7f9b0 100644 --- a/tests/resources/Harbor-Pages/Project-Helmcharts_Elements.robot +++ b/tests/resources/Harbor-Pages/Project-Helmcharts_Elements.robot @@ -29,7 +29,7 @@ ${detail_value} //*[@id="value-link"] ${value_content} //*[@id="value-content"]/hbr-chart-detail-value ${version_bread_crumbs} //project-chart-detail//a[contains(.,"Versions")] -${version_checkbox} //list-chart-version//clr-dg-cell[1]/clr-checkbox +${version_checkbox} //clr-dg-row//clr-checkbox-wrapper/label ${version_delete} //clr-dg-action-bar/button[contains(.,"DELETE")] ${version_confirm_delete} //clr-modal//button[contains(.,"DELETE")] diff --git a/tests/resources/Harbor-Pages/Project-Repository_Elements.robot b/tests/resources/Harbor-Pages/Project-Repository_Elements.robot index 4b5e7379c..52ab139d9 100644 --- a/tests/resources/Harbor-Pages/Project-Repository_Elements.robot +++ b/tests/resources/Harbor-Pages/Project-Repository_Elements.robot @@ -16,8 +16,8 @@ Documentation This resource provides any keywords related to the Harbor private registry appliance *** Variables *** -${first_repo_xpath} //clr-dg-row//clr-dg-cell[2]//a +${first_repo_xpath} //clr-dg-row//clr-dg-cell[1]//a ${first_cve_xpath} //clr-dg-row[1]//clr-dg-cell//a -${view_log_xpath} //clr-dg-row[1]//clr-dg-cell[5]//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 diff --git a/tests/resources/Harbor-Pages/Project.robot b/tests/resources/Harbor-Pages/Project.robot index 84338fae7..a391489e5 100644 --- a/tests/resources/Harbor-Pages/Project.robot +++ b/tests/resources/Harbor-Pages/Project.robot @@ -86,7 +86,7 @@ Make Project Private Click Element xpath=//project-detail//a[contains(.,'Configuration')] Sleep 1 Checkbox Should Be Selected xpath=//input[@name='public'] - Click Element //clr-checkbox[@name='public']//label + Click Element //div[@id="clr-wrapper-public"]//label Wait Until Element Is Enabled //button[contains(.,'SAVE')] Click Element //button[contains(.,'SAVE')] Wait Until Page Contains Configuration has been successfully saved @@ -97,14 +97,14 @@ Make Project Public Sleep 1 Click Element xpath=//project-detail//a[contains(.,'Configuration')] Checkbox Should Not Be Selected xpath=//input[@name='public'] - Click Element //clr-checkbox[@name='public']//label + Click Element //div[@id="clr-wrapper-public"]//label Wait Until Element Is Enabled //button[contains(.,'SAVE')] Click Element //button[contains(.,'SAVE')] Wait Until Page Contains Configuration has been successfully saved Delete Repo [Arguments] ${projectname} - Click Element xpath=//clr-dg-row[contains(.,"${projectname}")]//clr-checkbox//label + Click Element xpath=//clr-dg-row[contains(.,"${projectname}")]//clr-checkbox-wrapper//label Wait Until Element Is Enabled //button[contains(.,"Delete")] Click Element xpath=//button[contains(.,"Delete")] Wait Until Element Is Visible //clr-modal//button[2] @@ -121,7 +121,7 @@ Delete Repo on CardView Delete Project [Arguments] ${projectname} Sleep 1 - Click Element xpath=//clr-dg-row[contains(.,"${projectname}")]//clr-checkbox//label + Click Element xpath=//clr-dg-row[contains(.,"${projectname}")]//clr-checkbox-wrapper//label Sleep 1 Click Element xpath=//button[contains(.,"Delete")] Sleep 2 @@ -221,7 +221,7 @@ Edit Repo Info Input Text xpath=//*[@id="info"]/form/div[2]/textarea test_description_info Click Element xpath=//*[@id="info"]/form/div[3]/button[2] Sleep 1 - Click Element xpath=//*[@id="info"]/form/confirmation-dialog/clr-modal/div/div[1]/div/div[1]/div/div[3]/button[2] + Click Element xpath=//*[@id="info"]/form/confirmation-dialog/clr-modal/div/div[1]/div[1]/div/div[3]/button[2] Sleep 1 Page Should Contain Element //*[@id="info"]/form/div[2] # Confirm input diff --git a/tests/resources/Harbor-Pages/Replication_Elements.robot b/tests/resources/Harbor-Pages/Replication_Elements.robot index 1c593c62b..d726c4e58 100644 --- a/tests/resources/Harbor-Pages/Replication_Elements.robot +++ b/tests/resources/Harbor-Pages/Replication_Elements.robot @@ -27,7 +27,7 @@ ${destination_username_xpath} //*[@id='destination_username'] ${destination_password_xpath} //*[@id='destination_password'] ${replication_save_xpath} //button[contains(.,'OK')] ${replication_xpath} //clr-vertical-nav-group-children/a[contains(.,'Replication')] -${destination_insecure_xpath} //clr-checkbox[@id="destination_insecure"]//label +${destination_insecure_xpath} //clr-checkbox-wrapper[@id="destination_insecure_checkbox"]//label ${new_replication-rule_button} //button[contains(.,'New Replication Rule')] ${link_to_registries} //clr-modal//span[contains(.,'Endpoint')] @@ -42,7 +42,7 @@ ${rule_trigger_select} //select[@id="ruleTrigger"] ${schedule_type_select} //select[@name="scheduleType"] ${schedule_day_select} //select[@name="scheduleDay"] ${shcedule_time} //input[@type="time"] -${destination_insecure_checkbox} //hbr-create-edit-endpoint/clr-modal//clr-checkbox/input[@id="clr-checkbox-destination_insecure"] +${destination_insecure_checkbox} //hbr-create-edit-endpoint/clr-modal//clr-checkbox-wrapper/input[@id="clr-checkbox-destination_insecure"] ${ping_test_button} //button[contains(.,'Test')] ${nav_to_registries} //clr-vertical-nav//span[contains(.,'Registries')] ${nav_to_replications} //clr-vertical-nav//span[contains(.,'Replications')] diff --git a/tests/resources/Harbor-Pages/Verify.robot b/tests/resources/Harbor-Pages/Verify.robot index c2febc182..f82fe6d1b 100644 --- a/tests/resources/Harbor-Pages/Verify.robot +++ b/tests/resources/Harbor-Pages/Verify.robot @@ -131,13 +131,13 @@ Verify Project Setting \ Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} \ Go Into Project ${project} \ Goto Project Config - \ Run Keyword If ${public} == "public" Checkbox Should Be Checked //clr-checkbox[@name='public']//label - \ Run Keyword If ${contenttrust} == "true" Checkbox Should Be Checked //clr-checkbox[@name='content-trust']//label - \ Run Keyword If ${contenttrust} == "false" Checkbox Should Not Be Checked //clr-checkbox[@name='content-trust']//label - \ Run Keyword If ${preventrunning} == "true" Checkbox Should Be Checked //clr-checkbox[@name='prevent-vulenrability-image']//label - \ Run Keyword If ${preventrunning} == "false" Checkbox Should Not Be Checked //clr-checkbox[@name='prevent-vulenrability-image']//label - \ Run Keyword If ${scanonpush} == "true" Checkbox Should Be Checked //clr-checkbox[@name='scan-image-on-push']//label - \ Run Keyword If ${scanonpush} == "true" Checkbox Should Not Be Checked //clr-checkbox[@name='scan-image-on-push']//label + \ Run Keyword If ${public} == "public" Checkbox Should Be Checked //clr-checkbox-wrapper[@name='public']//label + \ Run Keyword If ${contenttrust} == "true" Checkbox Should Be Checked //clr-checkbox-wrapper[@name='content-trust']//label + \ Run Keyword If ${contenttrust} == "false" Checkbox Should Not Be Checked //clr-checkbox-wrapper[@name='content-trust']//label + \ Run Keyword If ${preventrunning} == "true" Checkbox Should Be Checked //div[@id='prevent-vulenrability-image']//clr-checkbox-wrapper//label + \ Run Keyword If ${preventrunning} == "false" Checkbox Should Not Be Checked //div[@id='prevent-vulenrability-image']//clr-checkbox-wrapper//label + \ Run Keyword If ${scanonpush} == "true" Checkbox Should Be Checked //clr-checkbox-wrapper[@id='scan-image-on-push-wrapper']//label + \ Run Keyword If ${scanonpush} == "true" Checkbox Should Not Be Checked //clr-checkbox-wrapper[@id='scan-image-on-push-wrapper']//label \ Close Browser Verify System Setting @@ -155,8 +155,8 @@ Verify System Setting Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Switch To Configure Page Should Contain @{authtype}[0] - Run Keyword If @{selfreg}[0] == "True" Checkbox Should Be Checked //clr-checkbox[@id='selfReg']//label - Run Keyword If @{selfreg}[0] == "False" Checkbox Should Not Be Checked //clr-checkbox[@id='selfReg']//label + Run Keyword If @{selfreg}[0] == "True" Checkbox Should Be Checked //clr-checkbox-wrapper[@id='selfReg']//label + Run Keyword If @{selfreg}[0] == "False" Checkbox Should Not Be Checked //clr-checkbox-wrapper[@id='selfReg']//label Page Should Contain @{creation}[0] Switch To Email Textfield Value Should Be xpath=//*[@id="mailServer"] @{emailserver}[0] diff --git a/tests/resources/Harbor-Pages/Vulnerability.robot b/tests/resources/Harbor-Pages/Vulnerability.robot index 96eeb0290..85392625f 100644 --- a/tests/resources/Harbor-Pages/Vulnerability.robot +++ b/tests/resources/Harbor-Pages/Vulnerability.robot @@ -24,8 +24,8 @@ Set Vulnerabilty Serverity [Arguments] ${level} Goto Project Config #enable first - Click Element //project-detail//clr-checkbox[@name="prevent-vulenrability-image"]//label - Checkbox Should Be Selected //project-detail//clr-checkbox//input[@name="prevent-vulenrability-image"] + Click Element //project-detail//div[@id="prevent-vulenrability-image"]//label + Checkbox Should Be Selected //project-detail//clr-checkbox-wrapper//input[@name="prevent-vulenrability-image-input"] Click Element //project-detail//select #wait for dropdown popup Sleep 1 @@ -56,9 +56,9 @@ Summary Chart Should Display Page Should Contain Element //clr-dg-row[contains(.,'${tagname}')]//hbr-vulnerability-bar//hbr-vulnerability-summary-chart Enable Scan On Push - Checkbox Should Not Be Selected //clr-checkbox[@name="scan-image-on-push"]//input - Click Element //clr-checkbox[@name="scan-image-on-push"]//label - Checkbox Should Be Selected //clr-checkbox[@name="scan-image-on-push"]//input + Checkbox Should Not Be Selected //clr-checkbox-wrapper[@id="scan-image-on-push-wrapper"]//input + Click Element //clr-checkbox-wrapper[@id="scan-image-on-push-wrapper"]//label + Checkbox Should Be Selected //clr-checkbox-wrapper[@id="scan-image-on-push-wrapper"]//input Click Element //hbr-project-policy-config//button[contains(.,'SAVE')] Sleep 10