Skip to content

Conversation

Nateowami
Copy link
Collaborator

@Nateowami Nateowami commented May 13, 2025

This is still work in progress, but I want to put it out here as it appears to be working.


This change is Reviewable

@Nateowami Nateowami force-pushed the feature/clean-up-realtime-docs branch 2 times, most recently from abf739b to db6ad5d Compare May 13, 2025 14:36
@Nateowami Nateowami marked this pull request as draft May 13, 2025 14:37
Copy link

codecov bot commented May 13, 2025

❌ 38 Tests Failed:

Tests completed Failed Passed Skipped
4435 38 4397 4
View the top 3 failed test(s) by shortest run time
.DraftGenerationStepsComponent ngOnInit::DraftGenerationStepsComponent ngOnInit should not show dialog or emit cancel if sources are unchanged
Stack Traces | 0.006s run time
Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'data')
TypeError: Cannot read properties of null (reading 'data')
    at Object.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:251:70)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
error properties: Object({ throwOriginal: true, rejection: TypeError: Cannot read properties of null (reading 'data'), promise: [object Promise], zone: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: null, _name: '<root>', _properties: Object({  }), _zoneDelegate: _ZoneDelegate({ _zone: <circular reference: Object>, _taskCounts: Object({ microTask: 0, macroTask: 0, eventTask: 0 }), _parentDelegate: null, _forkDlgt: null, _forkZS: null, _forkCurrZone: null, _interceptDlgt: null, _interceptZS: null, _interceptCurrZone: null, _invokeDlgt: null, _invokeZS: null, _invokeCurrZone: null, _handleErrorDlgt: null, _handleErrorZS: null, _handleErrorCurrZone: null, _scheduleTaskDlgt: null, _scheduleTaskZS: null, _scheduleTaskCurrZone: null, _invokeTaskDlgt: null, _invokeTaskZS: null, _invokeTaskCurrZone: null, _cancelTaskDlgt: null, _cancelTaskZS: null, _cancelTaskCurrZone: null, _hasTaskDlgt: null, _hasTaskDlgtOwner: null, _hasTaskZS: null, _hasTaskCurrZone: null ...
Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'data')
TypeError: Cannot read properties of null (reading 'data')
    at Object.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:251:70)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at resolvePromise (node_modules/zone.js/fesm2015/zone.js:2470:35)
    at apply (node_modules/zone.js/fesm2015/zone.js:2369:21)
    at node_modules/zone.js/fesm2015/zone.js:2385:37
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:6:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
.DraftGenerationStepsComponent ngOnInit::DraftGenerationStepsComponent ngOnInit should not show dialog or emit cancel if the steps are completed
Stack Traces | 0.006s run time
Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'data')
TypeError: Cannot read properties of null (reading 'data')
    at Object.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:251:70)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
