Skip to content

Commit 21b528c

Browse files
committed
fixup! test(button-harness): add performance tests for buttons using the protractor harness env
1 parent b984590 commit 21b528c

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

test/benchmarks/material/button-harness/protractor.perf-spec.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ describe('performance overhead of the protractor harness', () => {
102102
ignoreBrowserSynchronization: true,
103103
params: [],
104104
setup: () => { loader = ProtractorHarnessEnvironment.loader(); },
105-
work: async () => await (await loader.getHarness(MatButtonHarness.with({text: '0'}))).click(),
105+
work: async () => {
106+
const button = await loader.getHarness(MatButtonHarness.with({text: '0'}));
107+
await button.click();
108+
},
106109
});
107110
});
108111

@@ -113,7 +116,10 @@ describe('performance overhead of the protractor harness', () => {
113116
ignoreBrowserSynchronization: true,
114117
params: [],
115118
setup: () => { loader = ProtractorHarnessEnvironment.loader(); },
116-
work: async () => await (await loader.getHarness(MatButtonHarness.with({text: '12'}))).click(),
119+
work: async () => {
120+
const button = await loader.getHarness(MatButtonHarness.with({text: '12'}));
121+
await button.click();
122+
},
117123
});
118124
});
119125

@@ -124,7 +130,10 @@ describe('performance overhead of the protractor harness', () => {
124130
ignoreBrowserSynchronization: true,
125131
params: [],
126132
setup: () => { loader = ProtractorHarnessEnvironment.loader(); },
127-
work: async () => await (await loader.getHarness(MatButtonHarness.with({text: '24'}))).click(),
133+
work: async () => {
134+
const button = await loader.getHarness(MatButtonHarness.with({text: '24'}));
135+
await button.click();
136+
},
128137
});
129138
});
130139

0 commit comments

Comments
 (0)