Wagner Maciel b7f2a033df feat(dev-infra): exposed new rule 'component_benchmark' via dev_infra (#36434)
* Move tools/brotli-cli, tools/browsers, tools/components,
  tools/ng_rollup_bundle, and modules/e2e_util to dev-infra/benchmarking
* Fix imports and references to moved folders and files
* Set up BUILD.bazel files for moved folders so they can be packaged with
  dev-infra's :npm_package

PR Close #36434
2020-04-23 13:31:53 -07:00

37 lines
1.1 KiB
TypeScript

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {browser, by, element} from 'protractor';
import {verifyNoBrowserErrors} from '../../../../dev-infra/benchmark/driver-utilities';
describe('ngUpgrade', function() {
const URL = '/';
beforeEach(function() {
browser.rootEl = 'body';
browser.get(URL);
});
afterEach(function() {
browser.useAllAngular2AppRoots();
verifyNoBrowserErrors();
});
it('should bootstrap AngularJS and Angular apps together', function() {
const ng1NameInput = element(by.css('input[ng-model="name"]'));
expect(ng1NameInput.getAttribute('value')).toEqual('World');
const projectedGreetingEl = element(by.css('.projected-content .greeting'));
const upgradedNg1ComponentEl = element(by.css('ng1-user'));
expect(projectedGreetingEl.getText()).toMatch(/World!$/);
expect(upgradedNg1ComponentEl.getText()).toMatch(/^User: World/);
});
});