Skip to content

Commit

Permalink
Merge branch 'develop-6.7.x' into epic/b2b-commerce-quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
Larisa-Staroverova committed Nov 13, 2023
2 parents 0f8c33a + 604fb81 commit aa01e1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('CmsTicketInterceptor', () => {
}
));

it('should add parameters for productList requests: cmsTicketId, pageType, code', inject(
it('should add parameters for productList requests: cmsTicketId, categoryCode', inject(
[HttpClient],
(http: HttpClient) => {
spyOn(featureConfig, 'isLevel').and.returnValue(true);
Expand All @@ -164,10 +164,7 @@ describe('CmsTicketInterceptor', () => {
expect(mockReq.request.params.get('cmsTicketId')).toEqual(
'mockCmsTicketId'
);
expect(mockReq.request.params.get('pageType')).toEqual(
PageType.CATEGORY_PAGE
);
expect(mockReq.request.params.get('code')).toEqual('mockCode');
expect(mockReq.request.params.get('categoryCode')).toEqual('mockCode');
mockReq.flush('somedata');
}
));
Expand Down Expand Up @@ -197,8 +194,7 @@ describe('CmsTicketInterceptor', () => {
expect(mockReq.request.params.get('cmsTicketId')).toEqual(
'mockCmsTicketId'
);
expect(mockReq.request.params.get('pageType')).toBeFalsy();
expect(mockReq.request.params.get('code')).toBeFalsy();
expect(mockReq.request.params.get('categoryCode')).toBeFalsy();
mockReq.flush('somedata');
}
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,11 @@ export class CmsTicketInterceptor implements HttpInterceptor {
take(1),
switchMap((pageContext: PageContext) => {
request = request.clone(
!!pageContext.id && !!pageContext.type
!!pageContext.id
? {
setParams: {
cmsTicketId,
pageType: pageContext.type,
code: pageContext.id,
categoryCode: pageContext.id,
},
}
: {
Expand Down

0 comments on commit aa01e1a

Please sign in to comment.