Skip to content

Commit 9ec99a2

Browse files
committed
fixup! test(button-harness): add performance tests for buttons using the protractor harness env
1 parent 0ea4cd7 commit 9ec99a2

File tree

3 files changed

+12
-23
lines changed

3 files changed

+12
-23
lines changed

test/benchmarks/material/button-harness/BUILD.bazel

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
load("@npm_angular_dev_infra_private//benchmark/component_benchmark:component_benchmark.bzl", "component_benchmark")
2-
<<<<<<< HEAD
32
load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library")
43

54
package(default_visibility = ["//visibility:public"])
@@ -39,29 +38,14 @@ component_benchmark(
3938
driver_deps = [
4039
":constants",
4140
":protractor-benchmark-utilities",
42-
=======
43-
load("//tools:defaults.bzl", "ng_e2e_test_library", "ng_test_library", "ng_web_test_suite", "ts_library")
44-
45-
# TODO(wagnermaciel): Update this target to provide indigo-pink in a way that doesn't require having to import it with
46-
# stylesUrls inside the components once `component_benchmark` supports asset injection.
47-
48-
component_benchmark(
49-
name = "benchmark",
50-
driver = ":protractor.perf-spec.ts",
51-
driver_deps = [
52-
"@npm//@angular/dev-infra-private",
53-
>>>>>>> e2db57750 (test(button-harness): add performance tests for buttons using the protractor harness env)
5441
"@npm//protractor",
5542
"@npm//@types/jasmine",
5643
"//src/cdk/testing",
5744
"//src/material/button/testing",
5845
"//src/cdk/testing/protractor",
5946
],
6047
ng_deps = [
61-
<<<<<<< HEAD
6248
":constants",
63-
=======
64-
>>>>>>> e2db57750 (test(button-harness): add performance tests for buttons using the protractor harness env)
6549
"@npm//@angular/core",
6650
"@npm//@angular/platform-browser",
6751
"//src/material/button",
@@ -70,7 +54,6 @@ component_benchmark(
7054
prefix = "",
7155
styles = ["//src/material/prebuilt-themes:indigo-pink"],
7256
)
73-
<<<<<<< HEAD
7457

7558
# TestbedHarnessEnvironment
7659

@@ -92,5 +75,3 @@ ng_web_test_suite(
9275
name = "unit_benchmark_tests",
9376
deps = [":unit_tests_lib"],
9477
)
95-
=======
96-
>>>>>>> e2db57750 (test(button-harness): add performance tests for buttons using the protractor harness env)

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {Component, NgModule, ViewEncapsulation} from '@angular/core';
1010
import {BrowserModule} from '@angular/platform-browser';
1111
import {MatButtonModule} from '@angular/material/button';
1212
<<<<<<< HEAD
13+
<<<<<<< HEAD
1314
import {NUM_BUTTONS} from './constants';
1415

1516
/** component: mat-button-harness-test */
@@ -25,20 +26,27 @@ import {NUM_BUTTONS} from './constants';
2526
export class ButtonHarnessTest {
2627
vals = Array.from({ length: NUM_BUTTONS }, (_, i) => i);
2728
=======
29+
=======
30+
import {NUM_BUTTONS} from './constants';
31+
>>>>>>> 72a4ae020 (fixup! test(button-harness): add performance tests for buttons using the protractor harness env)
2832

2933
/** component: mat-raised-button-harness-test */
3034

3135
@Component({
32-
selector: 'app-root',
36+
selector: 'app-root',
3337
template: `
3438
<button *ngFor="let val of vals" mat-button> {{ val }} </button>
35-
`,
36-
encapsulation: ViewEncapsulation.None,
39+
`,
40+
encapsulation: ViewEncapsulation.None,
3741
styleUrls: ['//src/material/core/theming/prebuilt/indigo-pink.css'],
3842
})
3943
export class ButtonHarnessTest {
44+
<<<<<<< HEAD
4045
vals = Array.from({ length: 100 }, (_, i) => i);
4146
>>>>>>> e2db57750 (test(button-harness): add performance tests for buttons using the protractor harness env)
47+
=======
48+
vals = Array.from({ length: NUM_BUTTONS }, (_, i) => i);
49+
>>>>>>> 72a4ae020 (fixup! test(button-harness): add performance tests for buttons using the protractor harness env)
4250
}
4351

4452
@NgModule({

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {HarnessLoader} from '@angular/cdk/testing';
9+
import {HarnessLoader, HarnessPredicate} from '@angular/cdk/testing';
1010
import {MatButtonHarness} from '@angular/material/button/testing/button-harness';
1111
import {ProtractorHarnessEnvironment} from '@angular/cdk/testing/protractor';
1212
import {$$, element, by, browser} from 'protractor';

0 commit comments

Comments
 (0)