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