forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlargeform_spec.ts
35 lines (30 loc) · 1.05 KB
/
largeform_spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* @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';
import {$, By, element} from 'protractor';
describe('largeform benchmark spec', () => {
afterEach(verifyNoBrowserErrors);
it('should work for ng2', () => {
testLargeformBenchmark({
url: 'all/benchmarks/src/largeform/ng2/index.html',
});
});
function testLargeformBenchmark(
openConfig: {url: string, ignoreBrowserSynchronization?: boolean}) {
openBrowser({
url: openConfig.url,
params: [{name: 'copies', value: 1}],
ignoreBrowserSynchronization: openConfig.ignoreBrowserSynchronization,
});
$('#createDom').click();
expect(element.all(By.css('input[name=value0]')).get(0).getAttribute('value'))
.toBe('someValue0');
$('#destroyDom').click();
expect(element.all(By.css('input[name=value0]')).count()).toBe(0);
}
});