Posted 7 August 2024, 4:10 am EST - Updated 7 August 2024, 4:24 am EST
After upgrading from version 5.20231.904 to 5.20241.19, we are encountering issues with all integrated tests written using Spectator.
Flex Component Integrated Tests › should create the component
TypeError: Cannot read properties of undefined (reading 'clientHeight')
32 | ngOnChanges(changes: SimpleChanges): void {
33 | if(changes.data) {
> 34 | this.gridData.sourceCollection = changes.data.currentValue;
| ^
35 | }
36 | }
37 |
at WjFlexGrid.FlexGrid.scrollIntoView (../../../node_modules/@mescius/wijmo.grid/index.js:14:118553)
at WjFlexGrid.FlexGrid._syncSelection (../../../node_modules/@mescius/wijmo.grid/index.js:14:138965)
at WjFlexGrid.FlexGrid._cvCurrentChanged (../../../node_modules/@mescius/wijmo.grid/index.js:14:138145)
at WjFlexGrid.<anonymous> (../../../node_modules/@mescius/wijmo.grid/index.js:14:103823)
at Event.raise (../../../node_modules/@mescius/wijmo/index.js:14:8786)
at CollectionView.onCurrentChanged (../../../node_modules/@mescius/wijmo/index.js:14:84118)
at CollectionView.moveCurrentToPosition (../../../node_modules/@mescius/wijmo/index.js:14:81294)
at CollectionView.moveCurrentToFirst (../../../node_modules/@mescius/wijmo/index.js:14:80616)
at CollectionView.set [as sourceCollection] (../../../node_modules/@mescius/wijmo/index.js:14:80126)
at GridTestComponent.ngOnChanges (src/lib/grid/test-new-grid/grid-test.component.ts:34:42)
at setProps (../../../node_modules/@ngneat/spectator/fesm2022/ngneat-spectator.mjs:110:9)
at SpectatorHost.setInput (../../../node_modules/@ngneat/spectator/fesm2022/ngneat-spectator.mjs:545:9)
at src/lib/grid/test-new-grid/grid-test.component.integrated.spec.ts:53:19
at _ZoneDelegate.invoke (../../../node_modules/zone.js/bundles/zone.umd.js:412:32)
at ProxyZoneSpec.Object.<anonymous>.ProxyZoneSpec.onInvoke (../../../node_modules/zone.js/bundles/zone-testing.umd.js:2164:43)
at _ZoneDelegate.invoke (../../../node_modules/zone.js/bundles/zone.umd.js:411:38)
at ZoneImpl.run (../../../node_modules/zone.js/bundles/zone.umd.js:147:47)
at Object.wrappedFunc (../../../node_modules/zone.js/bundles/zone-testing.umd.js:450:38)
Looks like the grid is triggering the scrollIntoView event, but in some objects, the clientHeight is undefined. This issue does not exist in version 5.20231.904.