test(input): add select to the form input test

This commit is contained in:
Brandy Carney
2016-05-21 13:27:31 -04:00
parent 0073e5bc27
commit 7c0fe93061
2 changed files with 20 additions and 4 deletions

View File

@@ -1,11 +1,11 @@
import {App} from '../../../../../src';
import {App, Page} from '../../../../../src';
import {FormBuilder, Validators, Control} from '@angular/common';
@App({
@Page({
templateUrl: 'main.html'
})
class E2EApp {
class E2EPage {
loginForm: any;
login = {
@@ -29,7 +29,8 @@ class E2EApp {
])],
username: [""],
password: ["", Validators.required],
comments: ["", Validators.required]
comments: ["", Validators.required],
gender: ["", Validators.required]
});
}
@@ -51,3 +52,10 @@ class E2EApp {
}
}
@App({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
class E2EApp {
rootPage = E2EPage;
}

View File

@@ -27,6 +27,14 @@
<ion-textarea clearInput [(ngModel)]="login.comments" ngControl="comments" required>Comment value</ion-textarea>
</ion-item>
<ion-item>
<ion-label>Gender</ion-label>
<ion-select [(ngModel)]="login.gender" ngControl="gender">
<ion-option value="f">Female</ion-option>
<ion-option value="m">Male</ion-option>
</ion-select>
</ion-item>
<div padding-left padding-right>
<button block (click)="submit($event, login)">Login</button>
</div>