* 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>
27 lines
791 B
JavaScript
27 lines
791 B
JavaScript
import mockedRecommendedProducts from './mockedData';
|
|
import processCourseSearchResult from '../algoliaResultsParser';
|
|
|
|
describe('AlgoliaResultsParserTests', () => {
|
|
const dataToBeProcessed = {
|
|
activeRunKey: 'course-v1:TEST_COURSE_RUN',
|
|
activeRunType: 'test_course_run_type',
|
|
marketingUrl: 'test_marketingUrl',
|
|
minEffort: 1,
|
|
maxEffort: 2,
|
|
weeksToComplete: 3,
|
|
allowedIn: [],
|
|
blockedIn: [],
|
|
cardImageUrl: 'test_src',
|
|
owners: [],
|
|
title: 'test_title',
|
|
uuid: 'test_uuid',
|
|
recentEnrollmentCount: 1,
|
|
productSource: 'test_source',
|
|
};
|
|
|
|
it('should parse results returned by Algolia', async () => {
|
|
const parsedData = processCourseSearchResult(dataToBeProcessed);
|
|
expect(parsedData).toEqual(mockedRecommendedProducts[0]);
|
|
});
|
|
});
|