From be94bcd03f40d6793e73f028e7ad8625a57a3493 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 1 Oct 2025 13:01:18 +0530 Subject: [PATCH 1/7] chore: Refactor proctoring provider handling in Settings --- plugins/course-apps/proctoring/Settings.jsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.jsx b/plugins/course-apps/proctoring/Settings.jsx index 645bc95dd0..e6301bf983 100644 --- a/plugins/course-apps/proctoring/Settings.jsx +++ b/plugins/course-apps/proctoring/Settings.jsx @@ -84,10 +84,7 @@ const ProctoringSettings = ({ onClose }) => { } else if (name === 'proctoringProvider') { const newFormValues = { ...formValues, proctoringProvider: value }; - if (value === 'proctortrack') { - setFormValues({ ...newFormValues, createZendeskTickets: false }); - setShowEscalationEmail(true); - } else if (value === 'software_secure') { + if (value === 'software_secure') { setFormValues({ ...newFormValues, createZendeskTickets: true }); setShowEscalationEmail(false); } else if (isLtiProvider(value)) { From da94636a9f0a6e2b9447611b224d98a637c9f0bf Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 09:38:48 +0530 Subject: [PATCH 2/7] chore: Skip Zendesk ticket tests for deprecated provider Skipped tests related to Zendesk ticket functionality due to proctortrack provider deprecation. --- plugins/course-apps/proctoring/Settings.test.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 6cdd33aa16..a2f024fe55 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -115,7 +115,8 @@ describe('ProctoredExamSettings', () => { expect(zendeskTicketInput.checked).toEqual(true); }); - it('Updates Zendesk ticket field if software_secure is provider', async () => { + it.skip('Updates Zendesk ticket field if software_secure is provider', async () => { + // Test skipped as proctortrack provider is being deprecated from the platform await waitFor(() => { screen.getByDisplayValue('mockproc'); }); @@ -863,7 +864,8 @@ describe('ProctoredExamSettings', () => { }); }); - it('Include Zendesk ticket in post request if user is not an admin', async () => { + it.skip('Include Zendesk ticket in post request if user is not an admin', async () => { + // Test skipped as proctortrack provider is being deprecated from the platform // use non-admin user for test const isAdmin = false; setupApp(isAdmin); From fd78dd6dbc478ad610dd2fa589b022bcb4ef81ac Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 10:21:29 +0530 Subject: [PATCH 3/7] chore: Skip proctortrack related tests in Settings.test.jsx Skip tests related to proctortrack provider updates. --- plugins/course-apps/proctoring/Settings.test.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index a2f024fe55..092e1f53d3 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -105,7 +105,7 @@ describe('ProctoredExamSettings', () => { await act(async () => render(intlWrapper())); }); - it('Updates Zendesk ticket field if proctortrack is provider', async () => { + it.skip('Updates Zendesk ticket field if proctortrack is provider', async () => { await waitFor(() => { screen.getByDisplayValue('mockproc'); }); @@ -607,7 +607,7 @@ describe('ProctoredExamSettings', () => { expect(submitButton).toHaveAttribute('disabled'); }); - it('Makes API call successfully with proctoring_escalation_email if proctortrack', async () => { + it.skip('Makes API call successfully with proctoring_escalation_email if proctortrack', async () => { await act(async () => render(intlWrapper())); // Make a change to the provider to proctortrack and set the email const selectElement = screen.getByDisplayValue('mockproc'); From 19a279ee3c0e9aef5b7fe95aa73f52c0f9b34e6d Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 10:33:47 +0530 Subject: [PATCH 4/7] chore: Skip tests for Proctortrack deprecation Updated tests to skip those related to Proctortrack deprecation. --- plugins/course-apps/proctoring/Settings.test.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 092e1f53d3..af6cfe96dc 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -105,6 +105,7 @@ describe('ProctoredExamSettings', () => { await act(async () => render(intlWrapper())); }); + // Test skipped due to Proctortrack deprecation it.skip('Updates Zendesk ticket field if proctortrack is provider', async () => { await waitFor(() => { screen.getByDisplayValue('mockproc'); @@ -115,8 +116,7 @@ describe('ProctoredExamSettings', () => { expect(zendeskTicketInput.checked).toEqual(true); }); - it.skip('Updates Zendesk ticket field if software_secure is provider', async () => { - // Test skipped as proctortrack provider is being deprecated from the platform + it('Updates Zendesk ticket field if software_secure is provider', async () => { await waitFor(() => { screen.getByDisplayValue('mockproc'); }); @@ -350,7 +350,8 @@ describe('ProctoredExamSettings', () => { expect(screen.queryByTestId('escalationEmail')).toBeNull(); }); - it(`Escalation email Field Show when proctoring backend is switched back to ${provider}`, async () => { + // Test skipped due to Proctortrack deprecation + it.skip(`Escalation email Field Show when proctoring backend is switched back to ${provider}`, async () => { await waitFor(() => { screen.getByDisplayValue('proctortrack'); }); @@ -607,6 +608,7 @@ describe('ProctoredExamSettings', () => { expect(submitButton).toHaveAttribute('disabled'); }); + // Test skipped due to Proctortrack deprecation it.skip('Makes API call successfully with proctoring_escalation_email if proctortrack', async () => { await act(async () => render(intlWrapper())); // Make a change to the provider to proctortrack and set the email @@ -864,8 +866,8 @@ describe('ProctoredExamSettings', () => { }); }); + // Test skipped due to Proctortrack deprecation it.skip('Include Zendesk ticket in post request if user is not an admin', async () => { - // Test skipped as proctortrack provider is being deprecated from the platform // use non-admin user for test const isAdmin = false; setupApp(isAdmin); From e1f198c6479bfe78ff0d12a3f8ffb32e843e94fd Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 10:49:00 +0530 Subject: [PATCH 5/7] chore: Skip alert test for invalid proctoring escalation email Updated test to skip due to Proctortrack deprecation and changed selector for escalation email input. --- plugins/course-apps/proctoring/Settings.test.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index af6cfe96dc..f5823dcea9 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -251,7 +251,8 @@ describe('ProctoredExamSettings', () => { expect(document.activeElement).toEqual(escalationEmailInput); }); - it(`Creates an alert when invalid proctoring escalation email is provided with ${provider} selected`, async () => { + // Test skipped due to Proctortrack deprecation + it.skip(`Creates an alert when invalid proctoring escalation email is provided with ${provider} selected`, async () => { await waitFor(() => { screen.getByDisplayValue('proctortrack'); }); @@ -259,7 +260,7 @@ describe('ProctoredExamSettings', () => { const selectElement = screen.getByDisplayValue('proctortrack'); fireEvent.change(selectElement, { target: { value: provider } }); - const selectEscalationEmailElement = screen.getByDisplayValue('test@example.com'); + const selectEscalationEmailElement = screen.getByTestId('escalationEmail'); fireEvent.change(selectEscalationEmailElement, { target: { value: 'foo.bar' } }); const proctoringForm = screen.getByTestId('proctoringForm'); fireEvent.submit(proctoringForm); From be5045062ecd81b87f37322b1c6bd58767611051 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 11:03:54 +0530 Subject: [PATCH 6/7] chore: Update test to select escalation email by display value --- plugins/course-apps/proctoring/Settings.test.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index f5823dcea9..51e8024e95 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -260,7 +260,7 @@ describe('ProctoredExamSettings', () => { const selectElement = screen.getByDisplayValue('proctortrack'); fireEvent.change(selectElement, { target: { value: provider } }); - const selectEscalationEmailElement = screen.getByTestId('escalationEmail'); + const selectEscalationEmailElement = screen.getByDisplayValue('test@example.com'); fireEvent.change(selectEscalationEmailElement, { target: { value: 'foo.bar' } }); const proctoringForm = screen.getByTestId('proctoringForm'); fireEvent.submit(proctoringForm); From 9942e167ea306be90f1f73509b46f408c1839ef1 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Mon, 6 Oct 2025 11:52:46 +0530 Subject: [PATCH 7/7] chore: Remove deprecated Proctortrack tests from Settings.test.jsx Removed tests related to Proctortrack due to its deprecation. --- .../course-apps/proctoring/Settings.test.jsx | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/plugins/course-apps/proctoring/Settings.test.jsx b/plugins/course-apps/proctoring/Settings.test.jsx index 51e8024e95..006eb1298a 100644 --- a/plugins/course-apps/proctoring/Settings.test.jsx +++ b/plugins/course-apps/proctoring/Settings.test.jsx @@ -105,17 +105,6 @@ describe('ProctoredExamSettings', () => { await act(async () => render(intlWrapper())); }); - // Test skipped due to Proctortrack deprecation - it.skip('Updates Zendesk ticket field if proctortrack is provider', async () => { - await waitFor(() => { - screen.getByDisplayValue('mockproc'); - }); - const selectElement = screen.getByDisplayValue('mockproc'); - fireEvent.change(selectElement, { target: { value: 'proctortrack' } }); - const zendeskTicketInput = screen.getByTestId('createZendeskTicketsNo'); - expect(zendeskTicketInput.checked).toEqual(true); - }); - it('Updates Zendesk ticket field if software_secure is provider', async () => { await waitFor(() => { screen.getByDisplayValue('mockproc'); @@ -609,38 +598,6 @@ describe('ProctoredExamSettings', () => { expect(submitButton).toHaveAttribute('disabled'); }); - // Test skipped due to Proctortrack deprecation - it.skip('Makes API call successfully with proctoring_escalation_email if proctortrack', async () => { - await act(async () => render(intlWrapper())); - // Make a change to the provider to proctortrack and set the email - const selectElement = screen.getByDisplayValue('mockproc'); - fireEvent.change(selectElement, { target: { value: 'proctortrack' } }); - const escalationEmail = screen.getByTestId('escalationEmail'); - expect(escalationEmail.value).toEqual('test@example.com'); - fireEvent.change(escalationEmail, { target: { value: 'proctortrack@example.com' } }); - expect(escalationEmail.value).toEqual('proctortrack@example.com'); - const submitButton = screen.getByTestId('submissionButton'); - fireEvent.click(submitButton); - expect(axiosMock.history.post.length).toBe(1); - expect(JSON.parse(axiosMock.history.post[0].data)).toEqual({ - proctored_exam_settings: { - enable_proctored_exams: true, - allow_proctoring_opt_out: false, - proctoring_provider: 'proctortrack', - proctoring_escalation_email: 'proctortrack@example.com', - create_zendesk_tickets: false, - }, - }); - - await waitFor(() => { - const errorAlert = screen.getByTestId('saveSuccess'); - expect(errorAlert.textContent).toEqual( - expect.stringContaining('Proctored exam settings saved successfully.'), - ); - expect(document.activeElement).toEqual(errorAlert); - }); - }); - it('Makes API call successfully without proctoring_escalation_email if not proctortrack', async () => { await act(async () => render(intlWrapper()));