diff --git a/modules/playground/e2e_test/hello_world/hello_world_spec.ts b/modules/playground/e2e_test/hello_world/hello_world_spec.ts index 11ebe59261..7e20b09b74 100644 --- a/modules/playground/e2e_test/hello_world/hello_world_spec.ts +++ b/modules/playground/e2e_test/hello_world/hello_world_spec.ts @@ -6,35 +6,33 @@ * found in the LICENSE file at https://angular.io/license */ -import {fixmeIvy} from '@angular/private/testing'; import {browser} from 'protractor'; import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util'; -fixmeIvy('FW-1032: Ivy doesn\'t support injecting Renderer, the deprecated renderer V1') - .describe('hello world', function() { +describe('hello world', function() { - afterEach(verifyNoBrowserErrors); + afterEach(verifyNoBrowserErrors); - describe('hello world app', function() { - const URL = '/'; + describe('hello world app', function() { + const URL = '/'; - it('should greet', function() { - browser.get(URL); - - expect(getComponentText('hello-app', '.greeting')).toEqual('hello world!'); - }); - - it('should change greeting', function() { - browser.get(URL); - - clickComponentButton('hello-app', '.changeButton'); - expect(getComponentText('hello-app', '.greeting')).toEqual('howdy world!'); - }); - }); + it('should greet', function() { + browser.get(URL); + expect(getComponentText('hello-app', '.greeting')).toEqual('hello world!'); }); + it('should change greeting', function() { + browser.get(URL); + + clickComponentButton('hello-app', '.changeButton'); + expect(getComponentText('hello-app', '.greeting')).toEqual('howdy world!'); + }); + }); + +}); + function getComponentText(selector: string, innerSelector: string) { return browser.executeScript( `return document.querySelector("${selector}").querySelector("${innerSelector}").textContent`); diff --git a/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts b/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts index 60a83dd143..a271f82ce5 100644 --- a/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts +++ b/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts @@ -6,56 +6,54 @@ * found in the LICENSE file at https://angular.io/license */ -import {fixmeIvy} from '@angular/private/testing'; import {ExpectedConditions, browser, by, element, protractor} from 'protractor'; import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util'; -fixmeIvy('FW-1032: Ivy doesn\'t support injecting Renderer, the deprecated renderer V1') - .describe('WebWorkers Kitchen Sink', function() { - afterEach(() => { - verifyNoBrowserErrors(); - browser.ignoreSynchronization = false; - }); - const selector = 'hello-app .greeting'; - const URL = '/'; +describe('WebWorkers Kitchen Sink', function() { + afterEach(() => { + verifyNoBrowserErrors(); + browser.ignoreSynchronization = false; + }); + const selector = 'hello-app .greeting'; + const URL = '/'; - it('should greet', () => { - // This test can't wait for Angular as Testability is not available when using WebWorker - browser.ignoreSynchronization = true; - browser.get(URL); + it('should greet', () => { + // This test can't wait for Angular as Testability is not available when using WebWorker + browser.ignoreSynchronization = true; + browser.get(URL); - browser.wait(protractor.until.elementLocated(by.css(selector)), 15000); - const elem = element(by.css(selector)); - browser.wait(ExpectedConditions.textToBePresentInElement(elem, 'hello world!'), 5000); - expect(elem.getText()).toEqual('hello world!'); + browser.wait(protractor.until.elementLocated(by.css(selector)), 15000); + const elem = element(by.css(selector)); + browser.wait(ExpectedConditions.textToBePresentInElement(elem, 'hello world!'), 5000); + expect(elem.getText()).toEqual('hello world!'); - }); + }); - it('should change greeting', () => { - // This test can't wait for Angular as Testability is not available when using WebWorker - browser.ignoreSynchronization = true; - browser.get(URL); - const changeButtonSelector = 'hello-app .changeButton'; + it('should change greeting', () => { + // This test can't wait for Angular as Testability is not available when using WebWorker + browser.ignoreSynchronization = true; + browser.get(URL); + const changeButtonSelector = 'hello-app .changeButton'; - browser.wait(protractor.until.elementLocated(by.css(changeButtonSelector)), 15000); - element(by.css(changeButtonSelector)).click(); - const elem = element(by.css(selector)); - browser.wait(ExpectedConditions.textToBePresentInElement(elem, 'howdy world!'), 5000); - expect(elem.getText()).toEqual('howdy world!'); - }); + browser.wait(protractor.until.elementLocated(by.css(changeButtonSelector)), 15000); + element(by.css(changeButtonSelector)).click(); + const elem = element(by.css(selector)); + browser.wait(ExpectedConditions.textToBePresentInElement(elem, 'howdy world!'), 5000); + expect(elem.getText()).toEqual('howdy world!'); + }); - it('should display correct key names', () => { - // This test can't wait for Angular as Testability is not available when using WebWorker - browser.ignoreSynchronization = true; - browser.get(URL); - browser.wait(protractor.until.elementLocated(by.css('.sample-area')), 15000); + it('should display correct key names', () => { + // This test can't wait for Angular as Testability is not available when using WebWorker + browser.ignoreSynchronization = true; + browser.get(URL); + browser.wait(protractor.until.elementLocated(by.css('.sample-area')), 15000); - const area = element.all(by.css('.sample-area')).first(); - expect(area.getText()).toEqual('(none)'); + const area = element.all(by.css('.sample-area')).first(); + expect(area.getText()).toEqual('(none)'); - area.sendKeys('u'); - browser.wait(ExpectedConditions.textToBePresentInElement(area, 'U'), 5000); - expect(area.getText()).toEqual('U'); - }); - }); + area.sendKeys('u'); + browser.wait(ExpectedConditions.textToBePresentInElement(area, 'U'), 5000); + expect(area.getText()).toEqual('U'); + }); +}); diff --git a/modules/playground/src/hello_world/index.ts b/modules/playground/src/hello_world/index.ts index b6f14994ed..5a449f7f3e 100644 --- a/modules/playground/src/hello_world/index.ts +++ b/modules/playground/src/hello_world/index.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Component, Directive, ElementRef, Injectable, NgModule, Renderer} from '@angular/core'; +import {Component, Directive, ElementRef, Injectable, NgModule, Renderer2} from '@angular/core'; import {BrowserModule} from '@angular/platform-browser'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; @@ -22,8 +22,8 @@ export class GreetingService { export class RedDec { // ElementRef is always injectable and it wraps the element on which the // directive was found by the compiler. - constructor(el: ElementRef, renderer: Renderer) { - renderer.setElementStyle(el.nativeElement, 'color', 'red'); + constructor(el: ElementRef, renderer: Renderer2) { + renderer.setStyle(el.nativeElement, 'color', 'red'); } } diff --git a/modules/playground/src/web_workers/kitchen_sink/index_common.ts b/modules/playground/src/web_workers/kitchen_sink/index_common.ts index fd7c9b3373..387c95d599 100644 --- a/modules/playground/src/web_workers/kitchen_sink/index_common.ts +++ b/modules/playground/src/web_workers/kitchen_sink/index_common.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Component, Directive, ElementRef, Injectable, Renderer} from '@angular/core'; +import {Component, Directive, ElementRef, Injectable, Renderer2} from '@angular/core'; // A service available to the Injector, used by the HelloCmp component. @Injectable() @@ -20,8 +20,8 @@ export class GreetingService { export class RedDec { // ElementRef is always injectable and it wraps the element on which the // directive was found by the compiler. - constructor(el: ElementRef, renderer: Renderer) { - renderer.setElementStyle(el.nativeElement, 'color', 'red'); + constructor(el: ElementRef, renderer: Renderer2) { + renderer.setStyle(el.nativeElement, 'color', 'red'); } }