error properties: Object({ throwOriginal: true, rejection: TypeError: Cannot read properties of null (reading 'data'), promise: [object Promise], zone: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: null, _name: '<root>', _properties: Object({  }), _zoneDelegate: _ZoneDelegate({ _zone: <circular reference: Object>, _taskCounts: Object({ microTask: 0, macroTask: 0, eventTask: 0 }), _parentDelegate: null, _forkDlgt: null, _forkZS: null, _forkCurrZone: null, _interceptDlgt: null, _interceptZS: null, _interceptCurrZone: null, _invokeDlgt: null, _invokeZS: null, _invokeCurrZone: null, _handleErrorDlgt: null, _handleErrorZS: null, _handleErrorCurrZone: null, _scheduleTaskDlgt: null, _scheduleTaskZS: null, _scheduleTaskCurrZone: null, _invokeTaskDlgt: null, _invokeTaskZS: null, _invokeTaskCurrZone: null, _cancelTaskDlgt: null, _cancelTaskZS: null, _cancelTaskCurrZone: null, _hasTaskDlgt: null, _hasTaskDlgtOwner: null, _hasTaskZS: null, _hasTaskCurrZone: null ...
Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'data')
TypeError: Cannot read properties of null (reading 'data')
    at Object.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:251:70)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at resolvePromise (node_modules/zone.js/fesm2015/zone.js:2470:35)
    at apply (node_modules/zone.js/fesm2015/zone.js:2369:21)
    at node_modules/zone.js/fesm2015/zone.js:2385:37
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:6:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source clears selected translated and reference books in training when translate book selected
Stack Traces | 0.006s run time
TypeError: Cannot read properties of undefined (reading 'selected')
    at DraftGenerationStepsComponent.validateCurrentStep (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:623:34)
    at DraftGenerationStepsComponent.tryAdvanceStep (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:548:15)
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:467:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at ZoneImpl.run (node_modules/zone.js/fesm2015/zone.js:113:43)
    at runInTestZone (node_modules/zone.js/fesm2015/zone-testing.js:216:38)
    at UserContext.<anonymous> (node_modules/zone.js/fesm2015/zone-testing.js:234:32)
    at <Jasmine>
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source should set "emptyTranslateSourceBooks"
Stack Traces | 0.006s run time
Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal 5.
Error: Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal 5.
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:373:51)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source shows unselected translate book on training page
Stack Traces | 0.006s run time
TypeError: Cannot read properties of undefined (reading 'selected')
    at DraftGenerationStepsComponent.validateCurrentStep (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:623:34)
    at DraftGenerationStepsComponent.tryAdvanceStep (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:548:15)
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:491:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at ZoneImpl.run (node_modules/zone.js/fesm2015/zone.js:113:43)
    at runInTestZone (node_modules/zone.js/fesm2015/zone-testing.js:216:38)
    at UserContext.<anonymous> (node_modules/zone.js/fesm2015/zone-testing.js:234:32)
    at <Jasmine>
.DraftGenerationStepsComponent additional training source::DraftGenerationStepsComponent additional training source should set "allAvailableTranslateBooks" correctly and with canonical book order
Stack Traces | 0.007s run time
Expected $.length = 1 to equal 3.
Expected $[1] = undefined to equal Object({ number: 3, selected: false }).
Expected $[2] = undefined to equal Object({ number: 7, selected: false }).
Error: Expected $.length = 1 to equal 3.
Expected $[1] = undefined to equal Object({ number: 3, selected: false }).
Expected $[2] = undefined to equal Object({ number: 7, selected: false }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:679:52)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent confirm step::DraftGenerationStepsComponent confirm step should localize and concatenate the books to translate
Stack Traces | 0.007s run time
Error: Expected '' to equal 'Genesis and Exodus'.
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:1344:58)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.DraftGenerationStepsComponent ngOnInit::DraftGenerationStepsComponent ngOnInit should show dialog and emit cancel if sources change
Stack Traces | 0.007s run time
Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'data')
TypeError: Cannot read properties of null (reading 'data')
    at Object.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:251:70)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
