mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
test(searchbar): added tests for searchbars in toolbars
references #289
This commit is contained in:
@ -0,0 +1,12 @@
|
||||
|
||||
it('default should focus', function() {
|
||||
element(by.css('.e2eDefaultToolbarSearchbar input')).sendKeys("AA");
|
||||
});
|
||||
|
||||
it('primary should focus', function() {
|
||||
element(by.css('.e2ePrimaryToolbarSearchbar input')).sendKeys("BB");
|
||||
});
|
||||
|
||||
it('danger should focus', function() {
|
||||
element(by.css('.e2eDangerToolbarSearchbar input')).sendKeys("CC");
|
||||
});
|
||||
|
@ -7,7 +7,9 @@ import {SearchPipe} from 'ionic/components/searchbar/searchbar';
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class E2EApp {
|
||||
toolbarSearch: string;
|
||||
DefaultToolbarSearch: string;
|
||||
PrimaryToolbarSearch: string;
|
||||
DangerToolbarSearch: string;
|
||||
|
||||
constructor() {
|
||||
|
||||
|
@ -5,17 +5,17 @@
|
||||
<ion-content>
|
||||
<h5 padding-left padding-top> Search - Default Toolbar </h5>
|
||||
<ion-toolbar>
|
||||
<ion-searchbar [(ng-model)]="toolbarSearch" show-cancel="true"></ion-searchbar>
|
||||
<ion-searchbar [(ng-model)]="defaultToolbarSearch" show-cancel="true" class="e2eDefaultToolbarSearchbar"></ion-searchbar>
|
||||
</ion-toolbar>
|
||||
|
||||
<h5 padding-left padding-top> Search - Primary Toolbar </h5>
|
||||
<ion-toolbar primary>
|
||||
<ion-searchbar [(ng-model)]="toolbarSearch" show-cancel="true"></ion-searchbar>
|
||||
<ion-searchbar [(ng-model)]="primaryToolbarSearch" show-cancel="true" class="e2ePrimaryToolbarSearchbar"></ion-searchbar>
|
||||
</ion-toolbar>
|
||||
|
||||
<h5 padding-left padding-top> Search - Danger Toolbar </h5>
|
||||
<ion-toolbar danger>
|
||||
<ion-searchbar [(ng-model)]="toolbarSearch" show-cancel="true"></ion-searchbar>
|
||||
<ion-searchbar [(ng-model)]="dangerToolbarSearch" show-cancel="true" class="e2eDangerToolbarSearchbar"></ion-searchbar>
|
||||
</ion-toolbar>
|
||||
|
||||
</ion-content>
|
||||
|
Reference in New Issue
Block a user