@@ -10,7 +10,6 @@ import {
10
10
ɵisStandalone ,
11
11
} from '@angular/core' ;
12
12
import { ComponentFixture , TestBed , tick } from '@angular/core/testing' ;
13
- import { By } from '@angular/platform-browser' ;
14
13
import { BrowserAnimationsModule , NoopAnimationsModule } from '@angular/platform-browser/animations' ;
15
14
import { NavigationExtras , Router } from '@angular/router' ;
16
15
import { RouterTestingModule } from '@angular/router/testing' ;
@@ -77,7 +76,7 @@ export async function render<SutType, WrapperType = SutType>(
77
76
excludeComponentDeclaration,
78
77
wrapper,
79
78
} ) ,
80
- imports : addAutoImports ( sut , {
79
+ imports : addAutoImports ( sut , {
81
80
imports : imports . concat ( defaultImports ) ,
82
81
routes,
83
82
} ) ,
@@ -129,23 +128,23 @@ export async function render<SutType, WrapperType = SutType>(
129
128
const [ path , params ] = ( basePath + href ) . split ( '?' ) ;
130
129
const queryParams = params
131
130
? params . split ( '&' ) . reduce ( ( qp , q ) => {
132
- const [ key , value ] = q . split ( '=' ) ;
133
- const currentValue = qp [ key ] ;
134
- if ( typeof currentValue === 'undefined' ) {
135
- qp [ key ] = value ;
136
- } else if ( Array . isArray ( currentValue ) ) {
137
- qp [ key ] = [ ...currentValue , value ] ;
138
- } else {
139
- qp [ key ] = [ currentValue , value ] ;
140
- }
141
- return qp ;
142
- } , { } as Record < string , string | string [ ] > )
131
+ const [ key , value ] = q . split ( '=' ) ;
132
+ const currentValue = qp [ key ] ;
133
+ if ( typeof currentValue === 'undefined' ) {
134
+ qp [ key ] = value ;
135
+ } else if ( Array . isArray ( currentValue ) ) {
136
+ qp [ key ] = [ ...currentValue , value ] ;
137
+ } else {
138
+ qp [ key ] = [ currentValue , value ] ;
139
+ }
140
+ return qp ;
141
+ } , { } as Record < string , string | string [ ] > )
143
142
: undefined ;
144
143
145
144
const navigateOptions : NavigationExtras | undefined = queryParams
146
145
? {
147
- queryParams,
148
- }
146
+ queryParams,
147
+ }
149
148
: undefined ;
150
149
151
150
const doNavigate = ( ) => {
@@ -172,7 +171,7 @@ export async function render<SutType, WrapperType = SutType>(
172
171
rerender,
173
172
change,
174
173
// @ts -ignore: fixture assigned
175
- debugElement : typeof sut === 'string' ? fixture . debugElement : fixture . debugElement . query ( By . directive ( sut ) ) ,
174
+ debugElement : fixture . debugElement ,
176
175
// @ts -ignore: fixture assigned
177
176
container : fixture . nativeElement ,
178
177
debug : ( element = fixture . nativeElement , maxLength , options ) =>
@@ -398,7 +397,7 @@ if (typeof process === 'undefined' || !process.env?.ATL_SKIP_AUTO_CLEANUP) {
398
397
}
399
398
400
399
@Component ( { selector : 'atl-wrapper-component' , template : '' } )
401
- class WrapperComponent { }
400
+ class WrapperComponent { }
402
401
403
402
/**
404
403
* Wrap findBy queries to poke the Angular change detection cycle
0 commit comments