error properties: Object({ throwOriginal: true, rejection: TypeError: Cannot read properties of null (reading 'data'), promise: [object Promise], zone: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: null, _name: '<root>', _properties: Object({  }), _zoneDelegate: _ZoneDelegate({ _zone: <circular reference: Object>, _taskCounts: Object({ microTask: 0, macroTask: 0, eventTask: 0 }), _parentDelegate: null, _forkDlgt: null, _forkZS: null, _forkCurrZone: null, _interceptDlgt: null, _interceptZS: null, _interceptCurrZone: null, _invokeDlgt: null, _invokeZS: null, _invokeCurrZone: null, _handleErrorDlgt: null, _handleErrorZS: null, _handleErrorCurrZone: null, _scheduleTaskDlgt: null, _scheduleTaskZS: null, _scheduleTaskCurrZone: null, _invokeTaskDlgt: null, _invokeTaskZS: null, _invokeTaskCurrZone: null, _cancelTaskDlgt: null, _cancelTaskZS: null, _cancelTaskCurrZone: null, _hasTaskDlgt: null, _hasTaskDlgtOwner: null, _hasTaskZS: null, _hasTaskCurrZone: null ...
Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'data')
TypeError: Cannot read properties of null (reading 'data')
    at Object.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:251:70)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at resolvePromise (node_modules/zone.js/fesm2015/zone.js:2470:35)
    at apply (node_modules/zone.js/fesm2015/zone.js:2369:21)
    at node_modules/zone.js/fesm2015/zone.js:2385:37
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:6:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
.DraftGenerationStepsComponent one training source error handling::DraftGenerationStepsComponent one training source error handling shows error when project has no translated books
Stack Traces | 0.007s run time
TypeError: Cannot read properties of undefined (reading 'selected')
    at DraftGenerationStepsComponent.validateCurrentStep (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:623:34)
    at DraftGenerationStepsComponent.tryAdvanceStep (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:548:15)
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:591:17)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at ZoneImpl.run (node_modules/zone.js/fesm2015/zone.js:113:43)
    at runInTestZone (node_modules/zone.js/fesm2015/zone-testing.js:216:38)
    at UserContext.<anonymous> (node_modules/zone.js/fesm2015/zone-testing.js:234:32)
    at <Jasmine>
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source should not advance steps if user is offline
Stack Traces | 0.007s run time
TypeError: Cannot read properties of undefined (reading 'selectedIndex')
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:383:32)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at ZoneImpl.run (node_modules/zone.js/fesm2015/zone.js:113:43)
    at runInTestZone (node_modules/zone.js/fesm2015/zone-testing.js:216:38)
    at UserContext.<anonymous> (node_modules/zone.js/fesm2015/zone-testing.js:234:32)
    at <Jasmine>
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source should set "allAvailableTranslateBooks" correctly
Stack Traces | 0.007s run time
Expected $.length = 1 to equal 4.
Expected $[1] = undefined to equal Object({ number: 2, selected: false }).
Expected $[2] = undefined to equal Object({ number: 3, selected: false }).
Expected $[3] = undefined to equal Object({ number: 5, selected: false }).
Error: Expected $.length = 1 to equal 4.
Expected $[1] = undefined to equal Object({ number: 2, selected: false }).
Expected $[2] = undefined to equal Object({ number: 3, selected: false }).
Expected $[3] = undefined to equal Object({ number: 5, selected: false }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:310:52)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source should set "availableTranslateBooks" correctly
Stack Traces | 0.007s run time
Expected $.sourceProject.length = 0 to equal 3.
Expected $.sourceProject[0] = undefined to equal Object({ number: 1, selected: false }).
Expected $.sourceProject[1] = undefined to equal Object({ number: 2, selected: false }).
Expected $.sourceProject[2] = undefined to equal Object({ number: 3, selected: false }).
Error: Expected $.sourceProject.length = 0 to equal 3.
Expected $.sourceProject[0] = undefined to equal Object({ number: 1, selected: false }).
Expected $.sourceProject[1] = undefined to equal Object({ number: 2, selected: false }).
Expected $.sourceProject[2] = undefined to equal Object({ number: 3, selected: false }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:319:49)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source should set "selectableTrainingBooksByProj" correctly
Stack Traces | 0.007s run time
Expected $.length = 0 to equal 2.
Expected $[0] = undefined to equal Object({ number: 1, selected: true }).
Expected $[1] = undefined to equal Object({ number: 2, selected: true }).
Error: Expected $.length = 0 to equal 2.
Expected $[0] = undefined to equal Object({ number: 1, selected: true }).
Expected $[1] = undefined to equal Object({ number: 2, selected: true }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:359:72)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source should set "unusableTranslateSourceBooks" and "unusableTrainingSourceBooks" correctly
Stack Traces | 0.007s run time
Error: Expected null not to be null.
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:369:85)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source should set "unusableTranslateTargetBooks" and "unusableTrainingTargetBooks" correctly
Stack Traces | 0.007s run time
Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal 7.
Error: Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal 7.
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:378:53)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent additional training source::DraftGenerationStepsComponent additional training source clears selected reference books when translated book is unselected
Stack Traces | 0.008s run time
Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal Object({ number: 2, selected: true }).
Error: Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal Object({ number: 2, selected: true }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:873:64)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.DraftGenerationStepsComponent additional training source::DraftGenerationStepsComponent additional training source does not allow selecting not selectable training books
Stack Traces | 0.008s run time
Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal Object({ number: 6, selected: true }).
Error: Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal Object({ number: 6, selected: true }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:791:66)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.DraftGenerationStepsComponent additional training source::DraftGenerationStepsComponent additional training source should set "availableTrainingBooks" correctly and with canonical book order
Stack Traces | 0.008s run time
Expected $.project01.length = 1 to equal 4.
Expected $.project01[1] = undefined to equal Object({ number: 2, selected: true }).
Expected $.project01[2] = undefined to equal Object({ number: 3, selected: false }).
Expected $.project01[3] = undefined to equal Object({ number: 6, selected: false }).
Expected $.source1.length = 1 to equal 3.
Expected $.source1[1] = undefined to equal Object({ number: 2, selected: true }).
Expected $.source1[2] = undefined to equal Object({ number: 3, selected: false }).
Expected $.source2.length = 0 to equal 3.
Expected $.source2[0] = undefined to equal Object({ number: 2, selected: true }).
Expected $.source2[1] = undefined to equal Object({ number: 3, selected: false }).
Expected $.source2[2] = undefined to equal Object({ number: 6, selected: false }).
Error: Expected $.project01.length = 1 to equal 4.
Expected $.project01[1] = undefined to equal Object({ number: 2, selected: true }).
Expected $.project01[2] = undefined to equal Object({ number: 3, selected: false }).
Expected $.project01[3] = undefined to equal Object({ number: 6, selected: false }).
Expected $.source1.length = 1 to equal 3.
Expected $.source1[1] = undefined to equal Object({ number: 2, selected: true }).
Expected $.source1[2] = undefined to equal Object({ number: 3, selected: false }).
Expected $.source2.length = 0 to equal 3.
Expected $.source2[0] = undefined to equal Object({ number: 2, selected: true }).
Expected $.source2[1] = undefined to equal Object({ number: 3, selected: false }).
Expected $.source2[2] = undefined to equal Object({ number: 6, selected: false }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:697:48)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent additional training source::DraftGenerationStepsComponent additional training source should set "availableTranslateBooks" correctly and with canonical book order
Stack Traces | 0.008s run time
Expected $.draftingSource.length = 0 to equal 3.
Expected $.draftingSource[0] = undefined to equal Object({ number: 2, selected: false }).
Expected $.draftingSource[1] = undefined to equal Object({ number: 3, selected: false }).
Expected $.draftingSource[2] = undefined to equal Object({ number: 7, selected: false }).
Error: Expected $.draftingSource.length = 0 to equal 3.
Expected $.draftingSource[0] = undefined to equal Object({ number: 2, selected: false }).
Expected $.draftingSource[1] = undefined to equal Object({ number: 3, selected: false }).
Expected $.draftingSource[2] = undefined to equal Object({ number: 7, selected: false }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:687:49)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent confirm step::DraftGenerationStepsComponent confirm step should localize, group, and collapse the books to use in training
Stack Traces | 0.008s run time
TypeError: Cannot read properties of undefined (reading 'ranges')
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:1351:32)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at ZoneImpl.run (node_modules/zone.js/fesm2015/zone.js:113:43)
    at runInTestZone (node_modules/zone.js/fesm2015/zone-testing.js:216:38)
    at UserContext.<anonymous> (node_modules/zone.js/fesm2015/zone-testing.js:234:32)
    at <Jasmine>
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source should set "availableTrainingBooks" correctly
Stack Traces | 0.008s run time
Expected $.project01.length = 0 to equal 4.
Expected $.project01[0] = undefined to equal Object({ number: 1, selected: true }).
Expected $.project01[1] = undefined to equal Object({ number: 2, selected: true }).
Expected $.project01[2] = undefined to equal Object({ number: 3, selected: false }).
Expected $.project01[3] = undefined to equal Object({ number: 5, selected: false }).
Expected $.sourceProject.length = 0 to equal 4.
Expected $.sourceProject[0] = undefined to equal Object({ number: 1, selected: true }).
Expected $.sourceProject[1] = undefined to equal Object({ number: 2, selected: true }).
Expected $.sourceProject[2] = undefined to equal Object({ number: 3, selected: false }).
Expected $.sourceProject[3] = undefined to equal Object({ number: 5, selected: false }).
Error: Expected $.project01.length = 0 to equal 4.
Expected $.project01[0] = undefined to equal Object({ number: 1, selected: true }).
Expected $.project01[1] = undefined to equal Object({ number: 2, selected: true }).
Expected $.project01[2] = undefined to equal Object({ number: 3, selected: false }).
Expected $.project01[3] = undefined to equal Object({ number: 5, selected: false }).
Expected $.sourceProject.length = 0 to equal 4.
Expected $.sourceProject[0] = undefined to equal Object({ number: 1, selected: true }).
Expected $.sourceProject[1] = undefined to equal Object({ number: 2, selected: true }).
Expected $.sourceProject[2] = undefined to equal Object({ number: 3, selected: false }).
Expected $.sourceProject[3] = undefined to equal Object({ number: 5, selected: false }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:329:48)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent pending updates::DraftGenerationStepsComponent pending updates should show projects pending updates
Stack Traces | 0.008s run time
Expected $.length = 0 to equal 2.
Expected $[0] = undefined to equal Object({ projectId: 'source1', name: 'Source 1', syncUrl: '....../projects/source1/sync' }).
Expected $[1] = undefined to equal Object({ projectId: 'source2', name: 'SRC', syncUrl: '....../projects/source2/sync' }).
Error: Expected $.length = 0 to equal 2.
Expected $[0] = undefined to equal Object({ projectId: 'source1', name: 'Source 1', syncUrl: '....../projects/source1/sync' }).
Expected $[1] = undefined to equal Object({ projectId: 'source2', name: 'SRC', syncUrl: '....../projects/source2/sync' }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:1447:47)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.DraftGenerationStepsComponent show developer tools feature flag is enabled::DraftGenerationStepsComponent show developer tools feature flag is enabled should set fast training, echo engine and email me correctly
Stack Traces | 0.008s run time
Error: Expected false to be true.
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:955:50)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source clears selected reference books when translated book is unselected
Stack Traces | 0.009s run time
Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal Object({ number: 2, selected: true }).
Error: Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal Object({ number: 2, selected: true }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:460:70)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.DraftGenerationStepsComponent ngOnInit::DraftGenerationStepsComponent ngOnInit should not show dialog or emit cancel if a dialog is already open
Stack Traces | 0.015s run time
Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'data')
TypeError: Cannot read properties of null (reading 'data')
    at Object.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:251:70)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
