Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(edit-ema) no call to verify experiment if the id is undefined (#…
…30676) ### Proposed Changes This pull request includes several updates to the `DotExperimentsService` and its related test files to improve error handling and testing capabilities. Additionally, it includes minor code cleanup in the `withLoad.ts` file. Improvements to `DotExperimentsService`: * [`core-web/libs/data-access/src/lib/dot-experiments/dot-experiments.service.ts`](diffhunk://#diff-a19f02782cf591f011530ab631225e33c33dc9127c6cffaf9e5ed45a68ae3faaL1-R6): Updated the `getById` method to handle `undefined` experiment IDs and to return an `Observable` of `undefined` in case of errors. [[1]](diffhunk://#diff-a19f02782cf591f011530ab631225e33c33dc9127c6cffaf9e5ed45a68ae3faaL1-R6) [[2]](diffhunk://#diff-a19f02782cf591f011530ab631225e33c33dc9127c6cffaf9e5ed45a68ae3faaL86-R96) Enhancements to testing: * [`core-web/libs/data-access/src/lib/dot-experiments/dot-experiments.service.spec.ts`](diffhunk://#diff-ae290cc9ac86bc4cd1b54f5c101d820bcf7d4afa64eae76cc9fa849429132bf2R1-R2): Added imports for `HttpClientTestingModule` and `HttpTestingController`, and updated the test setup to use `TestBed` for dependency injection. Added a new test case to handle `undefined` experiment IDs. [[1]](diffhunk://#diff-ae290cc9ac86bc4cd1b54f5c101d820bcf7d4afa64eae76cc9fa849429132bf2R1-R2) [[2]](diffhunk://#diff-ae290cc9ac86bc4cd1b54f5c101d820bcf7d4afa64eae76cc9fa849429132bf2R26-R43) [[3]](diffhunk://#diff-ae290cc9ac86bc4cd1b54f5c101d820bcf7d4afa64eae76cc9fa849429132bf2R191-R197) Code cleanup: * [`core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/load/withLoad.ts`](diffhunk://#diff-0cbc04b5047422551dde0970e4ea1d0e1fcce3d9d8f4e0b4612fbc30b1658487L4-R16): Reorganized import statements to follow a consistent order and removed unnecessary `catchError` in the `experiment` observable. [[1]](diffhunk://#diff-0cbc04b5047422551dde0970e4ea1d0e1fcce3d9d8f4e0b4612fbc30b1658487L4-R16) [[2]](diffhunk://#diff-0cbc04b5047422551dde0970e4ea1d0e1fcce3d9d8f4e0b4612fbc30b1658487L112-R113) ### Checklist - [x] Tests - [ ] Translations - [ ] Security Implications Contemplated (add notes if applicable)
- Loading branch information