* feat: add personalized recommendations (#1024)
* use Algolia for personalized recommendations
* show personalized recommendations to use that have consented
to functional cookies
* update tests
VAN-1599
* Revert "fix: special characters in redirect url getting decoded to space (#1029)" (#1030)
This reverts commit fc62241332.
* feat: update recommendations page design (#1036)
VAN-1598
* feat: add events for recommendations (#1039)
* feat: remove static recommendations
---------
Co-authored-by: Syed Sajjad Hussain Shah <52817156+syedsajjadkazmii@users.noreply.github.com>
20 lines
569 B
JavaScript
20 lines
569 B
JavaScript
import { LOGIN_PAGE } from '../constants';
|
|
import { updatePathWithQueryParams } from '../utils/dataUtils';
|
|
|
|
describe('updatePathWithQueryParams', () => {
|
|
it('should append query params into the path', () => {
|
|
const params = '?course_id=testCourseId';
|
|
const expectedPath = `${LOGIN_PAGE}${params}`;
|
|
|
|
Object.defineProperty(window, 'location', {
|
|
value: {
|
|
href: 'http://localhost/',
|
|
search: params,
|
|
},
|
|
});
|
|
const updatedPath = updatePathWithQueryParams(LOGIN_PAGE);
|
|
|
|
expect(updatedPath).toEqual(expectedPath);
|
|
});
|
|
});
|