error properties: Object({ throwOriginal: true, rejection: TypeError: Cannot read properties of null (reading 'data'), promise: [object Promise], zone: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: null, _name: '<root>', _properties: Object({  }), _zoneDelegate: _ZoneDelegate({ _zone: <circular reference: Object>, _taskCounts: Object({ microTask: 0, macroTask: 0, eventTask: 0 }), _parentDelegate: null, _forkDlgt: null, _forkZS: null, _forkCurrZone: null, _interceptDlgt: null, _interceptZS: null, _interceptCurrZone: null, _invokeDlgt: null, _invokeZS: null, _invokeCurrZone: null, _handleErrorDlgt: null, _handleErrorZS: null, _handleErrorCurrZone: null, _scheduleTaskDlgt: null, _scheduleTaskZS: null, _scheduleTaskCurrZone: null, _invokeTaskDlgt: null, _invokeTaskZS: null, _invokeTaskCurrZone: null, _cancelTaskDlgt: null, _cancelTaskZS: null, _cancelTaskCurrZone: null, _hasTaskDlgt: null, _hasTaskDlgtOwner: null, _hasTaskZS: null, _hasTaskCurrZone: null ...
Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'data')
TypeError: Cannot read properties of null (reading 'data')
    at Object.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:251:70)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at resolvePromise (node_modules/zone.js/fesm2015/zone.js:2470:35)
    at apply (node_modules/zone.js/fesm2015/zone.js:2369:21)
    at node_modules/zone.js/fesm2015/zone.js:2385:37
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:6:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source does not allow selecting not selectable source training books
Stack Traces | 0.021s run time
Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'data')
TypeError: Cannot read properties of null (reading 'data')
    at Object.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:251:70)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
