Skip to content

Commit

Permalink
test(searchbar): remove some of the e2e checks and rename the floatin…
Browse files Browse the repository at this point in the history
…g folder
  • Loading branch information
brandyscarney committed Jun 15, 2016
1 parent 01bbc94 commit 9819aae
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 43 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<ion-content>
<h5 padding-left> Search - Default </h5>
<ion-searchbar [(ngModel)]="defaultSearch" showCancelButton debounce="500" (ionInput)="triggerInput($event)" (ionBlur)="inputBlurred($event)" (ionFocus)="inputFocused($event)" (ionCancel)="onCancelSearchbar($event)" (ionClear)="onClearSearchbar($event)" class="e2eDefaultFloatingSearchbar"></ion-searchbar>
<ion-searchbar [(ngModel)]="defaultSearch" showCancelButton debounce="500" (ionInput)="triggerInput($event)" (ionBlur)="inputBlurred($event)" (ionFocus)="inputFocused($event)" (ionCancel)="onCancelSearchbar($event)" (ionClear)="onClearSearchbar($event)"></ion-searchbar>

<p padding-left>
defaultSearch: <b>{{ defaultSearch }}</b>
</p>

<h5 padding-left> Search - Custom Placeholder </h5>
<ion-searchbar [autocorrect]="isAutocorrect" showCancelButton="true" [autocomplete]="isAutocomplete" [spellcheck]="isSpellcheck" type="number" [(ngModel)]="customPlaceholder" (ionInput)="triggerInput($event)" (ionCancel)="onCancelSearchbar($event)" (ionClear)="onClearSearchbar($event)" placeholder="Filter Schedules" class="e2eCustomPlaceholderFloatingSearchbar"></ion-searchbar>
<ion-searchbar [autocorrect]="isAutocorrect" showCancelButton="true" [autocomplete]="isAutocomplete" [spellcheck]="isSpellcheck" type="number" [(ngModel)]="customPlaceholder" (ionInput)="triggerInput($event)" (ionCancel)="onCancelSearchbar($event)" (ionClear)="onClearSearchbar($event)" placeholder="Filter Schedules"></ion-searchbar>

<p padding-left>
customPlaceholder: <b>{{ customPlaceholder }}</b>
</p>

<h5 padding-left> Search - No Cancel Button </h5>
<ion-searchbar autocorrect="off" autocomplete="off" spellcheck="true" type="text" [(ngModel)]="defaultCancel" (ionInput)="triggerInput($event)" (ionCancel)="onCancelSearchbar($event)" (ionClear)="onClearSearchbar($event)" class="e2eDefaultCancelButtonFloatingSearchbar"></ion-searchbar>
<ion-searchbar autocorrect="off" autocomplete="off" spellcheck="true" type="text" [(ngModel)]="defaultCancel" (ionInput)="triggerInput($event)" (ionCancel)="onCancelSearchbar($event)" (ionClear)="onClearSearchbar($event)"></ion-searchbar>

<p padding-left>
defaultCancel: <b>{{ defaultCancel }}</b>
</p>

<h5 padding-left> Search - Custom Cancel Button Danger </h5>
<ion-searchbar (ionInput)="triggerInput($event)" showCancelButton (ionCancel)="onCancelSearchbar($event)" (ionClear)="onClearSearchbar($event)" cancelButtonText="Really Long Cancel" class="e2eCustomCancelButtonFloatingSearchbar" danger></ion-searchbar>
<ion-searchbar (ionInput)="triggerInput($event)" showCancelButton (ionCancel)="onCancelSearchbar($event)" (ionClear)="onClearSearchbar($event)" cancelButtonText="Really Long Cancel" danger></ion-searchbar>

<h5 padding-left> Search - Value passed </h5>
<ion-searchbar value="mysearch" showCancelButton (ionInput)="triggerInput($event)" (ionCancel)="onCancelSearchbar($event)" (ionClear)="onClearSearchbar($event)" cancelButtonText="Really Long Cancel" class="e2eCustomCancelButtonFloatingSearchbar" danger></ion-searchbar>
<ion-searchbar value="mysearch" showCancelButton (ionInput)="triggerInput($event)" (ionCancel)="onCancelSearchbar($event)" (ionClear)="onClearSearchbar($event)" cancelButtonText="Really Long Cancel" dark></ion-searchbar>

<p padding>
<button block (click)="changeValue()">Change Value</button>
Expand Down
17 changes: 0 additions & 17 deletions src/components/searchbar/test/floating/e2e.ts

This file was deleted.

4 changes: 4 additions & 0 deletions src/components/searchbar/test/nav/e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

it('should navigate to searchbar', function() {
element(by.css('.e2eSearchbarNav')).click();
});
2 changes: 1 addition & 1 deletion src/components/searchbar/test/nav/first.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
</ion-navbar>

<ion-content padding>
<button block (click)="goToSecond()">Go to Searchbar Page</button>
<button block (click)="goToSecond()" class="e2eSearchbarNav">Go to Searchbar Page</button>
</ion-content>
16 changes: 0 additions & 16 deletions src/components/searchbar/test/toolbar/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,16 +0,0 @@

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('.e2eDarkToolbarSearchbar input')).sendKeys("CC");
});

it('light should focus', function() {
element(by.css('.e2eLightToolbarSearchbar input')).sendKeys("DD");
});
8 changes: 4 additions & 4 deletions src/components/searchbar/test/toolbar/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
<ion-content>
<h5 padding-left padding-top> Search - Default Toolbar </h5>
<ion-toolbar>
<ion-searchbar [(ngModel)]="defaultToolbarSearch" class="e2eDefaultToolbarSearchbar"></ion-searchbar>
<ion-searchbar [(ngModel)]="defaultToolbarSearch"></ion-searchbar>
</ion-toolbar>

<h5 padding-left padding-top> Search - Primary Toolbar </h5>
<ion-toolbar primary>
<ion-searchbar dark [(ngModel)]="primaryToolbarSearch" showCancelButton class="e2ePrimaryToolbarSearchbar"></ion-searchbar>
<ion-searchbar dark [(ngModel)]="primaryToolbarSearch" showCancelButton></ion-searchbar>
</ion-toolbar>

<h5 padding-left padding-top> Search - Dark Toolbar </h5>
<ion-toolbar dark>
<ion-searchbar dark [(ngModel)]="darkToolbarSearch" class="e2eDarkToolbarSearchbar"></ion-searchbar>
<ion-searchbar dark placeholder="Filter Schedules" [(ngModel)]="darkToolbarSearch"></ion-searchbar>
</ion-toolbar>

<h5 padding-left padding-top> Search - Light Toolbar </h5>
<ion-toolbar light>
<ion-searchbar [(ngModel)]="lightToolbarSearch" showCancelButton class="e2eLightToolbarSearchbar"></ion-searchbar>
<ion-searchbar [(ngModel)]="lightToolbarSearch" showCancelButton></ion-searchbar>
</ion-toolbar>

</ion-content>

0 comments on commit 9819aae

Please sign in to comment.