Skip to content

feat(cdk/testing): merge all code from cdk-experimental/testing into cdk/testing #17026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
/src/cdk-experimental/dialog/** @jelbourn @josephperrott @crisbeto
/src/cdk-experimental/popover-edit/** @kseamon @andrewseguin
/src/cdk-experimental/scrolling/** @mmalerba
/src/cdk-experimental/testing/** @mmalerba

# Docs examples & guides
/guides/** @jelbourn
Expand Down
31 changes: 0 additions & 31 deletions src/cdk-experimental/testing/BUILD.bazel

This file was deleted.

11 changes: 0 additions & 11 deletions src/cdk-experimental/testing/public-api.ts

This file was deleted.

9 changes: 0 additions & 9 deletions src/cdk-experimental/testing/testbed/index.ts

This file was deleted.

19 changes: 16 additions & 3 deletions src/cdk/testing/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
package(default_visibility = ["//visibility:public"])

load("//tools:defaults.bzl", "ng_module")
load("//src/e2e-app:test_suite.bzl", "e2e_test_suite")
load("//tools:defaults.bzl", "ng_module", "ng_web_test_suite")

ng_module(
name = "testing",
srcs = glob(
["**/*.ts"],
exclude = ["**/*.spec.ts"],
exclude = [
"**/*.spec.ts",
],
),
module_name = "@angular/cdk/testing",
)

ng_web_test_suite(
name = "unit_tests",
deps = ["//src/cdk/testing/tests:unit_test_sources"],
)