error properties: Object({ throwOriginal: true, rejection: TypeError: Cannot read properties of null (reading 'data'), promise: [object Promise], zone: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: ZoneImpl({ _parent: null, _name: '<root>', _properties: Object({  }), _zoneDelegate: _ZoneDelegate({ _zone: <circular reference: Object>, _taskCounts: Object({ microTask: 0, macroTask: 0, eventTask: 0 }), _parentDelegate: null, _forkDlgt: null, _forkZS: null, _forkCurrZone: null, _interceptDlgt: null, _interceptZS: null, _interceptCurrZone: null, _invokeDlgt: null, _invokeZS: null, _invokeCurrZone: null, _handleErrorDlgt: null, _handleErrorZS: null, _handleErrorCurrZone: null, _scheduleTaskDlgt: null, _scheduleTaskZS: null, _scheduleTaskCurrZone: null, _invokeTaskDlgt: null, _invokeTaskZS: null, _invokeTaskCurrZone: null, _cancelTaskDlgt: null, _cancelTaskZS: null, _cancelTaskCurrZone: null, _hasTaskDlgt: null, _hasTaskDlgtOwner: null, _hasTaskZS: null, _hasTaskCurrZone: null ...
Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'data')
TypeError: Cannot read properties of null (reading 'data')
    at Object.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.ts:251:70)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at resolvePromise (node_modules/zone.js/fesm2015/zone.js:2470:35)
    at apply (node_modules/zone.js/fesm2015/zone.js:2369:21)
    at node_modules/zone.js/fesm2015/zone.js:2385:37
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:6:1)
    at apply (node_modules/@.../helpers/esm/asyncToGenerator.js:17:1)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at FakeAsyncTestZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:1620:29)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2129:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at Object.onInvoke (node_modules/@.../core/fesm2022/core.mjs:6568:33)
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source should allow selecting books from the training source project
Stack Traces | 0.022s run time
Expected $.length = 0 to equal 3.
Expected $[0] = undefined to equal Object({ number: 1, selected: true }).
Expected $[1] = undefined to equal Object({ number: 2, selected: true }).
Expected $[2] = undefined to equal Object({ number: 3, selected: true }).
Error: Expected $.length = 0 to equal 3.
Expected $[0] = undefined to equal Object({ number: 1, selected: true }).
Expected $[1] = undefined to equal Object({ number: 2, selected: true }).
Expected $[2] = undefined to equal Object({ number: 3, selected: true }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:413:70)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.DraftGenerationStepsComponent target contains previously selected books::DraftGenerationStepsComponent target contains previously selected books should restore previously selected ranges
Stack Traces | 0.022s run time
Expected $.length = 0 to equal 2.
Expected $[0] = undefined to equal Object({ number: 9, selected: true }).
Expected $[1] = undefined to equal Object({ number: 10, selected: true }).
Error: Expected $.length = 0 to equal 2.
Expected $[0] = undefined to equal Object({ number: 9, selected: true }).
Expected $[1] = undefined to equal Object({ number: 10, selected: true }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:1165:64)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.DraftGenerationStepsComponent additional training source::DraftGenerationStepsComponent additional training source should show and hide selectable training source books when training books selected
Stack Traces | 0.023s run time
Expected $.length = 0 to equal 2.
Expected $[0] = undefined to equal Object({ number: 2, selected: true }).
Expected $[1] = undefined to equal Object({ number: 6, selected: true }).
Error: Expected $.length = 0 to equal 2.
Expected $[0] = undefined to equal Object({ number: 2, selected: true }).
Expected $[1] = undefined to equal Object({ number: 6, selected: true }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:745:64)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent additional training source::DraftGenerationStepsComponent additional training source show warning when both source books missing translated books
Stack Traces | 0.024s run time
Error: Expected 1 to be 2.
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:852:47)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.DraftGenerationStepsComponent one training source::DraftGenerationStepsComponent one training source does not select deselected reference book when selecting translated book
Stack Traces | 0.024s run time
Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal Object({ number: 2, selected: true }).
Error: Expected $.length = 0 to equal 1.
Expected $[0] = undefined to equal Object({ number: 2, selected: true }).
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:435:66)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.DraftGenerationStepsComponent additional training source::DraftGenerationStepsComponent additional training source should allow one source to have no books selected
Stack Traces | 0.025s run time
Error: Expected false to be true.
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:826:42)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.DraftGenerationStepsComponent additional training source::DraftGenerationStepsComponent additional training source should correctly emit the selected books when done
Stack Traces | 0.025s run time
Error: Expected false to be true.
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:783:42)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
.DraftGenerationStepsComponent additional training source::DraftGenerationStepsComponent additional training source should set "unusableTranslateSourceBooks" and "unusableTrainingSourceBooks" correctly
Stack Traces | 0.031s run time
TypeError: Cannot read properties of null (reading 'querySelector')
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:733:36)
    at UserContext.apply (node_modules/zone.js/fesm2015/zone-testing.js:1715:26)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:397:34)
    at ZoneImpl.run (node_modules/zone.js/fesm2015/zone.js:113:43)
    at runInTestZone (node_modules/zone.js/fesm2015/zone-testing.js:216:38)
    at UserContext.<anonymous> (node_modules/zone.js/fesm2015/zone-testing.js:234:32)
    at <Jasmine>
