diff --git a/marketplace-ui/src/app/modules/product/product.component.spec.ts b/marketplace-ui/src/app/modules/product/product.component.spec.ts index a0bbbacd5..f8fa64d33 100644 --- a/marketplace-ui/src/app/modules/product/product.component.spec.ts +++ b/marketplace-ui/src/app/modules/product/product.component.spec.ts @@ -72,7 +72,9 @@ describe('ProductComponent', () => { { provide: ActivatedRoute, useValue: { - queryParams: of( {[DESIGNER_COOKIE_VARIABLE.restClientParamName]:true} ) + queryParams: of({ + [DESIGNER_COOKIE_VARIABLE.restClientParamName]: true + }) } }, { @@ -91,7 +93,9 @@ describe('ProductComponent', () => { } }) .compileComponents(); - routingQueryParamService = TestBed.inject(RoutingQueryParamService) as jasmine.SpyObj; + routingQueryParamService = TestBed.inject( + RoutingQueryParamService + ) as jasmine.SpyObj; fixture = TestBed.createComponent(ProductComponent); component = fixture.componentInstance; @@ -191,14 +195,6 @@ describe('ProductComponent', () => { expect(component.loadProductItems).not.toHaveBeenCalled(); }); - it('viewProductDetail should navigate', () => { - const productId = 'jira-connector'; - - component.viewProductDetail(productId, ''); - - expect(router.navigate).toHaveBeenCalledWith(['', productId]); - }); - it('should set isRESTClient true based on query params and designer environment', () => { routingQueryParamService.isDesignerEnv.and.returnValue(true); const fixtureTest = TestBed.createComponent(ProductComponent); diff --git a/marketplace-ui/src/app/modules/product/product.component.ts b/marketplace-ui/src/app/modules/product/product.component.ts index 9c3f8e961..37a55a885 100644 --- a/marketplace-ui/src/app/modules/product/product.component.ts +++ b/marketplace-ui/src/app/modules/product/product.component.ts @@ -115,7 +115,7 @@ export class ProductComponent implements AfterViewInit, OnDestroy { } viewProductDetail(productId: string, _productTag: string) { - this.router.navigate(['', productId]); + window.location.href = `/${productId}`; } onFilterChange(selectedType: ItemDropdown) {