mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
nav/tabs snapshot tests
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<div class="card-content">
|
||||
Keep close to Nature's heart... and break clear away, once in awhile, and climb a mountain or spend a week in the woods. Wash your spirit clean.
|
||||
</div>
|
||||
<img src="http://ionic-io-assets.s3.amazonaws.com/images/p4.png">
|
||||
<div style="width:100%; height: 180px; background: gray"></div>
|
||||
<div class="card-footer">
|
||||
Posted 5 days ago
|
||||
</div>
|
||||
|
||||
16
ionic/components/nav/test/basic/e2e.ts
Normal file
16
ionic/components/nav/test/basic/e2e.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
it('should go from 1 to 2', function() {
|
||||
element(by.css('#from1To2')).click();
|
||||
});
|
||||
|
||||
it('should go from 2 to 3', function() {
|
||||
element(by.css('#from2To3')).click();
|
||||
});
|
||||
|
||||
it('should go from 3 to 2', function() {
|
||||
element(by.css('#from3To2')).click();
|
||||
});
|
||||
|
||||
it('should go from 2 to 1', function() {
|
||||
element(by.css('#from2To1')).click();
|
||||
});
|
||||
@@ -15,7 +15,7 @@ import {ThirdPage} from './third-page';
|
||||
'</ion-navbar>' +
|
||||
'<ion-content class="padding">' +
|
||||
'<p>First Page: {{ val }}</p>' +
|
||||
'<p><button primary (click)="push()">Push (Go to 2nd)</button></p>' +
|
||||
'<p><button id="from1To2" primary (click)="push()">Push (Go to 2nd)</button></p>' +
|
||||
'<p><button primary [push-data]="pushData" [nav-push]="pushPage">Push w/ nav-push (Go to 2nd)</button></p>' +
|
||||
'<p><button primary (click)="setItems()">setItems() (Go to 3rd, no history)</button></p>' +
|
||||
'<icon class="ion-ios-arrow-back"></icon>' +
|
||||
|
||||
@@ -8,8 +8,8 @@ import {FirstPage} from './first-page';
|
||||
<ion-navbar *navbar primary><ion-title>Second Page Header</ion-title></ion-navbar>
|
||||
<ion-content class="padding">
|
||||
<p><button primary (click)="pop()">Pop (Go back to 1st)</button></p>
|
||||
<p><button primary nav-pop>Pop with NavPop (Go back to 1st)</button></p>
|
||||
<p><button primary (click)="push()">Push (Go to 3rd)</button></p>
|
||||
<p><button id="from2To1" primary nav-pop>Pop with NavPop (Go back to 1st)</button></p>
|
||||
<p><button id="from2To3" primary (click)="push()">Push (Go to 3rd)</button></p>
|
||||
<p><button primary (click)="setItems()">setItems() (Go to 3rd, FirstPage 1st in history)</button></p>
|
||||
<p>Random: {{ val }}</p>
|
||||
<div class="green"><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f></div>
|
||||
|
||||
@@ -6,7 +6,7 @@ import {IonicView, NavController} from 'ionic/ionic';
|
||||
<ion-navbar *navbar><ion-title>Third Page Header</ion-title></ion-navbar>
|
||||
<ion-content class="padding">
|
||||
<p>
|
||||
<button primary (click)="pop()">Pop (Go back to 2nd)</button>
|
||||
<button id="from3To2" primary (click)="pop()">Pop (Go back to 2nd)</button>
|
||||
</p>
|
||||
<div class="yellow"><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f></div>
|
||||
</ion-content>
|
||||
|
||||
@@ -1 +1,20 @@
|
||||
|
||||
it('should go to Tab1 Page1', function() {
|
||||
element(by.css('#signIn')).click();
|
||||
});
|
||||
|
||||
it('should go to Tab1 Page2', function() {
|
||||
element(by.css('#goToTab1Page2')).click();
|
||||
});
|
||||
|
||||
it('should go to Tab2 Page1', function() {
|
||||
element(by.css('.tab-button:nth-of-type(2)')).click();
|
||||
});
|
||||
|
||||
it('should go back to Tab1 Page2', function() {
|
||||
element(by.css('.tab-button:nth-of-type(1)')).click();
|
||||
});
|
||||
|
||||
it('should go back to Tab1 Page1', function() {
|
||||
element(by.css('#backToTab1Page1')).click();
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@ import {App, IonicView, NavController} from 'ionic/ionic';
|
||||
'<ion-title>Sign In</ion-title>' +
|
||||
'</ion-navbar>' +
|
||||
'<ion-content class="padding">' +
|
||||
'<p><button primary (click)="push()">Go to tabs</button></p>' +
|
||||
'<p><button id="signIn" primary (click)="push()">Go to tabs</button></p>' +
|
||||
'<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>' +
|
||||
'<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>' +
|
||||
'</ion-content>'
|
||||
@@ -45,7 +45,7 @@ class TabsPage {
|
||||
'<ion-title>Tabs 1 Page 1</ion-title>' +
|
||||
'</ion-navbar>' +
|
||||
'<ion-content class="padding">' +
|
||||
'<p><button primary (click)="push()">Go to Tab 1, Page 2</button></p>' +
|
||||
'<p><button id="goToTab1Page2" primary (click)="push()">Go to Tab 1, Page 2</button></p>' +
|
||||
'<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>' +
|
||||
'<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>' +
|
||||
'</ion-content>'
|
||||
@@ -68,7 +68,7 @@ class Tab1Page1 {
|
||||
'</ion-navbar>' +
|
||||
'<ion-content class="padding">' +
|
||||
'<p><button primary (click)="push()">Go to Tab 1, Page 3</button></p>' +
|
||||
'<p><button primary (click)="nav.pop()">Back to Tab 1, Page 1</button></p>' +
|
||||
'<p><button id="backToTab1Page1" primary (click)="nav.pop()">Back to Tab 1, Page 1</button></p>' +
|
||||
'<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>' +
|
||||
'<f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f><f></f>' +
|
||||
'</ion-content>'
|
||||
|
||||
Reference in New Issue
Block a user