.DraftGenerationStepsComponent can add additional training data::DraftGenerationStepsComponent can add additional training data generates draft with training data file
Stack Traces | 0.042s run time
Expected spy emit to have been called with:
  [ Object({ trainingScriptureRanges: [ Object({ projectId: 'source1', scriptureRange: 'EXO' }) ], translationScriptureRanges: [ Object({ projectId: 'draftingSource', scriptureRange: 'LEV' }) ], trainingDataFiles: [ 'file1' ], fastTraining: false, useEcho: false, sendEmailOnBuildFinished: false }) ]
but it was never called.
Error: Expected spy emit to have been called with:
  [ Object({ trainingScriptureRanges: [ Object({ projectId: 'source1', scriptureRange: 'EXO' }) ], translationScriptureRanges: [ Object({ projectId: 'draftingSource', scriptureRange: 'LEV' }) ], trainingDataFiles: [ 'file1' ], fastTraining: false, useEcho: false, sendEmailOnBuildFinished: false }) ]
but it was never called.
    at <Jasmine>
    at UserContext.apply (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:1254:35)
    at _ZoneDelegate.invoke (node_modules/zone.js/fesm2015/zone.js:398:28)
    at ProxyZoneSpec.onInvoke (node_modules/zone.js/fesm2015/zone-testing.js:2132:39)
