Skip to content

Commit 3a573ff

Browse files
committed
[NAE-2125] Remove URI service usage from admin and menu items
- Added unit tests for `AbstractBreadcrumbsComponent` to validate redirection logic and error handling. - Enhanced test coverage for `AbstractNavigationDoubleDrawerComponent` by adding tests for menu state, sorting, and resize handling. - Updated `MockUriResourceService` with consistent root path conventions. - Extended `MockUserService` with logout and empty user functionality.
1 parent 1f91e5e commit 3a573ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

projects/netgrif-components-core/src/lib/navigation/navigation-double-drawer/abstract-navigation-double-drawer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,9 @@ export abstract class AbstractNavigationDoubleDrawerComponent implements OnInit,
405405
right: NavigationItem[];
406406
more: NavigationItem[]
407407
} {
408-
const result = cases
409-
.sort((a, b) => orderedChildCaseIds.indexOf(a.stringId) - orderedChildCaseIds.indexOf(b.stringId));
408+
const result = cases.slice().sort((a, b) =>
409+
orderedChildCaseIds.indexOf(a.stringId) - orderedChildCaseIds.indexOf(b.stringId)
410+
);
410411
let right: NavigationItem[], more: NavigationItem[];
411412
if (result.length > RIGHT_SIDE_INIT_PAGE_SIZE) {
412413
const rawRightItems: Case[] = result.splice(0, RIGHT_SIDE_INIT_PAGE_SIZE);

0 commit comments

Comments
 (0)