Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('EditPageGuard', () => {
provide: Router,
useValue: {
navigate: jest.fn(),
currentNavigation: jest.fn().mockReturnValue({
getCurrentNavigation: jest.fn().mockReturnValue({
extractedUrl: {
queryParams: {
url: '/some-url'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const editPageGuard: CanMatchFn = () => {

const router = inject(Router);

const url = router.currentNavigation().extractedUrl.queryParams['url'];
const url = router.getCurrentNavigation().extractedUrl.queryParams['url'];

return combineLatest([
properties.getFeatureFlag(FeaturedFlags.FEATURE_FLAG_NEW_EDIT_PAGE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class RouterMock {

url = '';

currentNavigation() {
getCurrentNavigation() {
return this._currentNavigation;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class RouterMock {
return this._events.asObservable();
}

currentNavigation(): { finalUrl: { queryParams: { [key: string]: string } } } | null {
getCurrentNavigation(): { finalUrl: { queryParams: { [key: string]: string } } } | null {
return {
finalUrl: {
queryParams: {}
Expand Down Expand Up @@ -100,7 +100,7 @@ describe('DotRouterService', () => {
});

it('should get queryParams from Router', () => {
jest.spyOn(router, 'currentNavigation').mockReturnValue({
jest.spyOn(router, 'getCurrentNavigation').mockReturnValue({
finalUrl: {
queryParams: {
hola: 'mundo'
Expand All @@ -114,7 +114,7 @@ describe('DotRouterService', () => {
});

it('should get queryParams from ActivatedRoute', () => {
jest.spyOn(router, 'currentNavigation').mockReturnValue(null);
jest.spyOn(router, 'getCurrentNavigation').mockReturnValue(null);
expect(service.queryParams).toEqual({
hello: 'world'
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class DotRouterService {
}

get queryParams(): Params {
const nav = this.router.currentNavigation();
const nav = this.router.getCurrentNavigation();

return nav ? nav.finalUrl.queryParams : this.route.snapshot.queryParams;
}
Expand Down
3 changes: 2 additions & 1 deletion core-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@

<configuration>
<skip>${skipTests}</skip>
<arguments>nx affected -t test --base=origin/main --exclude='tag:skip:test'</arguments>
<!-- Add detectOpenHandles to identify resource leaks, forceExit to show results -->
<arguments>nx affected -t test --base=origin/main --exclude='tag:skip:test' --detectOpenHandles --forceExit</arguments>
</configuration>
</execution>

Expand Down