mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
refactor(demo): rename basic inputs page
This commit is contained in:
@ -1,17 +1,17 @@
|
|||||||
import { ElementFinder, promise } from 'protractor/built';
|
import { ElementFinder, promise } from 'protractor/built';
|
||||||
|
|
||||||
import { InputsPage } from './inputs.po';
|
import { BasicInputsPage } from './basic-inputs.po';
|
||||||
|
|
||||||
describe('Demo Inputs Page', () => {
|
describe('Basic Inputs Page', () => {
|
||||||
let page: InputsPage;
|
let page: BasicInputsPage;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
page = new InputsPage();
|
page = new BasicInputsPage();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display title', () => {
|
it('should display title', () => {
|
||||||
page.navigateTo();
|
page.navigateTo();
|
||||||
expect(page.getTitleText()).toEqual('Ionic Core Inputs Demo');
|
expect(page.getTitleText()).toEqual('Ionic Core Basic Inputs Demo');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('text input', () => {
|
describe('text input', () => {
|
@ -1,8 +1,8 @@
|
|||||||
import { browser, by, element } from 'protractor';
|
import { browser, by, element } from 'protractor';
|
||||||
|
|
||||||
export class InputsPage {
|
export class BasicInputsPage {
|
||||||
navigateTo() {
|
navigateTo() {
|
||||||
return browser.get('/inputs');
|
return browser.get('/basic-inputs');
|
||||||
}
|
}
|
||||||
|
|
||||||
getIonicCheckbox() {
|
getIonicCheckbox() {
|
@ -3,7 +3,7 @@ import { Routes, RouterModule } from '@angular/router';
|
|||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', redirectTo: '/home', pathMatch: 'full' },
|
{ path: '', redirectTo: '/home', pathMatch: 'full' },
|
||||||
{ path: 'inputs', loadChildren: 'app/inputs/inputs.module#InputsModule' },
|
{ path: 'basic-inputs', loadChildren: 'app/basic-inputs/basic-inputs.module#BasicInputsModule' },
|
||||||
{ path: 'home', loadChildren: 'app/home/home.module#HomeModule' }
|
{ path: 'home', loadChildren: 'app/home/home.module#HomeModule' }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="title">
|
<div class="title">
|
||||||
Ionic Core Inputs Demo
|
Ionic Core Basic Inputs Demo
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ion-grid>
|
<ion-grid>
|
@ -4,16 +4,16 @@ import { FormsModule } from '@angular/forms';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { SharedModule } from '../shared/shared.module';
|
import { SharedModule } from '../shared/shared.module';
|
||||||
import { InputsTestPageComponent } from './inputs-test-page.component';
|
import { BasicInputsPageComponent } from './basic-inputs-page.component';
|
||||||
|
|
||||||
describe('InputsTestPageComponent', () => {
|
describe('InputsTestPageComponent', () => {
|
||||||
let component: InputsTestPageComponent;
|
let component: BasicInputsPageComponent;
|
||||||
let fixture: ComponentFixture<InputsTestPageComponent>;
|
let fixture: ComponentFixture<BasicInputsPageComponent>;
|
||||||
|
|
||||||
beforeEach(
|
beforeEach(
|
||||||
async(() => {
|
async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [InputsTestPageComponent],
|
declarations: [BasicInputsPageComponent],
|
||||||
imports: [FormsModule, SharedModule],
|
imports: [FormsModule, SharedModule],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
@ -21,7 +21,7 @@ describe('InputsTestPageComponent', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(InputsTestPageComponent);
|
fixture = TestBed.createComponent(BasicInputsPageComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
@ -1,12 +1,12 @@
|
|||||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-inputs-test-page',
|
selector: 'app-basic-inputs-page',
|
||||||
templateUrl: './inputs-test-page.component.html',
|
templateUrl: './basic-inputs-page.component.html',
|
||||||
styleUrls: ['./inputs-test-page.component.css'],
|
styleUrls: ['./basic-inputs-page.component.css'],
|
||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class InputsTestPageComponent implements OnInit {
|
export class BasicInputsPageComponent implements OnInit {
|
||||||
textareaValue = 'This is the Textarea Input';
|
textareaValue = 'This is the Textarea Input';
|
||||||
textValue = 'This is the Text Input';
|
textValue = 'This is the Text Input';
|
||||||
|
|
@ -1,14 +1,14 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import { InputsTestPageComponent } from './inputs-test-page.component';
|
import { BasicInputsPageComponent } from './basic-inputs-page.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: InputsTestPageComponent }
|
{ path: '', component: BasicInputsPageComponent }
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes)],
|
||||||
exports: [RouterModule]
|
exports: [RouterModule]
|
||||||
})
|
})
|
||||||
export class InputsRoutingModule { }
|
export class BasicInputsRoutingModule { }
|
@ -0,0 +1,14 @@
|
|||||||
|
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { BasicInputsPageComponent } from './basic-inputs-page.component';
|
||||||
|
|
||||||
|
import { SharedModule } from '../shared/shared.module';
|
||||||
|
import { BasicInputsRoutingModule } from './basic-inputs-routing.module';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [CommonModule, FormsModule, BasicInputsRoutingModule, SharedModule],
|
||||||
|
declarations: [BasicInputsPageComponent],
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
|
})
|
||||||
|
export class BasicInputsModule {}
|
@ -2,4 +2,4 @@
|
|||||||
Ionic Core Angular Demo Application
|
Ionic Core Angular Demo Application
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href='inputs'>Inputs Test Page</a>
|
<a href='basic-inputs'>Basic Inputs Test Page</a>
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
||||||
import { FormsModule } from '@angular/forms';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { InputsTestPageComponent } from './inputs-test-page.component';
|
|
||||||
|
|
||||||
import { SharedModule } from '../shared/shared.module';
|
|
||||||
import { InputsRoutingModule } from './inputs-routing.module';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [CommonModule, FormsModule, InputsRoutingModule, SharedModule],
|
|
||||||
declarations: [InputsTestPageComponent],
|
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
})
|
|
||||||
export class InputsModule {}
|
|
Reference in New Issue
Block a user