build: disable failing ivy playground example e2e tests (#28490)
With ed1ba88ffd9d0fc266808413fa517e7a31943bc8 we switched the examples to run with Bazel. This means that we can now also run the e2e tests for these examples against Ivy. All playground e2e tests, **except** the `web_worker` examples, successfully run with Ivy. The failing webworker e2e tests have been temporarily disabled with `fixmeIvy` and need to be investigated in a follow-up. PR Close #28490
This commit is contained in:
parent
16a78f97f5
commit
5cdbdc9ee0
|
@ -6,10 +6,12 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {verifyNoBrowserErrors} from 'e2e_util/e2e_util';
|
||||
import {fixmeIvy} from '@angular/private/testing';
|
||||
import {browser} from 'protractor';
|
||||
|
||||
describe('hello world', function() {
|
||||
import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
|
||||
|
||||
fixmeIvy('NullInjectorError: No provider for Renderer!').describe('hello world', function() {
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
|
|
|
@ -6,70 +6,73 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {verifyNoBrowserErrors} from 'e2e_util/e2e_util';
|
||||
import {fixmeIvy} from '@angular/private/testing';
|
||||
import {ExpectedConditions, browser, by, element, protractor} from 'protractor';
|
||||
|
||||
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
|
||||
|
||||
describe('WebWorkers Input', function() {
|
||||
afterEach(() => {
|
||||
verifyNoBrowserErrors();
|
||||
browser.ignoreSynchronization = false;
|
||||
});
|
||||
const selector = 'input-app';
|
||||
const URL = 'all/playground/src/web_workers/input/index.html';
|
||||
const VALUE = 'test val';
|
||||
fixmeIvy('NullInjectorError: No provider for InjectionToken ROOT_CONTEXT_TOKEN!')
|
||||
.describe('WebWorkers Input', function() {
|
||||
afterEach(() => {
|
||||
verifyNoBrowserErrors();
|
||||
browser.ignoreSynchronization = false;
|
||||
});
|
||||
const selector = 'input-app';
|
||||
const URL = '/';
|
||||
const VALUE = 'test val';
|
||||
|
||||
it('should bootstrap', () => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
it('should bootstrap', () => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
|
||||
waitForBootstrap();
|
||||
const elem = element(by.css(selector + ' h2'));
|
||||
expect(elem.getText()).toEqual('Input App');
|
||||
});
|
||||
waitForBootstrap();
|
||||
const elem = element(by.css(selector + ' h2'));
|
||||
expect(elem.getText()).toEqual('Input App');
|
||||
});
|
||||
|
||||
it('should bind to input value', () => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
it('should bind to input value', () => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
|
||||
waitForBootstrap();
|
||||
const input = element(by.css(selector + ' input'));
|
||||
input.sendKeys(VALUE);
|
||||
const displayElem = element(by.css(selector + ' .input-val'));
|
||||
const expectedVal = `Input val is ${VALUE}.`;
|
||||
browser.wait(ExpectedConditions.textToBePresentInElement(displayElem, expectedVal), 5000);
|
||||
expect(displayElem.getText()).toEqual(expectedVal);
|
||||
});
|
||||
waitForBootstrap();
|
||||
const input = element(by.css(selector + ' input'));
|
||||
input.sendKeys(VALUE);
|
||||
const displayElem = element(by.css(selector + ' .input-val'));
|
||||
const expectedVal = `Input val is ${VALUE}.`;
|
||||
browser.wait(ExpectedConditions.textToBePresentInElement(displayElem, expectedVal), 5000);
|
||||
expect(displayElem.getText()).toEqual(expectedVal);
|
||||
});
|
||||
|
||||
it('should bind to textarea value', () => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
it('should bind to textarea value', () => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
|
||||
waitForBootstrap();
|
||||
const input = element(by.css(selector + ' textarea'));
|
||||
input.sendKeys(VALUE);
|
||||
const displayElem = element(by.css(selector + ' .textarea-val'));
|
||||
const expectedVal = `Textarea val is ${VALUE}.`;
|
||||
browser.wait(ExpectedConditions.textToBePresentInElement(displayElem, expectedVal), 5000);
|
||||
expect(displayElem.getText()).toEqual(expectedVal);
|
||||
});
|
||||
waitForBootstrap();
|
||||
const input = element(by.css(selector + ' textarea'));
|
||||
input.sendKeys(VALUE);
|
||||
const displayElem = element(by.css(selector + ' .textarea-val'));
|
||||
const expectedVal = `Textarea val is ${VALUE}.`;
|
||||
browser.wait(ExpectedConditions.textToBePresentInElement(displayElem, expectedVal), 5000);
|
||||
expect(displayElem.getText()).toEqual(expectedVal);
|
||||
});
|
||||
|
||||
function waitForBootstrap() {
|
||||
browser.wait(protractor.until.elementLocated(by.css(selector + ' h2')), 5000)
|
||||
.then(
|
||||
() => {
|
||||
const elem = element(by.css(selector + ' h2'));
|
||||
browser.wait(
|
||||
protractor.ExpectedConditions.textToBePresentInElement(elem, 'Input App'), 5000);
|
||||
},
|
||||
() => {
|
||||
// jasmine will timeout if this gets called too many times
|
||||
console.error('>> unexpected timeout -> browser.refresh()');
|
||||
browser.refresh();
|
||||
waitForBootstrap();
|
||||
});
|
||||
}
|
||||
});
|
||||
function waitForBootstrap() {
|
||||
browser.wait(protractor.until.elementLocated(by.css(selector + ' h2')), 5000)
|
||||
.then(
|
||||
() => {
|
||||
const elem = element(by.css(selector + ' h2'));
|
||||
browser.wait(
|
||||
protractor.ExpectedConditions.textToBePresentInElement(elem, 'Input App'),
|
||||
5000);
|
||||
},
|
||||
() => {
|
||||
// jasmine will timeout if this gets called too many times
|
||||
console.error('>> unexpected timeout -> browser.refresh()');
|
||||
browser.refresh();
|
||||
waitForBootstrap();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -6,53 +6,56 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {verifyNoBrowserErrors} from 'e2e_util/e2e_util';
|
||||
import {fixmeIvy} from '@angular/private/testing';
|
||||
import {ExpectedConditions, browser, by, element, protractor} from 'protractor';
|
||||
|
||||
describe('WebWorkers Kitchen Sink', function() {
|
||||
afterEach(() => {
|
||||
verifyNoBrowserErrors();
|
||||
browser.ignoreSynchronization = false;
|
||||
});
|
||||
const selector = 'hello-app .greeting';
|
||||
const URL = 'all/playground/src/web_workers/kitchen_sink/index.html';
|
||||
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
|
||||
|
||||
it('should greet', () => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
fixmeIvy('NullInjectorError: No provider for InjectionToken ROOT_CONTEXT_TOKEN!')
|
||||
.describe('WebWorkers Kitchen Sink', function() {
|
||||
afterEach(() => {
|
||||
verifyNoBrowserErrors();
|
||||
browser.ignoreSynchronization = false;
|
||||
});
|
||||
const selector = 'hello-app .greeting';
|
||||
const 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!');
|
||||
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!');
|
||||
|
||||
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!');
|
||||
});
|
||||
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 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);
|
||||
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!');
|
||||
});
|
||||
|
||||
const area = element.all(by.css('.sample-area')).first();
|
||||
expect(area.getText()).toEqual('(none)');
|
||||
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);
|
||||
|
||||
area.sendKeys('u');
|
||||
browser.wait(ExpectedConditions.textToBePresentInElement(area, 'U'), 5000);
|
||||
expect(area.getText()).toEqual('U');
|
||||
});
|
||||
});
|
||||
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');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -6,41 +6,44 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {verifyNoBrowserErrors} from 'e2e_util/e2e_util';
|
||||
import {fixmeIvy} from '@angular/private/testing';
|
||||
import {ExpectedConditions, browser, by, element, protractor} from 'protractor';
|
||||
|
||||
const URL = 'all/playground/src/web_workers/message_broker/index.html';
|
||||
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
|
||||
|
||||
describe('MessageBroker', function() {
|
||||
const URL = '/';
|
||||
|
||||
afterEach(() => {
|
||||
verifyNoBrowserErrors();
|
||||
browser.ignoreSynchronization = false;
|
||||
});
|
||||
fixmeIvy('NullInjectorError: No provider for InjectionToken ROOT_CONTEXT_TOKEN!')
|
||||
.describe('MessageBroker', function() {
|
||||
|
||||
it('should bootstrap', () => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
waitForBootstrap();
|
||||
expect(element(by.css('app h1')).getText()).toEqual('WebWorker MessageBroker Test');
|
||||
});
|
||||
afterEach(() => {
|
||||
verifyNoBrowserErrors();
|
||||
browser.ignoreSynchronization = false;
|
||||
});
|
||||
|
||||
it('should echo messages', () => {
|
||||
const VALUE = 'Hi There';
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
waitForBootstrap();
|
||||
it('should bootstrap', () => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
waitForBootstrap();
|
||||
expect(element(by.css('app h1')).getText()).toEqual('WebWorker MessageBroker Test');
|
||||
});
|
||||
|
||||
const input = element.all(by.css('#echo_input')).first();
|
||||
input.sendKeys(VALUE);
|
||||
element(by.css('#send_echo')).click();
|
||||
const area = element(by.css('#echo_result'));
|
||||
browser.wait(ExpectedConditions.textToBePresentInElement(area, VALUE), 5000);
|
||||
expect(area.getText()).toEqual(VALUE);
|
||||
});
|
||||
});
|
||||
it('should echo messages', () => {
|
||||
const VALUE = 'Hi There';
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
waitForBootstrap();
|
||||
|
||||
const input = element.all(by.css('#echo_input')).first();
|
||||
input.sendKeys(VALUE);
|
||||
element(by.css('#send_echo')).click();
|
||||
const area = element(by.css('#echo_result'));
|
||||
browser.wait(ExpectedConditions.textToBePresentInElement(area, VALUE), 5000);
|
||||
expect(area.getText()).toEqual(VALUE);
|
||||
});
|
||||
});
|
||||
|
||||
function waitForBootstrap(): void {
|
||||
browser.wait(protractor.until.elementLocated(by.css('app h1')), 15000);
|
||||
|
|
|
@ -6,79 +6,82 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {verifyNoBrowserErrors} from 'e2e_util/e2e_util';
|
||||
import {fixmeIvy} from '@angular/private/testing';
|
||||
import {browser, by, element, protractor} from 'protractor';
|
||||
|
||||
describe('WebWorker Router', () => {
|
||||
beforeEach(() => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get('/');
|
||||
});
|
||||
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
|
||||
|
||||
afterEach(() => {
|
||||
verifyNoBrowserErrors();
|
||||
browser.ignoreSynchronization = false;
|
||||
});
|
||||
fixmeIvy('NullInjectorError: No provider for InjectionToken ROOT_CONTEXT_TOKEN!')
|
||||
.describe('WebWorker Router', () => {
|
||||
beforeEach(() => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get('/');
|
||||
});
|
||||
|
||||
const contentSelector = 'app main h1';
|
||||
const navSelector = 'app nav ul';
|
||||
const baseUrl = 'all/playground/src/web_workers/router/index.html';
|
||||
afterEach(() => {
|
||||
verifyNoBrowserErrors();
|
||||
browser.ignoreSynchronization = false;
|
||||
});
|
||||
|
||||
it('should route on click', () => {
|
||||
browser.get(baseUrl);
|
||||
const contentSelector = 'app main h1';
|
||||
const navSelector = 'app nav ul';
|
||||
const baseUrl = '/';
|
||||
|
||||
waitForElement(contentSelector);
|
||||
let content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual('Start');
|
||||
it('should route on click', () => {
|
||||
browser.get(baseUrl);
|
||||
|
||||
const aboutBtn = element(by.css(navSelector + ' .about'));
|
||||
aboutBtn.click();
|
||||
waitForUrl(/\/about/);
|
||||
waitForElement(contentSelector);
|
||||
waitForElementText(contentSelector, 'About');
|
||||
content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual('About');
|
||||
expect(browser.getCurrentUrl()).toMatch(/\/about/);
|
||||
waitForElement(contentSelector);
|
||||
let content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual('Start');
|
||||
|
||||
const contactBtn = element(by.css(navSelector + ' .contact'));
|
||||
contactBtn.click();
|
||||
waitForUrl(/\/contact/);
|
||||
waitForElement(contentSelector);
|
||||
waitForElementText(contentSelector, 'Contact');
|
||||
content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual('Contact');
|
||||
expect(browser.getCurrentUrl()).toMatch(/\/contact/);
|
||||
});
|
||||
const aboutBtn = element(by.css(navSelector + ' .about'));
|
||||
aboutBtn.click();
|
||||
waitForUrl(/\/about/);
|
||||
waitForElement(contentSelector);
|
||||
waitForElementText(contentSelector, 'About');
|
||||
content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual('About');
|
||||
expect(browser.getCurrentUrl()).toMatch(/\/about/);
|
||||
|
||||
it('should load the correct route from the URL', () => {
|
||||
browser.get(baseUrl + '#/about');
|
||||
const contactBtn = element(by.css(navSelector + ' .contact'));
|
||||
contactBtn.click();
|
||||
waitForUrl(/\/contact/);
|
||||
waitForElement(contentSelector);
|
||||
waitForElementText(contentSelector, 'Contact');
|
||||
content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual('Contact');
|
||||
expect(browser.getCurrentUrl()).toMatch(/\/contact/);
|
||||
});
|
||||
|
||||
waitForElement(contentSelector);
|
||||
waitForElementText(contentSelector, 'About');
|
||||
const content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual('About');
|
||||
});
|
||||
it('should load the correct route from the URL', () => {
|
||||
browser.get(baseUrl + '#/about');
|
||||
|
||||
function waitForElement(selector: string): void {
|
||||
browser.wait(protractor.until.elementLocated(by.css(selector)), 15000);
|
||||
}
|
||||
waitForElement(contentSelector);
|
||||
waitForElementText(contentSelector, 'About');
|
||||
const content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual('About');
|
||||
});
|
||||
|
||||
function waitForElementText(contentSelector: string, expected: string): void {
|
||||
browser.wait(() => {
|
||||
const deferred = protractor.promise.defer();
|
||||
const elem = element(by.css(contentSelector));
|
||||
elem.getText().then((text: string) => { return deferred.fulfill(text === expected); });
|
||||
return deferred.promise;
|
||||
}, 5000);
|
||||
}
|
||||
function waitForElement(selector: string): void {
|
||||
browser.wait(protractor.until.elementLocated(by.css(selector)), 15000);
|
||||
}
|
||||
|
||||
function waitForUrl(regex: RegExp): void {
|
||||
browser.wait(() => {
|
||||
const deferred = protractor.promise.defer();
|
||||
browser.getCurrentUrl().then(
|
||||
(url: string) => { return deferred.fulfill(url.match(regex) !== null); });
|
||||
return deferred.promise;
|
||||
}, 5000);
|
||||
}
|
||||
});
|
||||
function waitForElementText(contentSelector: string, expected: string): void {
|
||||
browser.wait(() => {
|
||||
const deferred = protractor.promise.defer();
|
||||
const elem = element(by.css(contentSelector));
|
||||
elem.getText().then((text: string) => { return deferred.fulfill(text === expected); });
|
||||
return deferred.promise;
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
function waitForUrl(regex: RegExp): void {
|
||||
browser.wait(() => {
|
||||
const deferred = protractor.promise.defer();
|
||||
browser.getCurrentUrl().then(
|
||||
(url: string) => { return deferred.fulfill(url.match(regex) !== null); });
|
||||
return deferred.promise;
|
||||
}, 5000);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -6,27 +6,30 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {verifyNoBrowserErrors} from 'e2e_util/e2e_util';
|
||||
import {fixmeIvy} from '@angular/private/testing';
|
||||
import {browser, by, element, protractor} from 'protractor';
|
||||
|
||||
describe('WebWorkers Todo', function() {
|
||||
afterEach(() => {
|
||||
verifyNoBrowserErrors();
|
||||
browser.ignoreSynchronization = false;
|
||||
});
|
||||
import {verifyNoBrowserErrors} from '../../../../e2e_util/e2e_util';
|
||||
|
||||
const URL = 'all/playground/src/web_workers/todo/index.html';
|
||||
fixmeIvy('NullInjectorError: No provider for InjectionToken ROOT_CONTEXT_TOKEN!')
|
||||
.describe('WebWorkers Todo', function() {
|
||||
afterEach(() => {
|
||||
verifyNoBrowserErrors();
|
||||
browser.ignoreSynchronization = false;
|
||||
});
|
||||
|
||||
it('should bootstrap', () => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
const URL = '/';
|
||||
|
||||
waitForBootstrap();
|
||||
expect(element(by.css('#todoapp header')).getText()).toEqual('todos');
|
||||
});
|
||||
it('should bootstrap', () => {
|
||||
// This test can't wait for Angular as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get(URL);
|
||||
|
||||
});
|
||||
waitForBootstrap();
|
||||
expect(element(by.css('#todoapp header')).getText()).toEqual('todos');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function waitForBootstrap(): void {
|
||||
browser.wait(protractor.until.elementLocated(by.css('todo-app #todoapp')), 15000);
|
||||
|
|
Loading…
Reference in New Issue