Add placeholder text in process type select control

Refs #730
This commit is contained in:
Will Abson
2016-11-04 17:12:51 +00:00
parent 97fb6cb77c
commit 56ad656c91
3 changed files with 4 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
<div class="mdl-dialog__content">
<div class="mdl-textfield mdl-js-textfield alf-mdl-selectfield">
<select name="processDefinition" [(ngModel)]="processDefinitionId" id="processDefinition">
<option value="" selected="selected">{{'START_PROCESS.DIALOG.TYPE_PLACEHOLDER'|translate}}</option>
<option *ngFor="let processDef of processDefinitions" [value]="processDef.id">
{{processDef.name}}
</option>

View File

@@ -80,13 +80,13 @@ describe('ActivitiStartProcessButton', () => {
it('should display the correct number of processes in the select list', () => {
fixture.detectChanges();
de = fixture.debugElement.query(By.css('select'));
expect(de.children.length).toBe(2);
expect(de.children.length).toBe(3);
});
it('should display the correct process def details', (done) => {
fixture.detectChanges();
fixture.whenStable().then(() => {
de = fixture.debugElement.query(By.css('select option'));
de = fixture.debugElement.queryAll(By.css('select option'))[1];
let optionEl: HTMLOptionElement = de.nativeElement;
expect(optionEl.value).toBe('my:process1');
expect(optionEl.textContent.trim()).toBe('My Process 1');

View File

@@ -45,6 +45,7 @@
"TYPE": "Type",
"NAME": "Name"
},
"TYPE_PLACEHOLDER": "Choose one...",
"ACTION": {
"START": "Start",
"CANCEL": "Cancel"