-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(input): basic e2e test of a sample form to validate the next but…
…ton/arrow goes to next input (#11362) basic e2e test of a sample form to validate the next button/arrow goes to next input field
- Loading branch information
1 parent
991cadb
commit b114427
Showing
6 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
import { RootPage } from '../pages/root-page/root-page'; | ||
|
||
@Component({ | ||
template: '<ion-nav [root]="root"></ion-nav>' | ||
}) | ||
export class AppComponent { | ||
root = RootPage; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { IonicApp, IonicModule } from '../../../../..'; | ||
|
||
import { AppComponent } from './app.component'; | ||
import { RootPageModule } from '../pages/root-page/root-page.module'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
IonicModule.forRoot(AppComponent), | ||
RootPageModule | ||
], | ||
bootstrap: [IonicApp] | ||
}) | ||
export class AppModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
|
||
import { AppModule } from './app.module'; | ||
|
||
platformBrowserDynamic().bootstrapModule(AppModule); |
59 changes: 59 additions & 0 deletions
59
src/components/input/test/basic-form/pages/root-page/root-page.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<ion-header> | ||
<ion-navbar> | ||
<ion-title>Basic Form</ion-title> | ||
</ion-navbar> | ||
</ion-header> | ||
<ion-content> | ||
<form> | ||
<ion-list> | ||
<ion-item> | ||
<ion-label floating>Username</ion-label> | ||
<ion-input type="text"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Password</ion-label> | ||
<ion-input type="pass"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Username</ion-label> | ||
<ion-input type="text"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Password</ion-label> | ||
<ion-input type="pass"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Username</ion-label> | ||
<ion-input type="text"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Password</ion-label> | ||
<ion-input type="pass"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Username</ion-label> | ||
<ion-input type="text"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Password</ion-label> | ||
<ion-input type="pass"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Username</ion-label> | ||
<ion-input type="text"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Password</ion-label> | ||
<ion-input type="pass"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Username</ion-label> | ||
<ion-input type="text"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label floating>Password</ion-label> | ||
<ion-input type="pass"></ion-input> | ||
</ion-item> | ||
</ion-list> | ||
</form> | ||
</ion-content> |
14 changes: 14 additions & 0 deletions
14
src/components/input/test/basic-form/pages/root-page/root-page.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { IonicPageModule } from '../../../../../..'; | ||
|
||
import { RootPage } from './root-page'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
RootPage, | ||
], | ||
imports: [ | ||
IonicPageModule.forChild(RootPage) | ||
] | ||
}) | ||
export class RootPageModule {} |
22 changes: 22 additions & 0 deletions
22
src/components/input/test/basic-form/pages/root-page/root-page.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
templateUrl: 'root-page.html' | ||
}) | ||
export class RootPage { | ||
myParam = ''; | ||
minValue = 8; | ||
maxValue = 12; | ||
stepValue = 2; | ||
|
||
myValues = { | ||
value1: 'Dynamic Input', | ||
value2: 'Dynamic Textarea' | ||
}; | ||
|
||
toggleValues() { | ||
this.minValue === 8 ? this.minValue = 4 : this.minValue = 8; | ||
this.maxValue === 12 ? this.maxValue = 20 : this.maxValue = 12; | ||
this.stepValue === 2 ? this.stepValue = 4 : this.stepValue = 2; | ||
} | ||
} |