Merge pull request #6190 from zhoumeina/fix_nightly

fix nightly test
This commit is contained in:
Mia ZHOU 2018-11-01 15:16:26 +08:00 committed by GitHub
commit 4894d1f46f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 14 deletions

View File

@ -44,7 +44,7 @@
<clr-icon shape="info-circle" class="info-tips-icon" size="24"></clr-icon> <clr-icon shape="info-circle" class="info-tips-icon" size="24"></clr-icon>
<span class="tooltip-content">{{'CONFIG.TOOLTIP.SCANNING_POLICY' | translate}}</span> <span class="tooltip-content">{{'CONFIG.TOOLTIP.SCANNING_POLICY' | translate}}</span>
</a> </a>
<button class="btn btn-primary btn-sm" (click)="save()">{{'BUTTON.SAVE' | translate}}</button> <button id="config_vulnerbility_save" class="btn btn-primary btn-sm" (click)="save()">{{'BUTTON.SAVE' | translate}}</button>
<button class="btn btn-primary btn-sm" (click)="cancel()" >{{'BUTTON.CANCEL' | translate}}</button> <button class="btn btn-primary btn-sm" (click)="cancel()" >{{'BUTTON.CANCEL' | translate}}</button>
</div> </div>
<div class="btn-scan-right btn-scan"> <div class="btn-scan-right btn-scan">

View File

@ -216,7 +216,7 @@
</section> </section>
</form> </form>
<div> <div>
<button type="button" class="btn btn-primary" (click)="save()" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.SAVE' | translate}}</button> <button type="button" id="config_auth_save" class="btn btn-primary" (click)="save()" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.SAVE' | translate}}</button>
<button type="button" class="btn btn-outline" (click)="cancel()" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.CANCEL' | translate}}</button> <button type="button" class="btn btn-outline" (click)="cancel()" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.CANCEL' | translate}}</button>
<button type="button" class="btn btn-outline" (click)="testLDAPServer()" *ngIf="showLdapServerBtn" [disabled]="!isLDAPConfigValid()">{{'BUTTON.TEST_LDAP' | translate}}</button> <button type="button" class="btn btn-outline" (click)="testLDAPServer()" *ngIf="showLdapServerBtn" [disabled]="!isLDAPConfigValid()">{{'BUTTON.TEST_LDAP' | translate}}</button>
<span id="forTestingLDAP" class="spinner spinner-inline" [hidden]="hideLDAPTestingSpinner"></span> <span id="forTestingLDAP" class="spinner spinner-inline" [hidden]="hideLDAPTestingSpinner"></span>

View File

@ -50,7 +50,7 @@
</div> </div>
</div> </div>
<div> <div>
<button type="button" class="btn btn-primary" (click)="save()" [hidden]="hideBtn" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.SAVE' | translate}}</button> <button type="button" id="config_system_save" class="btn btn-primary" (click)="save()" [hidden]="hideBtn" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.SAVE' | translate}}</button>
<button type="button" class="btn btn-outline" (click)="cancel()" [hidden]="hideBtn" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.CANCEL' | translate}}</button> <button type="button" class="btn btn-outline" (click)="cancel()" [hidden]="hideBtn" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.CANCEL' | translate}}</button>
</div> </div>

View File

@ -77,7 +77,7 @@
</section> </section>
</form> </form>
<div> <div>
<button type="button" class="btn btn-primary" (click)="save()" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.SAVE' | translate}}</button> <button type="button" id="config_email_save" class="btn btn-primary" (click)="save()" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.SAVE' | translate}}</button>
<button type="button" class="btn btn-outline" (click)="cancel()" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.CANCEL' | translate}}</button> <button type="button" class="btn btn-outline" (click)="cancel()" [disabled]="!isValid() || !hasChanges()">{{'BUTTON.CANCEL' | translate}}</button>
<button type="button" class="btn btn-outline" (click)="testMailServer()" [disabled]="!isMailConfigValid()">{{'BUTTON.TEST_MAIL' | translate}}</button> <button type="button" class="btn btn-outline" (click)="testMailServer()" [disabled]="!isMailConfigValid()">{{'BUTTON.TEST_MAIL' | translate}}</button>
<span id="forTestingMail" class="spinner spinner-inline" [hidden]="hideMailTestingSpinner"></span> <span id="forTestingMail" class="spinner spinner-inline" [hidden]="hideMailTestingSpinner"></span>

View File

