File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed
tools/public_api_guard/cdk Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ ts_library(
11
11
"**/*.spec.ts" ,
12
12
],
13
13
),
14
+ module_name = "@angular/cdk/testing" ,
14
15
deps = [
15
16
"@npm//rxjs" ,
16
17
],
17
- module_name = "@angular/cdk/testing" ,
18
18
)
19
19
20
20
markdown_to_html (
Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
9
- import { parallel } from '@angular/cdk/testing/harness-environment ' ;
9
+ import { parallel } from '@angular/cdk/testing' ;
10
10
import { TestElement } from './test-element' ;
11
11
12
12
/** An async function that returns a promise when called. */
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ function installChangeDetectionBatchingHandler(fixture: ComponentFixture<unknown
49
49
handleChangeDetectionBatching ( ( { isBatching, onDetectChangesNow} ) => {
50
50
disableAutoChangeDetection = isBatching ;
51
51
if ( onDetectChangesNow ) {
52
- Promise . all ( [ ... activeFixtures ] . map ( detectChanges ) ) . then ( onDetectChangesNow ) ;
52
+ Promise . all ( Array . from ( activeFixtures ) . map ( detectChanges ) ) . then ( onDetectChangesNow ) ;
53
53
}
54
54
} ) ;
55
55
}
Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ export interface BaseHarnessFilters {
11
11
selector ?: string ;
12
12
}
13
13
14
+ export interface ChangeDetectionBatchingStatus {
15
+ isBatching : boolean ;
16
+ onDetectChangesNow ?: ( ) => void ;
17
+ }
18
+
14
19
export declare abstract class ComponentHarness {
15
20
protected readonly locatorFactory : LocatorFactory ;
16
21
constructor ( locatorFactory : LocatorFactory ) ;
@@ -42,6 +47,8 @@ export interface ElementDimensions {
42
47
width : number ;
43
48
}
44
49
50
+ export declare function handleChangeDetectionBatching ( handler : ( status : ChangeDetectionBatchingStatus ) => void ) : void ;
51
+
45
52
export declare abstract class HarnessEnvironment < E > implements HarnessLoader , LocatorFactory {
46
53
protected rawRootElement : E ;
47
54
rootElement : TestElement ;
@@ -115,6 +122,12 @@ export interface ModifierKeys {
115
122
shift ?: boolean ;
116
123
}
117
124
125
+ export declare function noAutoChangeDetection < T > ( fn : ( ) => Promise < T > ) : Promise < T > ;
126
+
127
+ export declare function parallel < T > ( values : Iterable < T | PromiseLike < T > > ) : Promise < T [ ] > ;
128
+
129
+ export declare function stopHandlingChangeDetectionBatching ( ) : void ;
130
+
118
131
export interface TestElement {
119
132
blur ( ) : Promise < void > ;
120
133
clear ( ) : Promise < void > ;
You can’t perform that action at this time.
0 commit comments