2016-08-30 12:29:39 -04: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
|
|
|
|
*/
|
|
|
|
|
|
|
|
import {openBrowser, verifyNoBrowserErrors} from 'e2e_util/e2e_util';
|
|
|
|
|
2016-08-30 17:17:37 -04:00
|
|
|
describe('tree benchmark spec', () => {
|
2016-08-30 12:29:39 -04:00
|
|
|
|
|
|
|
afterEach(verifyNoBrowserErrors);
|
|
|
|
|
2016-08-30 17:17:37 -04:00
|
|
|
it('should work for ng2', () => {
|
|
|
|
testTreeBenchmark({
|
|
|
|
url: 'all/benchmarks/src/tree/ng2/index.html',
|
2016-08-30 12:29:39 -04:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2016-08-30 17:17:37 -04:00
|
|
|
it('should work for the baseline', () => {
|
|
|
|
testTreeBenchmark({
|
|
|
|
url: 'all/benchmarks/src/tree/baseline/index.html',
|
|
|
|
ignoreBrowserSynchronization: true,
|
2016-08-30 12:29:39 -04:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2016-08-30 16:44:52 -04:00
|
|
|
it('should work for polymer binary tree', () => {
|
2016-08-30 17:17:37 -04:00
|
|
|
testTreeBenchmark({
|
2016-08-30 12:29:39 -04:00
|
|
|
url: 'all/benchmarks/src/tree/polymer/index.html',
|
|
|
|
ignoreBrowserSynchronization: true,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2016-08-30 16:44:52 -04:00
|
|
|
it('should work for polymer leaves', () => {
|
2016-08-30 17:17:37 -04:00
|
|
|
testTreeBenchmark({
|
2016-08-30 16:44:52 -04:00
|
|
|
url: 'all/benchmarks/src/tree/polymer_leaves/index.html',
|
|
|
|
ignoreBrowserSynchronization: true,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2016-08-30 17:17:37 -04:00
|
|
|
function testTreeBenchmark(openConfig: {url: string, ignoreBrowserSynchronization?: boolean}) {
|
|
|
|
openBrowser(openConfig);
|
|
|
|
$('#createDom').click();
|
|
|
|
expect($('#root').getText()).toContain('0');
|
|
|
|
$('#destroyDom').click();
|
|
|
|
expect($('#root').getText()).toEqual('');
|
|
|
|
}
|
2016-08-30 12:29:39 -04:00
|
|
|
});
|