fix: make all tests green with new view engine and JIT

Note that this does not yet include enabling the view engine
by default.

Included refactoring:
- view engine: split namespace of elements / attributes already
  when creating the `NodeDef`
- view engine: when injecting the old `Renderer`, use an implementation
  that is based on `RendererV2`
- view engine: store view queries in the component view, not
  on the host element
This commit is contained in:
Tobias Bosch
2017-02-17 08:56:36 -08:00
committed by Igor Minar
parent 74ce121dba
commit b9f17a9cb2
37 changed files with 527 additions and 300 deletions

View File

@ -13,9 +13,14 @@ export function main() {
describe('binding to CSS class list', () => {
let fixture: ComponentFixture<any>;
function normalizeClassNames(classes: string) {
return classes.trim().split(' ').sort().join(' ');
}
function detectChangesAndExpectClassName(classes: string): void {
fixture.detectChanges();
expect(fixture.debugElement.children[0].nativeElement.className.trim()).toEqual(classes);
let nonNormalizedClassName = fixture.debugElement.children[0].nativeElement.className;
expect(normalizeClassNames(nonNormalizedClassName)).toEqual(normalizeClassNames(classes));
}
function getComponent(): TestComponent { return fixture.debugElement.componentInstance; }