@ -38,7 +38,7 @@ Init LDAP
Sleep 1 Sleep 1
Capture Page Screenshot Capture Page Screenshot
Disable Ldap Verify Cert Checkbox Disable Ldap Verify Cert Checkbox
Click Element xpath=${config_save_button_xpath} Click Element xpath=${config_auth_save_button_xpath}
Sleep 2 Sleep 2
Click Element xpath=/html/body/harbor-app/harbor-shell/clr-main-container/div/div/config/div/div/div/button[3] Click Element xpath=/html/body/harbor-app/harbor-shell/clr-main-container/div/div/config/div/div/div/button[3]
Sleep 1 Sleep 1
@ -99,7 +99,7 @@ Set Pro Create Admin Only
Click Element xpath=//select[@id="proCreation"] Click Element xpath=//select[@id="proCreation"]
Click Element xpath=//select[@id="proCreation"]//option[@value="adminonly"] Click Element xpath=//select[@id="proCreation"]//option[@value="adminonly"]
Sleep 1 Sleep 1
Click Element xpath=${config_save_button_xpath} Click Element xpath=${config_system_button_xpath}
Capture Page Screenshot AdminCreateOnly.png Capture Page Screenshot AdminCreateOnly.png
Set Pro Create Every One Set Pro Create Every One
@ -111,7 +111,7 @@ Set Pro Create Every One
Click Element xpath=//select[@id="proCreation"] Click Element xpath=//select[@id="proCreation"]
Click Element xpath=//select[@id="proCreation"]//option[@value="everyone"] Click Element xpath=//select[@id="proCreation"]//option[@value="everyone"]
Sleep 1 Sleep 1
Click Element xpath=${config_save_button_xpath} Click Element xpath=${config_system_save_button_xpath}
Sleep 2 Sleep 2
Capture Page Screenshot EveryoneCreate.png Capture Page Screenshot EveryoneCreate.png
@ -121,7 +121,7 @@ Disable Self Reg
Mouse Up xpath=${self_reg_xpath} Mouse Up xpath=${self_reg_xpath}
Sleep 1 Sleep 1
Self Reg Should Be Disabled Self Reg Should Be Disabled
Click Element xpath=${config_save_button_xpath} Click Element xpath=${config_auth_save_button_xpath}
Capture Page Screenshot DisableSelfReg.png Capture Page Screenshot DisableSelfReg.png
Sleep 1 Sleep 1
@ -130,7 +130,7 @@ Enable Self Reg
Mouse Up xpath=${self_reg_xpath} Mouse Up xpath=${self_reg_xpath}
Sleep 1 Sleep 1
Self Reg Should Be Enabled Self Reg Should Be Enabled
Click Element xpath=${config_save_button_xpath} Click Element xpath=${config_auth_save_button_xpath}
Capture Page Screenshot EnableSelfReg.png Capture Page Screenshot EnableSelfReg.png
Sleep 1 Sleep 1
@ -154,7 +154,7 @@ Switch To System Settings
Modify Token Expiration Modify Token Expiration
[Arguments] ${minutes} [Arguments] ${minutes}
Input Text xpath=//*[@id="tokenExpiration"] ${minutes} Input Text xpath=//*[@id="tokenExpiration"] ${minutes}
Click Button xpath=${config_save_button_xpath} Click Button xpath=${config_system_save_button_xpath}
Sleep 1 Sleep 1
Token Must Be Match Token Must Be Match
@ -197,7 +197,7 @@ Config Email
Mouse Down xpath=//*[@id="clr-checkbox-emailInsecure"] Mouse Down xpath=//*[@id="clr-checkbox-emailInsecure"]
Mouse Up xpath=//*[@id="clr-checkbox-emailInsecure"] Mouse Up xpath=//*[@id="clr-checkbox-emailInsecure"]
Sleep 1 Sleep 1
Click Element xpath=${config_save_button_xpath} Click Element xpath=${config_email_save_button_xpath}
Sleep 6 Sleep 6
Verify Email Verify Email
@ -212,13 +212,13 @@ Set Scan All To None
click element //vulnerability-config//select click element //vulnerability-config//select
click element //vulnerability-config//select/option[@value='none'] click element //vulnerability-config//select/option[@value='none']
sleep 1 sleep 1
click element ${config_save_button_xpath} click element ${vulnerbility_save_button_xpath}
Set Scan All To Daily Set Scan All To Daily
click element //vulnerability-config//select click element //vulnerability-config//select
click element //vulnerability-config//select/option[@value='daily'] click element //vulnerability-config//select/option[@value='daily']
sleep 1 sleep 1
click element ${config_save_button_xpath} click element ${vulnerbility_save_button_xpath}
Click Scan Now Click Scan Now
click element //vulnerability-config//button[contains(.,'SCAN')] click element //vulnerability-config//button[contains(.,'SCAN')]

View File

@ -20,6 +20,10 @@ ${project_create_xpath} //clr-dg-action-bar//button[contains(.,'New')]
${self_reg_xpath} //input[@id="clr-checkbox-selfReg"] ${self_reg_xpath} //input[@id="clr-checkbox-selfReg"]
${test_ldap_xpath} /html/body/harbor-app/harbor-shell/clr-main-container/div/div/config/div/div/div/button[3] ${test_ldap_xpath} /html/body/harbor-app/harbor-shell/clr-main-container/div/div/config/div/div/div/button[3]
${config_save_button_xpath} //config//div/button[contains(.,'SAVE')] ${config_save_button_xpath} //config//div/button[contains(.,'SAVE')]
${config_email_save_button_xpath} //*[@id="config_email_save"]
${config_auth_save_button_xpath} //*[@id="config_auth_save"]
${config_system_save_button_xpath} //*[@id="config_system_save"]
${vulnerbility_save_button_xpath} //*[@id="config_vulnerbility_save"]
${configuration_xpath} //clr-vertical-nav-group-children/a[contains(.,'Configuration')] ${configuration_xpath} //clr-vertical-nav-group-children/a[contains(.,'Configuration')]
${system_config_xpath} //*[@id="config-system"] ${system_config_xpath} //*[@id="config-system"]
${garbage_collection_xpath} //*[@id="config-gc"] ${garbage_collection_xpath} //*[@id="config-gc"]

View File

@ -10,7 +10,7 @@ Disable Scan Schedule
Click Element //vulnerability-config//button[@id="editSchedule"] Click Element //vulnerability-config//button[@id="editSchedule"]
Click Element //vulnerability-config//select[@id="scanAllPolicy"] Click Element //vulnerability-config//select[@id="scanAllPolicy"]
Click Element //vulnerability-config//select[@id="scanAllPolicy"]//option[contains(.,'None')] Click Element //vulnerability-config//select[@id="scanAllPolicy"]//option[contains(.,'None')]
Click Element //button[contains(.,'SAVE')] Click Element //button[@id="config_vulnerbility_save"]
Go To Vulnerability Config Go To Vulnerability Config
Click Element //config//button[contains(.,'Vulnerability')] Click Element //config//button[contains(.,'Vulnerability')]