test: fix existing tests by removing usage of obsolete stuff like component level directives, AsyncCompleter and TestComponentBuilder

This commit is contained in:
Igor Minar
2016-08-19 12:51:01 -07:00
parent 939d318242
commit 3c2b2ff332
46 changed files with 251 additions and 326 deletions

View File

@ -46,12 +46,7 @@ export class RedDec {
// context of the HelloCmp class below.
template: `<div class="greeting">{{greeting}} <span red>world</span>!</div>
<button class="changeButton" (click)="changeGreeting()">change greeting</button>
<div (keydown)="onKeyDown($event)" class="sample-area" tabindex="0">{{lastKey}}</div><br>`,
// All directives used in the template need to be specified. This allows for
// modularity (RedDec can only be used in this template)
// and better tooling (the template can be invalidated if the attribute is
// misspelled).
directives: [RedDec]
<div (keydown)="onKeyDown($event)" class="sample-area" tabindex="0">{{lastKey}}</div><br>`
})
export class HelloCmp {
greeting: string;

View File

@ -7,12 +7,13 @@
*/
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {WorkerAppModule} from '@angular/platform-browser';
import {platformWorkerAppDynamic} from '@angular/platform-browser-dynamic';
import {TodoApp} from './index_common';
@NgModule({imports: [WorkerAppModule], bootstrap: [TodoApp], declarations: [TodoApp]})
@NgModule({imports: [WorkerAppModule, FormsModule], bootstrap: [TodoApp], declarations: [TodoApp]})
class ExampleModule {
}

View File

@ -6,18 +6,11 @@
* found in the LICENSE file at https://angular.io/license
*/
import {NgFor} from '@angular/common';
import {Component} from '@angular/core';
import {FORM_DIRECTIVES} from '@angular/forms';
import {Store, Todo, TodoFactory} from './services/TodoStore';
@Component({
selector: 'todo-app',
viewProviders: [Store, TodoFactory],
templateUrl: 'todo.html',
directives: [NgFor, FORM_DIRECTIVES]
})
@Component({selector: 'todo-app', viewProviders: [Store, TodoFactory], templateUrl: 'todo.html'})
export class TodoApp {
todoEdit: Todo = null;
inputValue: string;