Skip to content

Commit

Permalink
test(tabs): clean up tabs badges e2e test so it works
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed Jul 8, 2016
1 parent d675d39 commit d3be0af
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 28 deletions.
6 changes: 5 additions & 1 deletion src/components/tabs/test/badges/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import {Component, ViewEncapsulation} from '@angular/core';
import {ionicBootstrap} from '../../../../../src';

@Component({template:'hi'})
class E2EPage{}


@Component({
templateUrl: 'main.html',
styleUrls: ['styles.css'],
encapsulation: ViewEncapsulation.None
})
class E2EApp {
myBadge:number = 55;
root = E2EPage;
myBadge: number = 55;
}

ionicBootstrap(E2EApp);
54 changes: 27 additions & 27 deletions src/components/tabs/test/badges/main.html
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@

<!-- Text -->
<ion-tabs no-navbar>
<ion-tab tabTitle="Recents"></ion-tab>
<ion-tab tabTitle="Favorites" tabBadge="32"></ion-tab>
<ion-tab tabTitle="Settings"></ion-tab>
<ion-tab [root]="root" tabTitle="Recents"></ion-tab>
<ion-tab [root]="root" tabTitle="Favorites" tabBadge="32"></ion-tab>
<ion-tab [root]="root" tabTitle="Settings"></ion-tab>
</ion-tabs>


<!-- Icons -->
<ion-tabs no-navbar>
<ion-tab tabIcon="call"></ion-tab>
<ion-tab tabIcon="heart"></ion-tab>
<ion-tab tabIcon="settings" tabBadge="all" tabBadgeStyle="primary"></ion-tab>
<ion-tab [root]="root" tabIcon="call"></ion-tab>
<ion-tab [root]="root" tabIcon="heart"></ion-tab>
<ion-tab [root]="root" tabIcon="settings" tabBadge="all" tabBadgeStyle="primary"></ion-tab>
</ion-tabs>


<!-- Icons on top of text -->
<ion-tabs no-navbar>
<ion-tab tabTitle="Location" tabIcon="navigate" tabBadge="11" tabBadgeStyle="secondary"></ion-tab>
<ion-tab tabTitle="Favorites" tabIcon="star"></ion-tab>
<ion-tab tabTitle="Radio" tabIcon="musical-notes"></ion-tab>
<ion-tab [root]="root" tabTitle="Location" tabIcon="navigate" tabBadge="11" tabBadgeStyle="secondary"></ion-tab>
<ion-tab [root]="root" tabTitle="Favorites" tabIcon="star"></ion-tab>
<ion-tab [root]="root" tabTitle="Radio" tabIcon="musical-notes"></ion-tab>
</ion-tabs>


<!-- Icons below text -->
<ion-tabs tabsLayout="icon-bottom" no-navbar>
<ion-tab tabTitle="Recents" tabIcon="call"></ion-tab>
<ion-tab tabTitle="Favorites" tabIcon="heart" tabBadge="577" tabBadgeStyle="dark"></ion-tab>
<ion-tab tabTitle="Settings" tabIcon="settings"></ion-tab>
<ion-tab [root]="root" tabTitle="Recents" tabIcon="call"></ion-tab>
<ion-tab [root]="root" tabTitle="Favorites" tabIcon="heart" tabBadge="577" tabBadgeStyle="dark"></ion-tab>
<ion-tab [root]="root" tabTitle="Settings" tabIcon="settings"></ion-tab>
</ion-tabs>


<!-- Icons right of text -->
<ion-tabs tabsLayout="icon-right" primary no-navbar>
<ion-tab tabTitle="Recents" tabIcon="call"></ion-tab>
<ion-tab tabTitle="Favorites" tabIcon="heart"></ion-tab>
<ion-tab tabTitle="Settings" tabIcon="settings" tabBadge="1030" tabBadgeStyle="light"></ion-tab>
<ion-tab [root]="root" tabTitle="Recents" tabIcon="call"></ion-tab>
<ion-tab [root]="root" tabTitle="Favorites" tabIcon="heart"></ion-tab>
<ion-tab [root]="root" tabTitle="Settings" tabIcon="settings" tabBadge="1030" tabBadgeStyle="light"></ion-tab>
</ion-tabs>

<!-- Icons left of text -->
<ion-tabs tabsLayout="icon-left" no-navbar>
<ion-tab tabTitle="Recents" tabIcon="call" tabBadge="32" tabBadgeStyle="danger"></ion-tab>
<ion-tab tabTitle="Favorites" tabIcon="heart"></ion-tab>
<ion-tab tabTitle="Settings" tabIcon="settings"></ion-tab>
<ion-tab [root]="root" tabTitle="Recents" tabIcon="call" tabBadge="32" tabBadgeStyle="danger"></ion-tab>
<ion-tab [root]="root" tabTitle="Favorites" tabIcon="heart"></ion-tab>
<ion-tab [root]="root" tabTitle="Settings" tabIcon="settings"></ion-tab>
</ion-tabs>

<!-- No icons -->
<ion-tabs no-navbar tabsLayout="icon-hide">
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root"></ion-tab>
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root" tabBadge="4"></ion-tab>
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root"></ion-tab>
<ion-tab [root]="root" tabTitle="Recents" tabIcon="call"></ion-tab>
<ion-tab [root]="root" tabTitle="Favorites" tabIcon="heart" tabBadge="4"></ion-tab>
<ion-tab [root]="root" tabTitle="Settings" tabIcon="settings"></ion-tab>
</ion-tabs>


<!-- No title -->
<ion-tabs tabsLayout="title-hide" secondary no-navbar>
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root" tabBadge="7" tabBadgeStyle="light"></ion-tab>
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root"></ion-tab>
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root"></ion-tab>
<ion-tab [root]="root" tabTitle="Recents" tabIcon="call" tabBadge="7" tabBadgeStyle="light"></ion-tab>
<ion-tab [root]="root" tabTitle="Favorites" tabIcon="heart"></ion-tab>
<ion-tab [root]="root" tabTitle="Settings" tabIcon="settings"></ion-tab>
</ion-tabs>

<!-- Dynamic Badge -->
<ion-tabs tabsLayout="icon-left" no-navbar>
<ion-tab tabTitle="Recents" tabIcon="call"></ion-tab>
<ion-tab tabTitle="Favorites" tabIcon="heart"></ion-tab>
<ion-tab tabTitle="Settings" tabIcon="settings" [tabBadge]="myBadge" tabBadgeStyle="primary"></ion-tab>
<ion-tab [root]="root" tabTitle="Recents" tabIcon="call"></ion-tab>
<ion-tab [root]="root" tabTitle="Favorites" tabIcon="heart"></ion-tab>
<ion-tab [root]="root" tabTitle="Settings" tabIcon="settings" [tabBadge]="myBadge" tabBadgeStyle="primary"></ion-tab>
</ion-tabs>
1 change: 1 addition & 0 deletions src/components/tabs/test/badges/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ ion-tabs ion-tabbar {
top: auto;
height: auto;
visibility: visible;
opacity: 1;
}

0 comments on commit d3be0af

Please sign in to comment.