e2e_test_suite(
name = "e2e_tests",
deps = [
"@npm//@angular/core",
"//src/cdk/testing/tests:e2e_test_sources",
"@npm//protractor",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ ts_library(
["**/*.ts"],
exclude = ["**/*.spec.ts"],
),
module_name = "@angular/cdk-experimental/testing/protractor",
module_name = "@angular/cdk/testing/protractor",
deps = [
"//src/cdk-experimental/testing",
"//src/cdk/testing",
"@npm//protractor",
],
Expand Down
5 changes: 4 additions & 1 deletion src/cdk/testing/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
* found in the LICENSE file at https://angular.io/license
*/

export * from './component-harness';
export * from './dispatch-events';
export * from './element-focus';
export * from './event-objects';
export * from './harness-environment';
export * from './test-element';
export * from './type-in-element';
export * from './element-focus';
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ ts_library(
["**/*.ts"],
exclude = ["**/*.spec.ts"],
),
module_name = "@angular/cdk-experimental/testing/testbed",
module_name = "@angular/cdk/testing/testbed",
deps = [
"//src/cdk-experimental/testing",
"//src/cdk/keycodes",
"//src/cdk/testing",
"@npm//@angular/core",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ng_module(
],
),
assets = glob(["**/*.html"]),
module_name = "@angular/cdk-experimental/testing/tests",
module_name = "@angular/cdk/testing/tests",
deps = [
"//src/cdk/keycodes",
"@npm//@angular/forms",
Expand All @@ -23,7 +23,7 @@ ts_library(
name = "test_harnesses",
srcs = glob(["harnesses/**/*.ts"]),
deps = [
"//src/cdk-experimental/testing",
"//src/cdk/testing",
],
)

Expand All @@ -36,8 +36,8 @@ ng_test_library(
deps = [
":test_components",
":test_harnesses",
"//src/cdk-experimental/testing",
"//src/cdk-experimental/testing/testbed",
"//src/cdk/testing",
"//src/cdk/testing/testbed",
],
)

Expand All @@ -46,7 +46,7 @@ ng_e2e_test_library(
srcs = glob(["**/*.e2e.spec.ts"]),
deps = [
":test_harnesses",
"//src/cdk-experimental/testing",
"//src/cdk-experimental/testing/protractor",
"//src/cdk/testing",
"//src/cdk/testing/protractor",
],
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {HarnessLoader} from '@angular/cdk-experimental/testing';
import {ProtractorHarnessEnvironment} from '@angular/cdk-experimental/testing/protractor';
import {HarnessLoader} from '@angular/cdk/testing';
import {ProtractorHarnessEnvironment} from '@angular/cdk/testing/protractor';
import {browser} from 'protractor';
import {MainComponentHarness} from './harnesses/main-component-harness';
import {SubComponentHarness} from './harnesses/sub-component-harness';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {HarnessLoader} from '@angular/cdk-experimental/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk-experimental/testing/testbed';
import {HarnessLoader} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {MainComponentHarness} from './harnesses/main-component-harness';
import {SubComponentHarness} from './harnesses/sub-component-harness';
Expand Down
2 changes: 1 addition & 1 deletion src/e2e-app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ ng_module(
deps = [
"//src/cdk-experimental/dialog",
"//src/cdk-experimental/scrolling",
"//src/cdk-experimental/testing/tests:test_components",
"//src/cdk/drag-drop",
"//src/cdk/overlay",
"//src/cdk/scrolling",
"//src/cdk/testing/tests:test_components",
"//src/material-examples:examples",
"//src/material-experimental/mdc-button",
"//src/material-experimental/mdc-card",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {TestComponentsModule} from '@angular/cdk-experimental/testing/tests';
import {TestComponentsModule} from '@angular/cdk/testing/tests';
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
Expand Down
5 changes: 2 additions & 3 deletions src/material-experimental/mdc-autocomplete/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ ts_library(
exclude = ["**/*.spec.ts"],
),
deps = [
"//src/cdk-experimental/testing",
"//src/cdk/coercion",
"//src/cdk/testing",
],
)

Expand Down Expand Up @@ -65,11 +65,10 @@ ng_test_library(
deps = [
":harness",
":mdc-autocomplete",
"//src/cdk-experimental/testing",
"//src/cdk-experimental/testing/testbed",
"//src/cdk/overlay",
"//src/cdk/platform",
"//src/cdk/testing",
"//src/cdk/testing/testbed",
"//src/material/autocomplete",
"@npm//@angular/platform-browser",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/

import {BaseHarnessFilters} from '@angular/cdk-experimental/testing';
import {BaseHarnessFilters} from '@angular/cdk/testing';

export interface AutocompleteHarnessFilters extends BaseHarnessFilters {}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {HarnessLoader} from '@angular/cdk-experimental/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk-experimental/testing/testbed';
import {HarnessLoader} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {Component, Type} from '@angular/core';
import {ComponentFixture, TestBed, inject} from '@angular/core/testing';
import {MatAutocompleteModule} from '@angular/material/autocomplete';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {ComponentHarness, HarnessPredicate, TestElement} from '@angular/cdk-experimental/testing';
import {ComponentHarness, HarnessPredicate, TestElement} from '@angular/cdk/testing';
import {coerceBooleanProperty} from '@angular/cdk/coercion';
import {AutocompleteHarnessFilters} from './autocomplete-harness-filters';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {ComponentHarness} from '@angular/cdk-experimental/testing';
import {ComponentHarness} from '@angular/cdk/testing';


/**
Expand Down
5 changes: 2 additions & 3 deletions src/material-experimental/mdc-button/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ ts_library(
exclude = ["**/*.spec.ts"],
),
deps = [
"//src/cdk-experimental/testing",
"//src/cdk/coercion",
"//src/cdk/testing",
],
)

Expand Down Expand Up @@ -100,10 +100,9 @@ ng_test_library(
deps = [
":harness",
":mdc-button",
"//src/cdk-experimental/testing",
"//src/cdk-experimental/testing/testbed",
"//src/cdk/platform",
"//src/cdk/testing",
"//src/cdk/testing/testbed",
"//src/material/button",
"@npm//@angular/platform-browser",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {BaseHarnessFilters} from '@angular/cdk-experimental/testing';
import {BaseHarnessFilters} from '@angular/cdk/testing';

export interface ButtonHarnessFilters extends BaseHarnessFilters {
text?: string | RegExp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {HarnessLoader} from '@angular/cdk-experimental/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk-experimental/testing/testbed';
import {HarnessLoader} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {Platform, PlatformModule} from '@angular/cdk/platform';
import {Component} from '@angular/core';
import {ComponentFixture, inject, TestBed} from '@angular/core/testing';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {ComponentHarness, HarnessPredicate} from '@angular/cdk-experimental/testing';
import {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';
import {coerceBooleanProperty} from '@angular/cdk/coercion';
import {ButtonHarnessFilters} from './button-harness-filters';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {ComponentHarness, HarnessPredicate} from '@angular/cdk-experimental/testing';
import {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';
import {coerceBooleanProperty} from '@angular/cdk/coercion';
import {ButtonHarnessFilters} from './button-harness-filters';

Expand Down
5 changes: 2 additions & 3 deletions src/material-experimental/mdc-checkbox/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ ts_library(
exclude = ["**/*.spec.ts"],
),
deps = [
"//src/cdk-experimental/testing",
"//src/cdk/coercion",
"//src/cdk/testing",
],
)

Expand Down Expand Up @@ -71,9 +71,8 @@ ng_test_library(
deps = [
":harness",
":mdc-checkbox",
"//src/cdk-experimental/testing",
"//src/cdk-experimental/testing/testbed",
"//src/cdk/testing",
"//src/cdk/testing/testbed",
"//src/material/checkbox",
"@npm//@angular/forms",
"@npm//@angular/platform-browser",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {BaseHarnessFilters} from '@angular/cdk-experimental/testing';
import {BaseHarnessFilters} from '@angular/cdk/testing';

export interface CheckboxHarnessFilters extends BaseHarnessFilters {
label?: string | RegExp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {HarnessLoader} from '@angular/cdk-experimental/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk-experimental/testing/testbed';
import {HarnessLoader} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {Component} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {FormControl, ReactiveFormsModule} from '@angular/forms';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {ComponentHarness, HarnessPredicate} from '@angular/cdk-experimental/testing';
import {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';
import {coerceBooleanProperty} from '@angular/cdk/coercion';
import {CheckboxHarnessFilters} from './checkbox-harness-filters';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {ComponentHarness, HarnessPredicate} from '@angular/cdk-experimental/testing';
import {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';
import {coerceBooleanProperty} from '@angular/cdk/coercion';
import {CheckboxHarnessFilters} from './checkbox-harness-filters';

Expand Down
5 changes: 2 additions & 3 deletions src/material-experimental/mdc-chips/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ts_library(
exclude = ["**/*.spec.ts"],
),
deps = [
"//src/cdk-experimental/testing",
"//src/cdk/testing",
],
)

Expand Down Expand Up @@ -68,14 +68,13 @@ ng_test_library(
deps = [
":harness",
":mdc-chips",
"//src/cdk-experimental/testing",
"//src/cdk-experimental/testing/testbed",
"//src/cdk/a11y",
"//src/cdk/bidi",
"//src/cdk/keycodes",
"//src/cdk/platform",
"//src/cdk/private/testing",
"//src/cdk/testing",
"//src/cdk/testing/testbed",
"//src/material/core",
"//src/material/form-field",
"//src/material/input",
Expand Down
Loading