This reverts commit 351610ca8d
.
PR Close #28438
This commit is contained in:
@ -6,7 +6,6 @@
|
||||
* 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';
|
||||
|
||||
@ -29,28 +28,26 @@ describe('upgrade/static (full)', () => {
|
||||
expect(heroComponents.count()).toEqual(3);
|
||||
});
|
||||
|
||||
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();
|
||||
const heroComponents = element.all(by.css('ng1-hero'));
|
||||
expect(heroComponents.last().element(by.css('h2')).getText()).toEqual('Kamala Khan');
|
||||
});
|
||||
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();
|
||||
const heroComponents = element.all(by.css('ng1-hero'));
|
||||
expect(heroComponents.last().element(by.css('h2')).getText()).toEqual('Kamala Khan');
|
||||
});
|
||||
|
||||
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');
|
||||
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');
|
||||
|
||||
const removeHeroButton = firstHero.element(by.css('button'));
|
||||
expect(removeHeroButton.getText()).toEqual('Remove');
|
||||
removeHeroButton.click();
|
||||
const removeHeroButton = firstHero.element(by.css('button'));
|
||||
expect(removeHeroButton.getText()).toEqual('Remove');
|
||||
removeHeroButton.click();
|
||||
|
||||
const heroComponents = element.all(by.css('ng1-hero'));
|
||||
expect(heroComponents.count()).toEqual(2);
|
||||
const heroComponents = element.all(by.css('ng1-hero'));
|
||||
expect(heroComponents.count()).toEqual(2);
|
||||
|
||||
firstHero = element.all(by.css('ng1-hero')).get(0);
|
||||
expect(firstHero.element(by.css('h2')).getText()).toEqual('Wonder Woman');
|
||||
});
|
||||
firstHero = element.all(by.css('ng1-hero')).get(0);
|
||||
expect(firstHero.element(by.css('h2')).getText()).toEqual('Wonder Woman');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user