Skip to content

Commit 20fbb86

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(oracle-fusion-learning): scope offering summaries and address CI feedback
1 parent c25b946 commit 20fbb86

48 files changed

Lines changed: 3674 additions & 1125 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/sim/blocks/blocks/oracle_fusion_learning.ts

Lines changed: 1005 additions & 185 deletions
Large diffs are not rendered by default.

apps/sim/lib/internal/oracle-fusion-learning/execute-tool.test.ts

Lines changed: 93 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,17 @@ const mocks = vi.hoisted(() => ({
4747
}))
4848
vi.mock('@/lib/internal/oracle-fusion-learning/operations', () => mocks)
4949

50-
const auth = { instanceUrl: 'https://acme.fa.ocs.oraclecloud.com', accessToken: 'test-access-token' }
50+
const auth = {
51+
instanceUrl: 'https://acme.fa.ocs.oraclecloud.com',
52+
accessToken: 'test-access-token',
53+
}
5154
function invoke(overrides: Partial<InternalToolOperationCall> = {}) {
5255
return executeOracleFusionLearningTool({
53-
toolId: 'oracle_fusion_learning_list_self_paced_items', input: auth,
54-
headers: new Headers(), context: { workflowId: 'workflow', workspaceId: 'workspace', userId: 'user' }, requestId: 'request',
56+
toolId: 'oracle_fusion_learning_list_self_paced_items',
57+
input: auth,
58+
headers: new Headers(),
59+
context: { workflowId: 'workflow', workspaceId: 'workspace', userId: 'user' },
60+
requestId: 'request',
5561
...overrides,
5662
})
5763
}
@@ -64,30 +70,91 @@ describe('Learning operation dispatch', () => {
6470

6571
it.each([
6672
['list_self_paced_items', 'executeListSelfPacedItems', {}],
67-
['get_self_paced_item', 'executeGetSelfPacedItem', {"learningItemId":"1"}],
68-
['create_self_paced_item', 'executeCreateSelfPacedItem', {"body":{"learningItemNumber":"DRAFT-1","learningItemVisibility":"TEST_VISIBILITY"}}],
69-
['update_self_paced_item', 'executeUpdateSelfPacedItem', {"learningItemId":"1","body":{"learningItemDescription":null}}],
70-
['delete_self_paced_item', 'executeDeleteSelfPacedItem', {"learningItemId":"1"}],
73+
['get_self_paced_item', 'executeGetSelfPacedItem', { learningItemId: '1' }],
74+
[
75+
'create_self_paced_item',
76+
'executeCreateSelfPacedItem',
77+
{ body: { learningItemNumber: 'DRAFT-1', learningItemVisibility: 'TEST_VISIBILITY' } },
78+
],
79+
[
80+
'update_self_paced_item',
81+
'executeUpdateSelfPacedItem',
82+
{ learningItemId: '1', body: { learningItemDescription: null } },
83+
],
84+
['delete_self_paced_item', 'executeDeleteSelfPacedItem', { learningItemId: '1' }],
7185
['list_learning_events', 'executeListLearningEvents', {}],
72-
['get_learning_event', 'executeGetLearningEvent', {"eventId":"1"}],
73-
['create_learning_event', 'executeCreateLearningEvent', {"body":{"learningItemNumber":"EVENT-1","learningItemVisibility":"TEST_VISIBILITY"}}],
74-
['update_learning_event', 'executeUpdateLearningEvent', {"eventId":"1","body":{"learningItemDescription":null}}],
75-
['list_event_activities', 'executeListEventActivities', {"eventId":"1"}],
76-
['create_event_activity', 'executeCreateEventActivity', {"eventId":"1","body":{"activityNumber":"ACT-1","status":"TEST_STATUS"}}],
77-
['update_event_activity', 'executeUpdateEventActivity', {"eventId":"1","activityId":"1","body":{"description":null}}],
78-
['delete_event_activity', 'executeDeleteEventActivity', {"eventId":"1","activityId":"1"}],
79-
['list_learning_records', 'executeListLearningRecords', {"personId":"1"}],
80-
['get_learning_record', 'executeGetLearningRecord', {"personId":"1","recordId":"1"}],
81-
['create_learning_record', 'executeCreateLearningRecord', {"personId":"1","body":{"learningItemId":"3"}}],
82-
['update_learning_record', 'executeUpdateLearningRecord', {"personId":"1","recordId":"1","body":{"completedDate":null}}],
83-
['list_selected_course_offerings', 'executeListSelectedCourseOfferings', {"personId":"1","recordId":"1"}],
84-
['select_course_offering', 'executeSelectCourseOffering', {"personId":"1","recordId":"1","body":{"learningItemId":"4"}}],
85-
['update_selected_course_offering', 'executeUpdateSelectedCourseOffering', {"personId":"1","recordId":"1","offeringRecordId":"1","body":{"assignmentDueDate":null}}],
86-
['list_completion_details', 'executeListCompletionDetails', {"personId":"1","recordId":"1"}],
87-
['update_completion_detail', 'executeUpdateCompletionDetail', {"personId":"1","recordId":"1","completionDetailId":"1","body":{"activityAttemptStatus":"ORA_ASSN_TASK_COMPLETED"}}],
88-
['list_completion_summaries', 'executeListCompletionSummaries', {"personId":"1","recordId":"1"}],
89-
['list_learning_record_action_hints', 'executeListLearningRecordActionHints', {"personId":"1","recordId":"1"}],
90-
['list_enrollment_history', 'executeListEnrollmentHistory', {"personId":"1","recordId":"1"}],
86+
['get_learning_event', 'executeGetLearningEvent', { eventId: '1' }],
87+
[
88+
'create_learning_event',
89+
'executeCreateLearningEvent',
90+
{ body: { learningItemNumber: 'EVENT-1', learningItemVisibility: 'TEST_VISIBILITY' } },
91+
],
92+
[
93+
'update_learning_event',
94+
'executeUpdateLearningEvent',
95+
{ eventId: '1', body: { learningItemDescription: null } },
96+
],
97+
['list_event_activities', 'executeListEventActivities', { eventId: '1' }],
98+
[
99+
'create_event_activity',
100+
'executeCreateEventActivity',
101+
{ eventId: '1', body: { activityNumber: 'ACT-1', status: 'TEST_STATUS' } },
102+
],
103+
[
104+
'update_event_activity',
105+
'executeUpdateEventActivity',
106+
{ eventId: '1', activityId: '1', body: { description: null } },
107+
],
108+
['delete_event_activity', 'executeDeleteEventActivity', { eventId: '1', activityId: '1' }],
109+
['list_learning_records', 'executeListLearningRecords', { personId: '1' }],
110+
['get_learning_record', 'executeGetLearningRecord', { personId: '1', recordId: '1' }],
111+
[
112+
'create_learning_record',
113+
'executeCreateLearningRecord',
114+
{ personId: '1', body: { learningItemId: '3' } },
115+
],
116+
[
117+
'update_learning_record',
118+
'executeUpdateLearningRecord',
119+
{ personId: '1', recordId: '1', body: { completedDate: null } },
120+
],
121+
[
122+
'list_selected_course_offerings',
123+
'executeListSelectedCourseOfferings',
124+
{ personId: '1', recordId: '1' },
125+
],
126+
[
127+
'select_course_offering',
128+
'executeSelectCourseOffering',
129+
{ personId: '1', recordId: '1', body: { learningItemId: '4' } },
130+
],
131+
[
132+
'update_selected_course_offering',
133+
'executeUpdateSelectedCourseOffering',
134+
{ personId: '1', recordId: '1', offeringRecordId: '1', body: { assignmentDueDate: null } },
135+
],
136+
['list_completion_details', 'executeListCompletionDetails', { personId: '1', recordId: '1' }],
137+
[
138+
'update_completion_detail',
139+
'executeUpdateCompletionDetail',
140+
{
141+
personId: '1',
142+
recordId: '1',
143+
completionDetailId: '1',
144+
body: { activityAttemptStatus: 'ORA_ASSN_TASK_COMPLETED' },
145+
},
146+
],
147+
[
148+
'list_completion_summaries',
149+
'executeListCompletionSummaries',
150+
{ personId: '1', recordId: '1' },
151+
],
152+
[
153+
'list_learning_record_action_hints',
154+
'executeListLearningRecordActionHints',
155+
{ personId: '1', recordId: '1' },
156+
],
157+
['list_enrollment_history', 'executeListEnrollmentHistory', { personId: '1', recordId: '1' }],
91158
['list_assignment_profiles', 'executeListAssignmentProfiles', {}],
92159
['get_assignment_profile', 'executeGetAssignmentProfile', {"profileId":"1"}],
93160
['create_assignment_profile', 'executeCreateAssignmentProfile', {"body":{"assignmentProfileStatus":"TEST_STATUS","assignmentType":"ORA_REQUIRE_ASSIGNMENT","learningItemId":"3"}}],

0 commit comments

Comments
 (0)