.DraftGenerationStepsComponent show developer tools feature flag is enabled::DraftGenerationStepsComponent show developer tools feature flag is enabled should emit the use echo value if checked
Stack Traces | 0.052s run time
Error: Expected false to be true.
    at <Jasmine>
    at UserContext.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:1037:47)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
.DraftGenerationStepsComponent show developer tools feature flag is enabled::DraftGenerationStepsComponent show developer tools feature flag is enabled should emit the fast training value if checked
Stack Traces | 0.06s run time
Error: Expected false to be true.
    at <Jasmine>
    at UserContext.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:996:47)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)
.DraftGenerationStepsComponent show developer tools feature flag is enabled::DraftGenerationStepsComponent show developer tools feature flag is enabled should emit the email me value if checked
Stack Traces | 0.063s run time
Error: Expected false to be true.
    at <Jasmine>
    at UserContext.<anonymous> (.../draft-generation/draft-generation-steps/draft-generation-steps.component.spec.ts:1078:47)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/@.../helpers/esm/asyncToGenerator.js:3:1)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@Nateowami Nateowami force-pushed the feature/clean-up-realtime-docs branch 2 times, most recently from 9fcd8f8 to 74cce2c Compare May 13, 2025 15:47
@Nateowami Nateowami force-pushed the feature/clean-up-realtime-docs branch 2 times, most recently from e689f5d to 9d7185b Compare August 7, 2025 21:57
@Nateowami Nateowami force-pushed the feature/clean-up-realtime-docs branch 2 times, most recently from e689f5d to 7842d29 Compare August 18, 2025 21:01
@Nateowami Nateowami changed the title Clean up realtime docs when they're no longer needed Dispose realtime docs when no longer in use Aug 18, 2025
@Nateowami Nateowami force-pushed the feature/clean-up-realtime-docs branch from 7842d29 to b990402 Compare August 18, 2025 21:09
@marksvc marksvc force-pushed the feature/clean-up-realtime-docs branch 3 times, most recently from 5a61ab3 to 89e0fd9 Compare September 18, 2025 20:33
@marksvc marksvc changed the title Dispose realtime docs when no longer in use SF-3532 Dispose realtime docs when no longer in use Sep 19, 2025
simply doing `spy(await env.getQuestionDoc('q6Id'))` with ts-mockito
spy results in later errors:

