mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
fix test
This commit is contained in:
parent
6ac0346039
commit
fc8b9e5ed1
@ -28,7 +28,7 @@
|
||||
[processDefinitionId]="selectedProcessDef.id"
|
||||
(outcomeClick)="onOutcomeClick($event)"
|
||||
[showRefreshButton]="false">
|
||||
<button form-custom-button mat-button (click)="cancelStartProcess()" id="cancle_process" class=""> {{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.CANCEL'| translate}} </button>
|
||||
<button form-custom-button mat-button (click)="cancelStartProcess()" id="cancel_process" class=""> {{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.CANCEL'| translate}} </button>
|
||||
</adf-start-form>
|
||||
</mat-card-content>
|
||||
<mat-card-content *ngIf="hasErrorMessage()">
|
||||
@ -37,7 +37,7 @@
|
||||
</mat-card-subtitle>
|
||||
</mat-card-content>
|
||||
<mat-card-actions *ngIf="!hasStartForm()">
|
||||
<button mat-button *ngIf="!hasStartForm()" (click)="cancelStartProcess()" id="cancle_process" class=""> {{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.CANCEL'| translate}} </button>
|
||||
<button mat-button *ngIf="!hasStartForm()" (click)="cancelStartProcess()" id="cancel_process" class=""> {{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.CANCEL'| translate}} </button>
|
||||
<button color="primary" mat-button *ngIf="!hasStartForm()" [disabled]="!validateForm()" (click)="startProcess()" data-automation-id="btn-start" id="button-start" class="btn-start"> {{'ADF_PROCESS_LIST.START_PROCESS.FORM.ACTION.START' | translate}} </button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
@ -154,7 +154,7 @@ describe('StartFormComponent', () => {
|
||||
|
||||
it('should emit cancel event on cancel Button', async(() => {
|
||||
fixture.detectChanges();
|
||||
let cancelButton = fixture.nativeElement.querySelector('#cancle_process');
|
||||
let cancelButton = fixture.nativeElement.querySelector('#cancel_process');
|
||||
let cancelSpy: jasmine.Spy = spyOn(component.cancel, 'emit');
|
||||
cancelButton.click();
|
||||
fixture.detectChanges();
|
||||
|
@ -74,7 +74,7 @@
|
||||
<mat-grid-list cols="1" rowHeight="60px">
|
||||
<mat-grid-tile>
|
||||
<div class="adf-new-task-footer">
|
||||
<button mat-button (click)="onCancel()" id="button-cancle">
|
||||
<button mat-button (click)="onCancel()" id="button-cancel">
|
||||
{{'ADF_TASK_LIST.START_TASK.FORM.ACTION.CANCEL'|translate}}
|
||||
</button>
|
||||
<button color="primary" mat-button [disabled]="!startTaskmodel.name || dateError" (click)="start()" id="button-start">
|
||||
|
@ -302,10 +302,10 @@ describe('StartTaskComponent', () => {
|
||||
|
||||
it('should cancel start task on cancel button click', () => {
|
||||
let emitSpy = spyOn(component.cancel, 'emit');
|
||||
let cancleTaskButton = fixture.nativeElement.querySelector('#button-cancle');
|
||||
let cancelTaskButton = fixture.nativeElement.querySelector('#button-cancel');
|
||||
component.startTaskmodel.name = '';
|
||||
fixture.detectChanges();
|
||||
cancleTaskButton.click();
|
||||
cancelTaskButton.click();
|
||||
expect(emitSpy).not.toBeNull();
|
||||
expect(emitSpy).toHaveBeenCalled();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user