test: disable failing ivy example e2e tests (#28402)

PR Close #28402
This commit is contained in:
Paul Gschwendtner 2019-01-28 22:00:36 +01:00 committed by Jason Aden
parent 98e5af1480
commit 29513296fb
5 changed files with 123 additions and 101 deletions

View File

@ -6,6 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {fixmeIvy} from '@angular/private/testing';
import {$, ExpectedConditions, browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../test-utils';
@ -16,8 +17,11 @@ function waitForElement(selector: string) {
browser.wait(EC.presenceOf($(selector)), 20000);
}
describe('ngComponentOutlet', () => {
const URL = 'common/ngComponentOutlet/ts/';
fixmeIvy(
'unknown. Run "yarn bazel run packages/examples/common:devserver --define=compile=aot" ' +
'to debug')
.describe('ngComponentOutlet', () => {
const URL = '/ngComponentOutlet';
afterEach(verifyNoBrowserErrors);
describe('ng-component-outlet-example', () => {
@ -30,7 +34,9 @@ describe('ngComponentOutlet', () => {
it('should render complete', () => {
browser.get(URL);
waitForElement('ng-component-outlet-complete-example');
expect(element.all(by.css('complete-component')).getText()).toEqual(['Complete: AhojSvet!']);
expect(element.all(by.css('complete-component')).getText()).toEqual([
'Complete: AhojSvet!'
]);
});
it('should render other module', () => {
@ -41,4 +47,4 @@ describe('ngComponentOutlet', () => {
]);
});
});
});
});

View File

@ -6,6 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {fixmeIvy} from '@angular/private/testing';
import {$, ExpectedConditions, browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../test-utils';
@ -44,7 +45,9 @@ describe('ngIf', () => {
describe('ng-if-then-else', () => {
let comp = 'ng-if-then-else';
it('should hide/show content', () => {
fixmeIvy('unknown. Run "yarn bazel run packages/examples/common:devserver" to debug')
.it('should hide/show content', () => {
browser.get(URL);
waitForElement(comp);
expect(element.all(by.css(comp)).get(0).getText())
@ -54,7 +57,8 @@ describe('ngIf', () => {
.toEqual('hideSwitch Primary show = true\nSecondary text to show');
element.all(by.css(comp + ' button')).get(0).click();
expect(element.all(by.css(comp)).get(0).getText())
.toEqual('showSwitch Primary show = false\nAlternate text while primary text is hidden');
.toEqual(
'showSwitch Primary show = false\nAlternate text while primary text is hidden');
});
});

View File

@ -6,17 +6,22 @@
* found in the LICENSE file at https://angular.io/license
*/
import {fixmeIvy} from '@angular/private/testing';
import {ElementArrayFinder, ElementFinder, browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../_common/e2e_util';
describe('simpleNgModel example', () => {
import {verifyNoBrowserErrors} from '../../../../test-utils';
fixmeIvy(
'unkown; verifyNoBrowserErrors fails due to "ExpressionChangedAfterItHasBeenCheckedError"' +
'Debug by running "yarn bazel run //packages/examples/forms:devserver --define=compile=aot')
.describe('simpleNgModel example', () => {
afterEach(verifyNoBrowserErrors);
let input: ElementFinder;
let paragraphs: ElementArrayFinder;
let button: ElementFinder;
beforeEach(() => {
browser.get('/forms/ts/simpleNgModel/index.html');
browser.get('/simpleNgModel');
input = element(by.css('input'));
paragraphs = element.all(by.css('p'));
button = element(by.css('button'));
@ -42,4 +47,4 @@ describe('simpleNgModel example', () => {
expect(input.getAttribute('value')).toEqual('Nancy');
});
});
});

View File

@ -6,6 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {fixmeIvy} from '@angular/private/testing';
import {browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../../test-utils';
@ -28,7 +29,8 @@ describe('upgrade/static (full)', () => {
expect(heroComponents.count()).toEqual(3);
});
it('should add a new hero when the "Add Hero" button is pressed', () => {
fixmeIvy('unknown; <ng1Hero> component does not seem to render name & description')
.it('should add a new hero when the "Add Hero" button is pressed', () => {
const addHeroButton = element.all(by.css('button')).last();
expect(addHeroButton.getText()).toEqual('Add Hero');
addHeroButton.click();
@ -36,7 +38,8 @@ describe('upgrade/static (full)', () => {
expect(heroComponents.last().element(by.css('h2')).getText()).toEqual('Kamala Khan');
});
it('should remove a hero when the "Remove" button is pressed', () => {
fixmeIvy('unknown; <ng1Hero> component does not seem to render name & description')
.it('should remove a hero when the "Remove" button is pressed', () => {
let firstHero = element.all(by.css('ng1-hero')).get(0);
expect(firstHero.element(by.css('h2')).getText()).toEqual('Superman');

View File

@ -6,6 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {fixmeIvy} from '@angular/private/testing';
import {ElementArrayFinder, ElementFinder, browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../../test-utils';
@ -58,7 +59,8 @@ describe('upgrade/static (lite)', () => {
it('should initially not render the heroes', () => expectHeroes(false));
it('should toggle the heroes when clicking the "show/hide" button', () => {
fixmeIvy('unknown; <ng1Hero> component does not seem to render name & description')
.it('should toggle the heroes when clicking the "show/hide" button', () => {
showHideBtn.click();
expectHeroes(true);
@ -66,7 +68,8 @@ describe('upgrade/static (lite)', () => {
expectHeroes(false);
});
it('should add a new hero when clicking the "add" button', () => {
fixmeIvy('unknown; <ng1Hero> component does not seem to render name & description')
.it('should add a new hero when clicking the "add" button', () => {
showHideBtn.click();
ng2HeroesAddBtn.click();
@ -74,7 +77,8 @@ describe('upgrade/static (lite)', () => {
expect(ng1Heroes.last()).toHaveName('Kamala Khan');
});
it('should remove a hero when clicking its "remove" button', () => {
fixmeIvy('unknown; <ng1Hero> component does not seem to render name & description')
.it('should remove a hero when clicking its "remove" button', () => {
showHideBtn.click();
const firstHero = ng1Heroes.first();