From 2d38fa104bd541bf50e7379ebab027dc01e58fc8 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Tue, 17 Jul 2018 11:19:24 +0300 Subject: [PATCH] test(platform-webworker): avoid flakes due to existing `PlatformRef` (#24916) PR Close #24916 --- .../worker/renderer_v2_integration_spec.ts | 25 +++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/packages/platform-webworker/test/web_workers/worker/renderer_v2_integration_spec.ts b/packages/platform-webworker/test/web_workers/worker/renderer_v2_integration_spec.ts index 3a3b5e209f..d66e25a96a 100644 --- a/packages/platform-webworker/test/web_workers/worker/renderer_v2_integration_spec.ts +++ b/packages/platform-webworker/test/web_workers/worker/renderer_v2_integration_spec.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Component, ComponentRef, Renderer2, RendererFactory2, RendererType2, RootRenderer} from '@angular/core'; +import {Component, ComponentRef, Renderer2, RendererFactory2, RendererType2, destroyPlatform} from '@angular/core'; import {TestBed} from '@angular/core/testing'; import {platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing'; import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter'; @@ -37,6 +37,9 @@ let lastCreatedRenderer: Renderer2; let uiRenderStore: RenderStore; let wwRenderStore: RenderStore; + beforeEach(() => destroyPlatform()); + afterEach(() => destroyPlatform()); + beforeEach(() => { // UI side uiRenderStore = new RenderStore(); @@ -81,10 +84,6 @@ let lastCreatedRenderer: Renderer2; } it('should update text nodes', () => { - // IE (v11 to be exact) has been problematic lately with saucelabs for this specific test - // TODO (matsko): revisit this once things become more stable in the saucelabs world - if (isOldIE()) return; - const fixture = TestBed.overrideTemplate(MyComp2, '
{{ctxProp}}
').createComponent(MyComp2); const renderEl = getRenderElement(fixture.nativeElement); @@ -97,10 +96,6 @@ let lastCreatedRenderer: Renderer2; it('should update any element property/attributes/class/style(s) independent of the compilation on the root element and other elements', () => { - // IE (v11 to be exact) has been problematic lately with saucelabs for this specific test - // TODO (matsko): revisit this once things become more stable in the saucelabs world - if (isOldIE()) return; - const fixture = TestBed.overrideTemplate(MyComp2, '') .createComponent(MyComp2); @@ -135,10 +130,6 @@ let lastCreatedRenderer: Renderer2; }); it('should update any template comment property/attributes', () => { - // IE (v11 to be exact) has been problematic lately with saucelabs for this specific test - // TODO (matsko): revisit this once things become more stable in the saucelabs world - if (isOldIE()) return; - const fixture = TestBed.overrideTemplate(MyComp2, '') .createComponent(MyComp2); @@ -149,10 +140,6 @@ let lastCreatedRenderer: Renderer2; }); it('should add and remove fragments', () => { - // IE (v11 to be exact) has been problematic lately with saucelabs for this specific test - // TODO (matsko): revisit this once things become more stable in the saucelabs world - if (isOldIE()) return; - const fixture = TestBed .overrideTemplate(MyComp2, 'hello') @@ -172,10 +159,6 @@ let lastCreatedRenderer: Renderer2; if (getDOM().supportsDOMEvents()) { it('should listen to events', () => { - // IE (v11 to be exact) has been problematic lately with saucelabs for this specific test - // TODO (matsko): revisit this once things become more stable in the saucelabs world - if (isOldIE()) return; - const fixture = TestBed.overrideTemplate(MyComp2, '') .createComponent(MyComp2);