Skip to content

Commit df04538

Browse files
committed
fix BUILD setup
1 parent a8a20a1 commit df04538

File tree

11 files changed

+74
-20
lines changed

11 files changed

+74
-20
lines changed

src/cdk-experimental/testing/BUILD.bazel

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package(default_visibility = ["//visibility:public"])
22

3-
load("//tools:defaults.bzl", "ng_module", "ng_web_test_suite", "ts_library")
3+
load("//tools:defaults.bzl", "ng_module", "ng_web_test_suite")
44
load("@npm_angular_bazel//:index.bzl", "protractor_web_test_suite")
55

66
ng_module(
@@ -9,15 +9,9 @@ ng_module(
99
["**/*.ts"],
1010
exclude = [
1111
"**/*.spec.ts",
12-
"tests/**",
1312
],
1413
),
1514
module_name = "@angular/cdk-experimental/testing",
16-
deps = [
17-
"//src/cdk/testing",
18-
"@npm//@angular/core",
19-
"@npm//protractor",
20-
],
2115
)
2216

2317
ng_web_test_suite(
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package(default_visibility = ["//visibility:public"])
2+
3+
load("//tools:defaults.bzl", "ts_library")
4+
5+
ts_library(
6+
name = "protractor",
7+
srcs = glob(
8+
["**/*.ts"],
9+
exclude = ["**/*.spec.ts"],
10+
),
11+
module_name = "@angular/cdk-experimental/testing/protractor",
12+
deps = [
13+
"//src/cdk-experimental/testing",
14+
"@npm//protractor",
15+
],
16+
)

src/cdk-experimental/testing/protractor/index.ts

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

9-
export * from './protractor-element';
10-
export * from './protractor-harness-environment';
9+
export * from './public-api';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
export * from './protractor-element';
10+
export * from './protractor-harness-environment';
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package(default_visibility = ["//visibility:public"])
2+
3+
load("//tools:defaults.bzl", "ts_library")
4+
5+
ts_library(
6+
name = "testbed",
7+
srcs = glob(
8+
["**/*.ts"],
9+
exclude = ["**/*.spec.ts"],
10+
),
11+
module_name = "@angular/cdk-experimental/testing/testbed",
12+
deps = [
13+
"//src/cdk-experimental/testing",
14+
"//src/cdk/testing",
15+
"@npm//@angular/core",
16+
],
17+
)

src/cdk-experimental/testing/testbed/index.ts

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

9-
export * from './testbed-harness-environment';
10-
export * from './unit-test-element';
9+
export * from './public-api';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
export * from './testbed-harness-environment';
10+
export * from './unit-test-element';

src/cdk-experimental/testing/tests/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ ng_test_library(
3636
":test_components",
3737
":test_harnesses",
3838
"//src/cdk-experimental/testing",
39+
"//src/cdk-experimental/testing/testbed",
3940
],
4041
)
4142

@@ -45,5 +46,6 @@ ng_e2e_test_library(
4546
deps = [
4647
":test_harnesses",
4748
"//src/cdk-experimental/testing",
49+
"//src/cdk-experimental/testing/protractor",
4850
],
4951
)

src/cdk-experimental/testing/tests/protractor.e2e.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import {HarnessLoader} from '@angular/cdk-experimental/testing';
2+
import {ProtractorHarnessEnvironment} from '@angular/cdk-experimental/testing/protractor';
13
import {browser} from 'protractor';
2-
import {HarnessLoader} from '../component-harness';
3-
import {ProtractorHarnessEnvironment} from '../protractor';
44
import {MainComponentHarness} from './harnesses/main-component-harness';
55
import {SubComponentHarness} from './harnesses/sub-component-harness';
66

src/cdk-experimental/testing/tests/testbed.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import {HarnessLoader} from '@angular/cdk-experimental/testing';
2+
import {TestbedHarnessEnvironment} from '@angular/cdk-experimental/testing/testbed';
13
import {ComponentFixture, TestBed} from '@angular/core/testing';
2-
import {HarnessLoader} from '../component-harness';
3-
import {TestbedHarnessEnvironment} from '../testbed/index';
44
import {MainComponentHarness} from './harnesses/main-component-harness';
55
import {SubComponentHarness} from './harnesses/sub-component-harness';
66
import {TestComponentsModule} from './test-components-module';

src/material-experimental/mdc-checkbox/BUILD.bazel

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ ng_module(
88
name = "mdc-checkbox",
99
srcs = glob(
1010
["**/*.ts"],
11-
exclude = ["**/*.spec.ts", "harness/**"],
11+
exclude = [
12+
"**/*.spec.ts",
13+
"harness/**",
14+
],
1215
),
1316
assets = [":checkbox_scss"] + glob(["**/*.html"]),
1417
module_name = "@angular/material-experimental/mdc-checkbox",
@@ -27,11 +30,14 @@ ng_module(
2730

2831
ts_library(
2932
name = "harness",
30-
srcs = glob(["harness/**/*.ts"], exclude = ["**/*.spec.ts"]),
33+
srcs = glob(
34+
["harness/**/*.ts"],
35+
exclude = ["**/*.spec.ts"],
36+
),
3137
deps = [
32-
"//src/cdk/coercion",
3338
"//src/cdk-experimental/testing",
34-
]
39+
"//src/cdk/coercion",
40+
],
3541
)
3642

3743
sass_library(
@@ -66,8 +72,9 @@ ng_test_library(
6672
deps = [
6773
":harness",
6874
":mdc-checkbox",
69-
"//src/cdk/testing",
7075
"//src/cdk-experimental/testing",
76+
"//src/cdk-experimental/testing/testbed",
77+
"//src/cdk/testing",
7178
"//src/material/checkbox",
7279
"@npm//@angular/forms",
7380
"@npm//@angular/platform-browser",

0 commit comments

Comments
 (0)