2017-12-11 18:15:57 +01:00
|
|
|
/**
|
|
|
|
* @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
|
|
|
|
*/
|
|
|
|
|
2017-12-19 15:01:05 -08:00
|
|
|
import {ɵrenderComponent as renderComponent} from '@angular/core';
|
2017-12-11 18:15:57 +01:00
|
|
|
|
|
|
|
import {bindAction, profile} from '../../util';
|
|
|
|
|
|
|
|
import {LargeTableComponent, createDom, destroyDom} from './table';
|
|
|
|
|
|
|
|
function noop() {}
|
|
|
|
|
|
|
|
export function main() {
|
|
|
|
let component: LargeTableComponent;
|
|
|
|
if (typeof window !== 'undefined') {
|
2017-12-11 16:30:46 +01:00
|
|
|
component = renderComponent<LargeTableComponent>(LargeTableComponent);
|
2017-12-11 18:15:57 +01:00
|
|
|
bindAction('#createDom', () => createDom(component));
|
|
|
|
bindAction('#destroyDom', () => destroyDom(component));
|
|
|
|
bindAction('#updateDomProfile', profile(() => createDom(component), noop, 'update'));
|
|
|
|
bindAction(
|
|
|
|
'#createDomProfile',
|
|
|
|
profile(() => createDom(component), () => destroyDom(component), 'create'));
|
|
|
|
}
|
|
|
|
}
|
2018-07-06 15:42:07 -07:00
|
|
|
|
2018-07-13 06:35:23 -07:00
|
|
|
const isBazel = location.pathname.indexOf('/all/') !== 0;
|
|
|
|
// isBazel needed while 'scripts/ci/test-e2e.sh test.e2e.protractor-e2e' is run
|
|
|
|
// on Travis
|
|
|
|
// TODO: port remaining protractor e2e tests to bazel protractor_web_test_suite rule
|
|
|
|
if (isBazel) {
|
|
|
|
main();
|
|
|
|
}
|