From c29d2a4f1624627e28ffde71d29ab3bb70cee639 Mon Sep 17 00:00:00 2001 From: Kara Erickson Date: Tue, 5 Mar 2019 17:37:16 -0800 Subject: [PATCH] test(ivy): fix export tests to work in IE (#29125) Some of the export tests had assertions that relied on capitalization of attributes in the DOM. IE treats capitalization somewhat differently, so our SauceLabs tests were failing. This commit tweaks the tests so that the assertions do not rely on attributes to be capitalized or not. PR Close #29125 --- packages/core/test/acceptance/exports_spec.ts | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/core/test/acceptance/exports_spec.ts b/packages/core/test/acceptance/exports_spec.ts index 63d3a0a485..4d6feb609c 100644 --- a/packages/core/test/acceptance/exports_spec.ts +++ b/packages/core/test/acceptance/exports_spec.ts @@ -43,19 +43,20 @@ describe('exports', () => { describe('input changes in hooks', () => { it('should support forward reference', () => { const fixture = initWithTemplate( - AppComp, '
{{ myDir.name }}'); + AppComp, '
{{ myDir.name }}'); fixture.detectChanges(); expect(fixture.nativeElement.innerHTML) - .toEqual('
Drew!?@'); + .toEqual('
Drew!?@'); }); modifiedInIvy('Supporting input changes in hooks is limited in Ivy') .it('should support backward reference', () => { const fixture = initWithTemplate( - AppComp, '{{ myDir.name }}
'); + AppComp, + '{{ myDir.name }}
'); fixture.detectChanges(); expect(fixture.nativeElement.innerHTML) - .toEqual('Drew!?@
'); + .toEqual('Drew!?@
'); }); onlyInIvy('Supporting input changes in hooks is limited in Ivy') @@ -63,7 +64,7 @@ describe('exports', () => { expect(() => { const fixture = initWithTemplate( AppComp, - '{{ myDir.name }}
'); + '{{ myDir.name }}
'); fixture.detectChanges(); }) .toThrowError( @@ -74,11 +75,11 @@ describe('exports', () => { .it('should support reference on the same node', () => { const fixture = initWithTemplate( AppComp, - '
'); + '
'); fixture.detectChanges(); expect(fixture.nativeElement.innerHTML) .toEqual( - '
'); + '
'); }); onlyInIvy('Supporting input changes in hooks is limited in Ivy') @@ -86,7 +87,7 @@ describe('exports', () => { expect(() => { const fixture = initWithTemplate( AppComp, - '
'); + '
'); fixture.detectChanges(); }) .toThrowError( @@ -95,10 +96,10 @@ describe('exports', () => { it('should support input referenced by host binding on that directive', () => { const fixture = - initWithTemplate(AppComp, '
'); + initWithTemplate(AppComp, '
'); fixture.detectChanges(); expect(fixture.nativeElement.innerHTML) - .toEqual('
'); + .toEqual('
'); }); }); @@ -162,7 +163,7 @@ class DirWithCompInput { @Input('dirWithInput') comp: ComponentToReference|null = null; } -@Directive({selector: '[dirOnChange]', exportAs: 'dirOnChange', host: {'[title]': 'name'}}) +@Directive({selector: '[dir-on-change]', exportAs: 'dirOnChange', host: {'[title]': 'name'}}) class DirToReferenceWithPreOrderHooks implements OnInit, OnChanges, DoCheck { @Input() in : any = null; name = 'Drew';