mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
parent
1c21875607
commit
dd753ba890
@ -1,4 +1,4 @@
|
||||
<div class="mdl-card mdl-shadow--2dp">
|
||||
<div *ngIf="processDefinitions.length > 0 || errorMessageId" class="mdl-card mdl-shadow--2dp">
|
||||
<div class="mdl-card__supporting-text">
|
||||
<div class="mdl-card mdl-shadow--2dp error-message" *ngIf="errorMessageId">
|
||||
<div class="mdl-card__supporting-text">{{errorMessageId|translate}}</div>
|
||||
@ -25,3 +25,10 @@
|
||||
<button type="button" [disabled]="!validateForm()" (click)="startProcess()" class="mdl-button" data-automation-id="btn-start">{{'START_PROCESS.DIALOG.ACTION.START'|translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="processDefinitions.length === 0 && !errorMessageId" class="mdl-card mdl-shadow--2dp">
|
||||
<div class="mdl-card__supporting-text">
|
||||
<div class="mdl-textfield mdl-js-textfield alf-mdl-selectfield">
|
||||
<span id="no-process-message">{{'START_PROCESS.NO_PROCESS_DEFINITIONS' | translate}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -127,6 +127,19 @@ describe('ActivitiStartProcessInstance', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('should show no process available message when no process definition is loaded', async(() => {
|
||||
getDefinitionsSpy = getDefinitionsSpy.and.returnValue(Observable.of([]));
|
||||
let change = new SimpleChange(null, '123');
|
||||
component.ngOnChanges({ 'appId': change });
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
let noprocessElement: DebugElement = debugElement.query(By.css('#no-process-message'));
|
||||
expect(noprocessElement).not.toBeNull('Expected no available process message to be present');
|
||||
expect(noprocessElement.nativeElement.innerText.trim()).toBe('START_PROCESS.NO_PROCESS_DEFINITIONS');
|
||||
});
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
describe('input changes', () => {
|
||||
|
@ -83,6 +83,7 @@
|
||||
},
|
||||
"START_PROCESS": {
|
||||
"BUTTON": "Start Process",
|
||||
"NO_PROCESS_DEFINITIONS": "You cannot start a process as there are no process definitions available",
|
||||
"DIALOG": {
|
||||
"TITLE": "Start Process",
|
||||
"LABEL": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user