-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(uve): Fixed API button on toolbar (#31136)
https://github.com/user-attachments/assets/d480d0d1-ad90-48c5-8e81-5c1480b00f6f This pull request introduces several changes to improve URL sanitization and testing within the `dot-ema-shell` component and related files. The most important changes include adding URL sanitization logic, updating tests to reflect these changes, and removing redundant code. ### URL Sanitization: * [`core-web/libs/portlets/edit-ema/portlet/src/lib/dot-ema-shell/dot-ema-shell.component.ts`](diffhunk://#diff-677330662fea6dadc7e48fd8455ec2a6fe60d624c7ed1f01f0a3e985aacd05c6R213-R215): Added the `sanitizeURL` function to sanitize URLs before further processing. * [`core-web/libs/portlets/edit-ema/portlet/src/lib/services/guards/edit-ema.guard.ts`](diffhunk://#diff-880595c3f64b60b4dee196fb13dc679b5a500aede2d23cf966a369a70326dddcL5): Removed the `sanitizeURL` import and related code, as the sanitization is now handled elsewhere. [[1]](diffhunk://#diff-880595c3f64b60b4dee196fb13dc679b5a500aede2d23cf966a369a70326dddcL5) [[2]](diffhunk://#diff-880595c3f64b60b4dee196fb13dc679b5a500aede2d23cf966a369a70326dddcL47-L60) ### Testing Updates: * [`core-web/libs/portlets/edit-ema/portlet/src/lib/dot-ema-shell/dot-ema-shell.component.spec.ts`](diffhunk://#diff-8843e3a4ce8c16e83408b1a6dcc3ad54eaddd17f8e986bbdb502e11bd4446ab4R315-R391): Added new test cases to verify URL sanitization when `loadPageAsset` is called with different URL formats. * [`core-web/libs/portlets/edit-ema/portlet/src/lib/services/guards/edit-ema.guard.spec.ts`](diffhunk://#diff-564087dbe85c3bd9e96481e7adf8b2029561d91b9ce061e8991cb1d10b9b8e31L96-R96): Updated test cases to reflect the changes in URL sanitization logic. ### Code Cleanup: * [`core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/load/withLoad.ts`](diffhunk://#diff-0cbc04b5047422551dde0970e4ea1d0e1fcce3d9d8f4e0b4612fbc30b1658487R84): Added a comment suggesting the use of `retryWhen()` for potential future improvements. --------- Co-authored-by: Kevin Davila <[email protected]>
- Loading branch information
1 parent
2653b71
commit 90b0c6c
Showing
5 changed files
with
79 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters