musora-content-services 2.75.0 → 2.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/docs/ContentOrganization.html +2 -2
  3. package/docs/Forums.html +2 -2
  4. package/docs/Gamification.html +2 -2
  5. package/docs/TestUser.html +2 -2
  6. package/docs/UserManagementSystem.html +2 -2
  7. package/docs/api_types.js.html +2 -2
  8. package/docs/config.js.html +2 -2
  9. package/docs/content-org_content-org.js.html +2 -2
  10. package/docs/content-org_guided-courses.ts.html +2 -2
  11. package/docs/content-org_learning-paths.ts.html +55 -35
  12. package/docs/content-org_playlists-types.js.html +2 -2
  13. package/docs/content-org_playlists.js.html +2 -2
  14. package/docs/content.js.html +2 -2
  15. package/docs/forums_categories.ts.html +2 -2
  16. package/docs/forums_forums.ts.html +2 -2
  17. package/docs/forums_posts.ts.html +2 -2
  18. package/docs/forums_threads.ts.html +2 -2
  19. package/docs/gamification_awards.ts.html +2 -2
  20. package/docs/gamification_gamification.js.html +2 -2
  21. package/docs/global.html +56 -8
  22. package/docs/index.html +2 -2
  23. package/docs/liveTesting.ts.html +2 -2
  24. package/docs/module-Accounts.html +191 -2
  25. package/docs/module-Awards.html +2 -2
  26. package/docs/module-Config.html +2 -2
  27. package/docs/module-Content-Services-V2.html +2 -2
  28. package/docs/module-Forums.html +2 -2
  29. package/docs/module-GuidedCourses.html +2 -2
  30. package/docs/module-Interests.html +2 -2
  31. package/docs/module-LearningPaths.html +343 -3
  32. package/docs/module-Onboarding.html +2 -2
  33. package/docs/module-Payments.html +2 -2
  34. package/docs/module-Permissions.html +2 -2
  35. package/docs/module-Playlists.html +2 -2
  36. package/docs/module-ProgressRow.html +2 -2
  37. package/docs/module-Railcontent-Services.html +2 -2
  38. package/docs/module-Sanity-Services.html +2 -2
  39. package/docs/module-Sessions.html +2 -2
  40. package/docs/module-UserActivity.html +4 -4
  41. package/docs/module-UserChat.html +2 -2
  42. package/docs/module-UserManagement.html +2 -2
  43. package/docs/module-UserMemberships.html +2 -2
  44. package/docs/module-UserNotifications.html +2 -2
  45. package/docs/module-UserProfile.html +2 -2
  46. package/docs/progress-row_method-card.js.html +40 -43
  47. package/docs/railcontent.js.html +2 -2
  48. package/docs/sanity.js.html +3 -3
  49. package/docs/userActivity.js.html +5 -6
  50. package/docs/user_account.ts.html +29 -2
  51. package/docs/user_chat.js.html +2 -2
  52. package/docs/user_interests.js.html +2 -2
  53. package/docs/user_management.js.html +2 -2
  54. package/docs/user_memberships.ts.html +2 -2
  55. package/docs/user_notifications.js.html +2 -2
  56. package/docs/user_onboarding.ts.html +2 -2
  57. package/docs/user_payments.ts.html +2 -2
  58. package/docs/user_permissions.js.html +2 -2
  59. package/docs/user_profile.js.html +2 -2
  60. package/docs/user_sessions.js.html +2 -2
  61. package/docs/user_types.js.html +4 -2
  62. package/docs/user_user-management-system.js.html +2 -2
  63. package/package.json +1 -1
  64. package/src/contentTypeConfig.js +17 -10
  65. package/src/index.d.ts +9 -1
  66. package/src/index.js +9 -1
  67. package/src/infrastructure/http/HttpClient.ts +5 -5
  68. package/src/services/content-org/learning-paths.ts +53 -33
  69. package/src/services/contentAggregator.js +54 -45
  70. package/src/services/contentProgress.js +7 -6
  71. package/src/services/progress-row/method-card.js +38 -41
  72. package/src/services/sanity.js +1 -1
  73. package/src/services/user/account.ts +27 -0
  74. package/src/services/user/types.js +2 -0
  75. package/src/services/userActivity.js +3 -4
  76. package/test/learningPaths.test.js +5 -3
@@ -1,12 +1,14 @@
1
1
  import {
2
- getLastInteractedOf, getNavigateTo,
3
- getNextLesson, getProgressDateByIds,
2
+ getLastInteractedOf,
3
+ getNavigateTo,
4
+ getNextLesson,
5
+ getProgressDateByIds,
4
6
  getProgressPercentageByIds,
5
7
  getProgressStateByIds,
6
- getResumeTimeSecondsByIds
7
- } from "./contentProgress"
8
- import {isContentLikedByIds} from "./contentLikes"
9
- import {fetchLastInteractedChild, fetchLikeCount} from "./railcontent"
8
+ getResumeTimeSecondsByIds,
9
+ } from './contentProgress'
10
+ import { isContentLikedByIds } from './contentLikes'
11
+ import { fetchLastInteractedChild, fetchLikeCount } from './railcontent'
10
12
 
11
13
  /**
12
14
  * Combine sanity data with BE contextual data.
@@ -57,8 +59,7 @@ import {fetchLastInteractedChild, fetchLikeCount} from "./railcontent"
57
59
 
58
60
  // need to add method support.
59
61
  // this means returning collection_type and collection_id
60
- export async function addContextToContent(dataPromise, ...dataArgs)
61
- {
62
+ export async function addContextToContent(dataPromise, ...dataArgs) {
62
63
  const lastArg = dataArgs[dataArgs.length - 1]
63
64
  const options = typeof lastArg === 'object' && !Array.isArray(lastArg) ? lastArg : {}
64
65
 
@@ -80,18 +81,27 @@ export async function addContextToContent(dataPromise, ...dataArgs)
80
81
 
81
82
  let data = await dataPromise(...dataParam)
82
83
  const isDataAnArray = Array.isArray(data)
83
- if(isDataAnArray && data.length === 0) return data
84
- if(!data) return false
84
+ if (isDataAnArray && data.length === 0) return data
85
+ if (!data) return false
85
86
 
86
87
  const items = extractItemsFromData(data, dataField, isDataAnArray, dataField_includeParent) ?? []
87
- const ids = items.map(item => item?.id).filter(Boolean)
88
- if(ids.length === 0) return data
88
+ const ids = items.map((item) => item?.id).filter(Boolean)
89
+ if (ids.length === 0) return data
89
90
 
90
- const [progressData, isLikedData, resumeTimeData, lastInteractedChildData, nextLessonData, navigateToData] = await Promise.all([
91
- addProgressPercentage || addProgressStatus || addProgressTimestamp ? getProgressDateByIds(ids) : Promise.resolve(null),
91
+ const [
92
+ progressData,
93
+ isLikedData,
94
+ resumeTimeData,
95
+ lastInteractedChildData,
96
+ nextLessonData,
97
+ navigateToData,
98
+ ] = await Promise.all([
99
+ addProgressPercentage || addProgressStatus || addProgressTimestamp
100
+ ? getProgressDateByIds(ids)
101
+ : Promise.resolve(null),
92
102
  addIsLiked ? isContentLikedByIds(ids) : Promise.resolve(null),
93
103
  addResumeTimeSeconds ? getResumeTimeSecondsByIds(ids) : Promise.resolve(null),
94
- addLastInteractedChild ? fetchLastInteractedChild(ids) : Promise.resolve(null),
104
+ addLastInteractedChild ? fetchLastInteractedChild(ids) : Promise.resolve(null),
95
105
  addNextLesson ? getNextLesson(items) : Promise.resolve(null),
96
106
  addNavigateTo ? getNavigateTo(items) : Promise.resolve(null),
97
107
  ])
@@ -105,33 +115,40 @@ export async function addContextToContent(dataPromise, ...dataArgs)
105
115
  ...(addLikeCount && ids.length === 1 ? { likeCount: await fetchLikeCount(item.id) } : {}),
106
116
  ...(addResumeTimeSeconds ? { resumeTime: resumeTimeData?.[item.id] } : {}),
107
117
  ...(addLastInteractedChild ? { lastInteractedChild: lastInteractedChildData?.[item.id] } : {}),
108
- ...(addNextLesson ? { nextLesson: nextLessonData?.[item.id] } : {}),
118
+ ...(addNextLesson
119
+ ? {
120
+ nextLesson: nextLessonData?.[item.id], //deprecated
121
+ next_lesson_id: nextLessonData?.[item.id],
122
+ next_lesson: item?.children?.find((child) => child.id === nextLessonData?.[item.id]),
123
+ }
124
+ : {}),
109
125
  ...(addNavigateTo ? { navigateTo: navigateToData?.[item.id] } : {}),
110
126
  })
111
127
 
112
128
  return await processItems(data, addContext, dataField, isDataAnArray, dataField_includeParent)
113
129
  }
114
130
 
115
- export async function getNavigateToForPlaylists(data, {dataField = null} = {} )
116
- {
131
+ export async function getNavigateToForPlaylists(data, { dataField = null } = {}) {
117
132
  let playlists = extractItemsFromData(data, dataField, false, false)
118
133
  let allIds = []
119
- playlists.forEach((playlist) => allIds = [...allIds, ...playlist.items.map(a => a.content_id)])
120
- const progressOnItems = await getProgressStateByIds(allIds);
134
+ playlists.forEach(
135
+ (playlist) => (allIds = [...allIds, ...playlist.items.map((a) => a.content_id)])
136
+ )
137
+ const progressOnItems = await getProgressStateByIds(allIds)
121
138
  const addContext = async (playlist) => {
122
- const allItemsCompleted = playlist.items.every(i => {
123
- const itemId = i.content_id;
124
- const progress = progressOnItems[itemId];
125
- return progress && progress === 'completed';
126
- });
127
- let nextItem = playlist.items[0] ?? null;
139
+ const allItemsCompleted = playlist.items.every((i) => {
140
+ const itemId = i.content_id
141
+ const progress = progressOnItems[itemId]
142
+ return progress && progress === 'completed'
143
+ })
144
+ let nextItem = playlist.items[0] ?? null
128
145
  if (!allItemsCompleted) {
129
- const lastItemProgress = progressOnItems[playlist.last_engaged_on];
130
- const index = playlist.items.findIndex(i => i.content_id === playlist.last_engaged_on);
146
+ const lastItemProgress = progressOnItems[playlist.last_engaged_on]
147
+ const index = playlist.items.findIndex((i) => i.content_id === playlist.last_engaged_on)
131
148
  if (lastItemProgress === 'completed') {
132
- nextItem = playlist.items[index + 1] ?? nextItem;
149
+ nextItem = playlist.items[index + 1] ?? nextItem
133
150
  } else {
134
- nextItem = playlist.items[index] ?? nextItem;
151
+ nextItem = playlist.items[index] ?? nextItem
135
152
  }
136
153
  }
137
154
  playlist.navigateTo = {
@@ -140,11 +157,10 @@ export async function getNavigateToForPlaylists(data, {dataField = null} = {} )
140
157
  }
141
158
  return playlist
142
159
  }
143
- return await processItems(data, addContext, dataField, false, false,)
160
+ return await processItems(data, addContext, dataField, false, false)
144
161
  }
145
162
 
146
- function extractItemsFromData(data, dataField, isParentArray, includeParent)
147
- {
163
+ function extractItemsFromData(data, dataField, isParentArray, includeParent) {
148
164
  let items = []
149
165
  if (dataField) {
150
166
  if (isParentArray) {
@@ -164,18 +180,17 @@ function extractItemsFromData(data, dataField, isParentArray, includeParent)
164
180
  }
165
181
  }
166
182
  } else if (Array.isArray(data)) {
167
- items = data;
183
+ items = data
168
184
  } else if (data?.id) {
169
185
  items = [data]
170
186
  }
171
187
  return items
172
188
  }
173
189
 
174
- async function processItems(data, addContext, dataField, isParentArray, includeParent)
175
- {
190
+ async function processItems(data, addContext, dataField, isParentArray, includeParent) {
176
191
  if (dataField) {
177
192
  if (isParentArray) {
178
- for(let parent of data) {
193
+ for (let parent of data) {
179
194
  parent[dataField] = Array.isArray(parent[dataField])
180
195
  ? await Promise.all(parent[dataField].map(addContext))
181
196
  : await addContext(parent[dataField])
@@ -186,16 +201,10 @@ async function processItems(data, addContext, dataField, isParentArray, includeP
186
201
  : await addContext(data[dataField])
187
202
  }
188
203
  if (includeParent) {
189
- data = isParentArray
190
- ? await Promise.all(data.map(addContext))
191
- : await addContext(data)
204
+ data = isParentArray ? await Promise.all(data.map(addContext)) : await addContext(data)
192
205
  }
193
206
  return data
194
207
  } else {
195
- return Array.isArray(data)
196
- ? await Promise.all(data.map(addContext))
197
- : await addContext(data)
208
+ return Array.isArray(data) ? await Promise.all(data.map(addContext)) : await addContext(data)
198
209
  }
199
210
  }
200
-
201
-
@@ -117,10 +117,7 @@ export async function getNavigateTo(data) {
117
117
  const firstChild = content.children[0]
118
118
  let lastInteractedChildNavToData = await getNavigateTo([firstChild])
119
119
  lastInteractedChildNavToData = lastInteractedChildNavToData[firstChild.id] ?? null
120
- navigateToData[content.id] = buildNavigateTo(
121
- firstChild,
122
- lastInteractedChildNavToData
123
- )
120
+ navigateToData[content.id] = buildNavigateTo(firstChild, lastInteractedChildNavToData)
124
121
  } else {
125
122
  const childrenStates = await getProgressStateByIds(childrenIds)
126
123
  const lastInteracted = await getLastInteractedOf(childrenIds)
@@ -265,7 +262,6 @@ export async function getAllCompleted(limit = null) {
265
262
  return ids
266
263
  }
267
264
 
268
- // todo: either refactor to use watermelon, or add method functionality to dataContext (more work overall)
269
265
  export async function getAllStartedOrCompleted({
270
266
  limit = null,
271
267
  onlyIds = true,
@@ -401,7 +397,12 @@ function startStatusInLocalContext(localContext, contentId, hierarchy) {
401
397
  setStartedOrCompletedStatusInLocalContext(localContext, contentId, false, hierarchy)
402
398
  }
403
399
 
404
- function setStartedOrCompletedStatusInLocalContext(localContext, contentId, isCompleted, hierarchy) {
400
+ function setStartedOrCompletedStatusInLocalContext(
401
+ localContext,
402
+ contentId,
403
+ isCompleted,
404
+ hierarchy
405
+ ) {
405
406
  let data = localContext.data[contentId] ?? {}
406
407
  data[DATA_KEY_PROGRESS] = isCompleted ? 100 : 0
407
408
  data[DATA_KEY_STATUS] = isCompleted ? STATE_COMPLETED : STATE_STARTED
@@ -4,21 +4,22 @@
4
4
 
5
5
  import {
6
6
  getDailySession,
7
+ getActivePath,
7
8
  resetAllLearningPaths,
8
9
  startLearningPath,
9
- } from '../content-org/learning-paths.ts'
10
+ fetchLearningPathLessons,
11
+ } from '../content-org/learning-paths'
10
12
  import { getToday } from '../dateUtils.js'
11
13
  import { fetchByRailContentId, fetchByRailContentIds, fetchMethodV2IntroVideo } from '../sanity'
12
14
  import { addContextToContent } from '../contentAggregator.js'
15
+ import { getProgressState } from '../contentProgress'
13
16
 
14
17
  export async function getMethodCard(brand) {
15
- const dailySession = await getDailySession(brand, getToday())
16
- const activeLearningPathId = dailySession?.active_learning_path_id
18
+ const introVideo = await fetchMethodV2IntroVideo(brand)
19
+ const introVideoProgressState = await getProgressState(introVideo.id)
17
20
  //resetAllLearningPaths()
18
- if (!activeLearningPathId) {
21
+ if (introVideoProgressState != 'completed') {
19
22
  //startLearningPath('drumeo', 422533)
20
-
21
- const introVideo = await fetchMethodV2IntroVideo(brand)
22
23
  const timestamp = Math.floor(Date.now() / 1000)
23
24
  return {
24
25
  id: 0, // method card has no id
@@ -36,36 +37,30 @@ export async function getMethodCard(brand) {
36
37
  progressTimestamp: timestamp,
37
38
  }
38
39
  } else {
39
- const todayContentIds = dailySession.daily_session[0]?.content_ids || []
40
- const nextContentIds = dailySession.daily_session[1]?.content_ids || []
40
+ //TODO: Optimize loading of dailySessions/Path, should not need multiple requests
41
+ const activeLearningPath = await getActivePath(brand)
42
+ const learningPath = await fetchLearningPathLessons(
43
+ activeLearningPath.active_learning_path_id,
44
+ brand,
45
+ getToday()
46
+ )
41
47
 
42
- const addContextParameters = {
43
- addProgressStatus: true,
44
- addProgressPercentage: true,
45
- addProgressTimestamp: true,
46
- }
47
- const todaysLessons = await addContextToContent(
48
- fetchByRailContentIds,
49
- todayContentIds,
50
- addContextParameters
48
+ const allCompleted = learningPath?.todays_lessons.every(
49
+ (lesson) => lesson.progressStatus === 'completed'
50
+ )
51
+ const anyCompleted = learningPath?.todays_lessons.some(
52
+ (lesson) => lesson.progressStatus === 'completed'
51
53
  )
52
- const nextLPLessons = await addContextToContent(
53
- fetchByRailContentIds,
54
- nextContentIds,
55
- addContextParameters
54
+ const noneCompleted = learningPath?.todays_lessons.every(
55
+ (lesson) => lesson.progressStatus !== 'completed'
56
56
  )
57
- const allCompleted = todaysLessons.every((lesson) => lesson.progressStatus === 'completed')
58
- const anyCompleted = todaysLessons.some((lesson) => lesson.progressStatus === 'completed')
59
- const noneCompleted = todaysLessons.every((lesson) => lesson.progressStatus !== 'completed')
60
57
 
61
- const nextIncompleteLesson = todaysLessons.find(
58
+ const nextIncompleteLesson = learningPath?.todays_lessons.find(
62
59
  (lesson) => lesson.progressStatus !== 'completed'
63
60
  )
64
- let maxProgressTimestamp = Math.max(...todaysLessons.map((lesson) => lesson.progressTimestamp))
65
- if (!maxProgressTimestamp) {
66
- maxProgressTimestamp = dailySession.active_learning_path_created_at
67
- }
68
- let ctaText, action
61
+ let ctaText,
62
+ action,
63
+ nextLesson = null
69
64
  if (noneCompleted) {
70
65
  ctaText = 'Start Session'
71
66
  action = getMethodActionCTA(nextIncompleteLesson)
@@ -73,26 +68,28 @@ export async function getMethodCard(brand) {
73
68
  ctaText = 'Continue Session'
74
69
  action = getMethodActionCTA(nextIncompleteLesson)
75
70
  } else if (allCompleted) {
76
- //TODO:: get next lessons when all completed
77
- const nextAvailableLesson = null
78
-
79
- ctaText = nextAvailableLesson ? 'Start Next Lesson' : 'Browse Lessons'
80
- action = nextAvailableLesson
81
- ? getMethodActionCTA(nextAvailableLesson)
71
+ ctaText = learningPath.next_lesson ? 'Start Next Lesson' : 'Browse Lessons'
72
+ action = learningPath.next_lesson
73
+ ? getMethodActionCTA(learningPath.next_lesson)
82
74
  : {
83
75
  type: 'lessons',
84
76
  brand: brand,
85
77
  }
86
78
  }
79
+
80
+ let maxProgressTimestamp = Math.max(
81
+ ...learningPath?.children.map((lesson) => lesson.progressTimestamp)
82
+ )
83
+ if (!maxProgressTimestamp) {
84
+ maxProgressTimestamp = learningPath.active_learning_path_created_at
85
+ }
86
+
87
87
  return {
88
88
  id: 0,
89
- type: 'method',
89
+ type: 'learning-path-v2',
90
90
  progressType: 'content',
91
91
  header: 'Method',
92
- body: {
93
- todays_lessons: todaysLessons,
94
- next_learning_path_lessons: nextLPLessons,
95
- },
92
+ body: learningPath,
96
93
  cta: {
97
94
  text: ctaText,
98
95
  action: action,
@@ -2299,7 +2299,7 @@ export async function fetchShows(brand, type, sort = 'sort') {
2299
2299
  export async function fetchMethodV2IntroVideo(brand) {
2300
2300
  const type = "method-intro";
2301
2301
  const filter = `_type == '${type}' && brand == '${brand}'`;
2302
- const fields = getIntroVideoFields();
2302
+ const fields = getIntroVideoFields('method');
2303
2303
 
2304
2304
  const query = `*[${filter}] { ${fields.join(", ")} }`;
2305
2305
  return fetchSanity(query, false);
@@ -163,3 +163,30 @@ export async function numberOfActiveUsers(): Promise<number> {
163
163
  const response = await httpClient.get<{ active_users: number }>(apiUrl)
164
164
  return response.active_users
165
165
  }
166
+
167
+ export interface UserResource {
168
+ id: number
169
+ email: string
170
+ display_name: string
171
+ first_name: string
172
+ last_name: string
173
+ permission_level: string
174
+ use_student_view: boolean
175
+ is_admin: boolean
176
+ show_admin_toggle: boolean
177
+ [key: string]: any // Allow additional properties from the API
178
+ }
179
+
180
+ /**
181
+ * Toggles the student view mode for admin users.
182
+ * When enabled, admins see the platform as a regular student would.
183
+ *
184
+ * @param {boolean} useStudentView - Whether to enable student view mode (true) or admin view mode (false).
185
+ * @returns {Promise<UserResource>} - A promise that resolves to the updated user resource.
186
+ * @throws {HttpError} - Throws HttpError if the request fails or user is not an admin.
187
+ */
188
+ export async function toggleStudentView(useStudentView: boolean): Promise<UserResource> {
189
+ const apiUrl = `/api/user-management-system/v1/user/student-view`
190
+ const httpClient = new HttpClient(globalConfig.baseUrl, globalConfig.sessionConfig.token)
191
+ return httpClient.patch<UserResource>(apiUrl, { use_student_view: useStudentView })
192
+ }
@@ -73,6 +73,8 @@
73
73
  * @property {number} send_mobile_app_push_notifications
74
74
  * @property {number} send_email_notifications
75
75
  * @property {number} use_legacy_video_player
76
+ * @property {boolean} use_student_view
77
+ * @property {boolean} show_admin_toggle
76
78
  * @property {number} drumeo_ship_magazine
77
79
  * @property {string|null} magazine_shipping_address_id
78
80
  * @property {string|null} ios_latest_review_display_date
@@ -1055,12 +1055,11 @@ function generateContentsMap(contents, playlistsContents, methodProgressContents
1055
1055
  */
1056
1056
  export async function getProgressRows({ brand = 'drumeo', limit = 8 } = {}) {
1057
1057
  // TODO slice progress to a reasonable number, say 100
1058
-
1059
- const [recentPlaylists, progressContents, userPinnedItem, methodCard] = await Promise.all([
1058
+ const methodCardPromise = getMethodCard(brand)
1059
+ const [recentPlaylists, progressContents, userPinnedItem] = await Promise.all([
1060
1060
  fetchUserPlaylists(brand, { sort: '-last_progress', limit: limit }),
1061
1061
  getAllStartedOrCompleted({ onlyIds: false, brand: brand }),
1062
1062
  getUserPinnedItem(brand),
1063
- getMethodCard(brand),
1064
1063
  ])
1065
1064
 
1066
1065
  const playlists = recentPlaylists?.data || []
@@ -1103,7 +1102,7 @@ export async function getProgressRows({ brand = 'drumeo', limit = 8 } = {}) {
1103
1102
  ])
1104
1103
 
1105
1104
  const contentsMap = generateContentsMap(contents, playlistsContents)
1106
-
1105
+ const methodCard = await methodCardPromise
1107
1106
  let combined = await extractPinnedItemsAndSortAllItems(
1108
1107
  userPinnedItem,
1109
1108
  contentsMap,
@@ -1,6 +1,8 @@
1
1
  import { initializeTestService } from './initializeTests.js'
2
- import { fetchLearningPathLessons } from '../src/services/content-org/learning-paths.ts'
3
- import { fetchByRailContentId } from '../src/services/sanity.js'
2
+ import {
3
+ fetchLearningPathLessons,
4
+ getLearningPath,
5
+ } from '../src/services/content-org/learning-paths.ts'
4
6
  import { contentStatusCompleted } from '../src/services/contentProgress.js'
5
7
  describe('learning-paths', function () {
6
8
  beforeEach(async () => {
@@ -8,7 +10,7 @@ describe('learning-paths', function () {
8
10
  })
9
11
 
10
12
  test('getLearningPathsV2Test', async () => {
11
- const results = await fetchByRailContentId(417140, 'learning-path-v2')
13
+ const results = await getLearningPath(417140)
12
14
  })
13
15
  test('getlearningPathLessonsTestNew', async () => {
14
16
  await contentStatusCompleted(417105)