test(ivy): update e2e tests to use Renderer2 instead of Renderer (#28558)
PR Close #28558
This commit is contained in:
parent
6709db9677
commit
0e6f799aec
@ -6,13 +6,11 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {fixmeIvy} from '@angular/private/testing';
|
|
||||||
import {browser} from 'protractor';
|
import {browser} from 'protractor';
|
||||||
|
|
||||||
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
|
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);
|
||||||
|
|
||||||
@ -33,7 +31,7 @@ fixmeIvy('FW-1032: Ivy doesn\'t support injecting Renderer, the deprecated rende
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function getComponentText(selector: string, innerSelector: string) {
|
function getComponentText(selector: string, innerSelector: string) {
|
||||||
return browser.executeScript(
|
return browser.executeScript(
|
||||||
|
@ -6,13 +6,11 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* 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 {ExpectedConditions, browser, by, element, protractor} from 'protractor';
|
||||||
|
|
||||||
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
|
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() {
|
||||||
.describe('WebWorkers Kitchen Sink', function() {
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
verifyNoBrowserErrors();
|
verifyNoBrowserErrors();
|
||||||
browser.ignoreSynchronization = false;
|
browser.ignoreSynchronization = false;
|
||||||
@ -58,4 +56,4 @@ fixmeIvy('FW-1032: Ivy doesn\'t support injecting Renderer, the deprecated rende
|
|||||||
browser.wait(ExpectedConditions.textToBePresentInElement(area, 'U'), 5000);
|
browser.wait(ExpectedConditions.textToBePresentInElement(area, 'U'), 5000);
|
||||||
expect(area.getText()).toEqual('U');
|
expect(area.getText()).toEqual('U');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* 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 {BrowserModule} from '@angular/platform-browser';
|
||||||
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
|
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
@ -22,8 +22,8 @@ export class GreetingService {
|
|||||||
export class RedDec {
|
export class RedDec {
|
||||||
// ElementRef is always injectable and it wraps the element on which the
|
// ElementRef is always injectable and it wraps the element on which the
|
||||||
// directive was found by the compiler.
|
// directive was found by the compiler.
|
||||||
constructor(el: ElementRef, renderer: Renderer) {
|
constructor(el: ElementRef, renderer: Renderer2) {
|
||||||
renderer.setElementStyle(el.nativeElement, 'color', 'red');
|
renderer.setStyle(el.nativeElement, 'color', 'red');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* 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.
|
// A service available to the Injector, used by the HelloCmp component.
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@ -20,8 +20,8 @@ export class GreetingService {
|
|||||||
export class RedDec {
|
export class RedDec {
|
||||||
// ElementRef is always injectable and it wraps the element on which the
|
// ElementRef is always injectable and it wraps the element on which the
|
||||||
// directive was found by the compiler.
|
// directive was found by the compiler.
|
||||||
constructor(el: ElementRef, renderer: Renderer) {
|
constructor(el: ElementRef, renderer: Renderer2) {
|
||||||
renderer.setElementStyle(el.nativeElement, 'color', 'red');
|
renderer.setStyle(el.nativeElement, 'color', 'red');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user