Skip to content

Commit

Permalink
MARP-1075 - Release v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ntqdinh-axonivy authored Sep 16, 2024
2 parents 69fbfa1 + 1e6f136 commit 2452b9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
16 changes: 6 additions & 10 deletions marketplace-ui/src/app/modules/product/product.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ describe('ProductComponent', () => {
{
provide: ActivatedRoute,
useValue: {
queryParams: of( {[DESIGNER_COOKIE_VARIABLE.restClientParamName]:true} )
queryParams: of({
[DESIGNER_COOKIE_VARIABLE.restClientParamName]: true
})
}
},
{
Expand All @@ -91,7 +93,9 @@ describe('ProductComponent', () => {
}
})
.compileComponents();
routingQueryParamService = TestBed.inject(RoutingQueryParamService) as jasmine.SpyObj<RoutingQueryParamService>;
routingQueryParamService = TestBed.inject(
RoutingQueryParamService
) as jasmine.SpyObj<RoutingQueryParamService>;

fixture = TestBed.createComponent(ProductComponent);
component = fixture.componentInstance;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<TypeOption>) {
Expand Down

0 comments on commit 2452b9e

Please sign in to comment.