Skip to content

Commit f35aa51

Browse files
committed
fixup! test(button): add performance tests for mat-raised-button
1 parent 1da8b24 commit f35aa51

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

test/benchmarks/material/button/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ component_benchmark(
1515
"@npm//@angular/core",
1616
"@npm//@angular/platform-browser",
1717
"//src/material/button",
18-
"//src/cdk/a11y",
1918
],
2019
ng_srcs = [":app.module.ts"],
2120
prefix = "",

test/benchmarks/material/button/app.module.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,17 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
import {A11yModule} from '@angular/cdk/a11y';
98
import {Component, NgModule, ViewEncapsulation} from '@angular/core';
109
import {BrowserModule} from '@angular/platform-browser';
1110
import {MatButtonModule} from '@angular/material/button';
1211

13-
/**
14-
* @title Button benchmark component.
15-
*/
1612
@Component({
1713
selector: 'app-root',
1814
template: `
1915
<button id="show" (click)="show()">Show</button>
2016
<button id="hide" (click)="hide()">Hide</button>
2117
22-
<ng-container *ngIf="isVisible">
23-
<button mat-raised-button>Basic</button>
24-
</ng-container>
18+
<button *ngIf="isVisible" mat-raised-button>Basic</button>
2519
`,
2620
encapsulation: ViewEncapsulation.None,
2721
styleUrls: ['//src/material/core/theming/prebuilt/indigo-pink.css'],
@@ -38,11 +32,10 @@ export class ButtonBenchmarkApp {
3832
@NgModule({
3933
declarations: [ButtonBenchmarkApp],
4034
imports: [
41-
A11yModule,
4235
BrowserModule,
4336
MatButtonModule,
4437
],
4538
providers: [],
46-
bootstrap: [ButtonBenchmarkApp]
39+
bootstrap: [ButtonBenchmarkApp],
4740
})
4841
export class AppModule {}

test/benchmarks/material/checkbox/app.module.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ import {MatCheckboxModule} from '@angular/material/checkbox';
1717
<button id="hide" (click)="hide()">Hide</button>
1818
<button id="indeterminate" (click)="indeterminate()">Indeterminate</button>
1919
20-
<ng-container *ngIf="isVisible">
21-
<mat-checkbox
22-
[checked]="isChecked"
23-
[indeterminate]="isIndeterminate"
24-
(change)="toggleIsChecked()">
25-
Check me!</mat-checkbox>
26-
</ng-container>
20+
<mat-checkbox *ngIf="isVisible"
21+
[checked]="isChecked"
22+
[indeterminate]="isIndeterminate"
23+
(change)="toggleIsChecked()">
24+
Check me!</mat-checkbox>
2725
`,
2826
encapsulation: ViewEncapsulation.None,
2927
styleUrls: ['//src/material/core/theming/prebuilt/indigo-pink.css'],
@@ -47,6 +45,6 @@ export class CheckboxBenchmarkApp {
4745
MatCheckboxModule,
4846
],
4947
providers: [],
50-
bootstrap: [CheckboxBenchmarkApp]
48+
bootstrap: [CheckboxBenchmarkApp],
5149
})
5250
export class AppModule {}

0 commit comments

Comments
 (0)