>       Error: Uncaught (in promise): TypeError: Cannot read
properties of undefined (reading 'get')
>       TypeError: Cannot read properties of undefined (reading 'get')
>           at Spy.getEmptyMethodStub
(node_modules/ts-mockito/lib/Spy.js:41:48)

Perhaps more awaiting needed to happen first for something to be
populated. Not being able to pin it down, there was instead success in
moving to jasmine spyOn.
@marksvc marksvc force-pushed the feature/clean-up-realtime-docs branch from 89e0fd9 to d59fd6c Compare September 26, 2025 19:28
@marksvc marksvc added will require testing PR should not be merged until testers confirm testing is complete e2e Run e2e tests for this pull request labels Sep 26, 2025
@marksvc
Copy link
Collaborator

marksvc commented Sep 26, 2025

Hello @Nateowami ,

Thank you for your work on this!

Here are some comments on the code.

I find positive names to be easier to understand than negative names, when using boolean logic. I suggest to consider renaming DocSubscription.isUnsubscribed$ to isSubscribed$.

Can you explain more about the use of DocSubscription.unsubscribe() instead of using a destroyRef argument to DocSubscription.constructor? It looks like DestroyRef is for some angular classes, and so if we want to use a DocSubscription in a different situation, we might not have a DestroyRef available, and so we would use DocSubscription.unsubscribe?

Rather than provide DocSubscription.unsubscribe for situations where a DestroyRef|Observable was not provided to DocSubscription.constructor, do you think we could always require clients to do one of

  • Give a DestroyRef that they have.
  • inject a DestroyRef, and pass it to DocSubscription.constructor, and later the DestroyRef gets destroyed when.. when the "corresponding injector is destroyed"; or
  • Pass an Observable, and emit from the Observable when the client wants to unsubscribe.
    I'm thinking this would reduce the complexity and variation of the DocSubscription class. (DocSubscription.unsubscribe could be removed.)
    I might have to have a look at what that looks like to decide if I like it better or worse :).

It looks like if we removed DocSubscription.unsubscribe, and instead had clients pass an Observable, that might look something like

// New client field
private readonly bye$ = new Subject<void>();
...
// Pass in constructor
new DocSubscription('DraftGenerationStepsComponent', this.bye$.asObservable())
...
// New client method
wave(): void {
  this.bye$.next();
  this.bye$.complete();
}

I want to mention that we could further reduce the complexity of DocSubscription by changing the constructor destroyRef argument from DestroyRef | Observable<void> to just Observable<void>. That would give some simplification.
Client code might change from

new DocSubscription('DraftGenerationStepsComponent', this.destroyRef)

to something like

new DocSubscription('DraftGenerationStepsComponent', new Observable(subscriber => this.destroyRef.onDestroy(() => subscriber.next())))

That makes the client code more complex just to simplify DocSubscription.constructor by a couple lines, so I'm not too inclined toward it. But I wanted to mention that idea in case it inspires other ideas.

Sometimes when working in TypeScript it seems like it could be useful to have a standard disposable system. In C#, there is an IDisposable interface, and implementing classes have a dispose() method that is called when the class is going away. In this dispose method you can let go of resources that you were holding onto.
If we had any desire to apply a generic disposal system across the frontend TypeScript application, this might be a good place to implement and do it.
AI suggested some disposal patterns that could be applied, which are

  • Implement our own Disposable interface with a dispose method like C#.
  • Using RxJS Subscription, where we add in each held resource and then in ngOnDestroy or another "dispose" method we let go of the resources.
  • Using Angular DestroyRef. I wonder if we can use this with arbitrary classes, not just with Components and Directives.
  • And of interest, in the future, using might come to TypeScript.

In C#, the IDisposal.dispose method is automatically called if you are using an object and it goes out of scope. (using someResource = foo()) Unfortunately, only the Angular DestroyRef and in-the-future using patterns above would be as automated (at least where we could not rely on ngOnDestroy). Hmm.
Well, do you have any comments on generic disposal ability in the frontend application?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e tests for this pull request will require testing PR should not be merged until testers confirm testing is complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants