Skip to content

Commit b25b412

Browse files
committed
fixup! test(tabs): add performance tests for mat-tabs
1 parent 86f042e commit b25b412

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

test/benchmarks/material/tabs/tabs.perf-spec.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,14 @@ describe('tabs performance benchmarks', () => {
4848
});
4949

5050
it('switches between tabs', async() => {
51-
let tabs: any[];
52-
let tabToClick = 0;
5351
await runBenchmark({
5452
id: 'tab-switching',
5553
url: '',
5654
ignoreBrowserSynchronization: true,
5755
params: [],
58-
setup: async() => {
59-
await $('#show-three-tabs').click();
60-
tabs = await $$('.mat-tab-label');
61-
},
62-
prepare: async() => {
63-
tabToClick = tabToClick < tabs.length - 1 ? tabToClick + 1 : 0;
64-
},
65-
work: async() => await tabs[tabToClick].click(),
56+
setup: async() => await $('#show-three-tabs').click(),
57+
prepare: async() => await $('#mat-tab-label-0-0').click(),
58+
work: async() => await $('#mat-tab-label-0-1').click(),
6659
});
6760
});
6861

0 commit comments

Comments
 (0)