refactor(benchpress): added tsconfig and fixed ts errors (#35127)

PR Close #35127
This commit is contained in:
Wagner Maciel
2020-02-03 10:59:39 -08:00
committed by Miško Hevery
parent 6ddf5508db
commit e210715958
6 changed files with 49 additions and 16 deletions

View File

@ -9,7 +9,6 @@ ts_library(
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//modules/e2e_util",
"@npm//@types/jasminewd2",
"@npm//protractor",
],
)

View File

@ -28,24 +28,24 @@ const SCENARIOS = [
describe('styling benchmark spec', () => {
afterEach(verifyNoBrowserErrors);
it('should render and interact to update and detect changes', () => {
it('should render and interact to update and detect changes', async () => {
openBrowser({url: '/', ignoreBrowserSynchronization: true});
create();
const items = element.all(by.css('styling-bindings button'));
expect(items.count()).toBe(2000);
expect(items.first().getAttribute('title')).toBe('bar');
expect(await items.count()).toBe(2000);
expect(await items.first().getAttribute('title')).toBe('bar');
update();
expect(items.first().getAttribute('title')).toBe('baz');
expect(await items.first().getAttribute('title')).toBe('baz');
});
it('should render and run noop change detection', () => {
it('should render and run noop change detection', async () => {
openBrowser({url: '/', ignoreBrowserSynchronization: true});
create();
const items = element.all(by.css('styling-bindings button'));
expect(items.count()).toBe(2000);
expect(items.first().getAttribute('title')).toBe('bar');
expect(await items.count()).toBe(2000);
expect(await items.first().getAttribute('title')).toBe('bar');
detectChanges();
expect(items.first().getAttribute('title')).toBe('bar');
expect(await items.first().getAttribute('title')).toBe('bar');
});
// Create benchmarks for each possible test scenario.