diff --git a/client/app/bundles/course/assessment/question/scribing/__test__/index.test.js b/client/app/bundles/course/assessment/question/scribing/__test__/index.test.js index 75eaa967bc3..2130c67751e 100644 --- a/client/app/bundles/course/assessment/question/scribing/__test__/index.test.js +++ b/client/app/bundles/course/assessment/question/scribing/__test__/index.test.js @@ -202,7 +202,7 @@ describe('Scribing question', () => { await sleep(1); newPage.update(); - newPage.find('[type="submit"]').first().simulate('click'); + newPage.find('button').first().simulate('submit'); await sleep(1); expect(spyCreate).toHaveBeenCalled(); @@ -211,7 +211,7 @@ describe('Scribing question', () => { it('allows question to be updated', async () => { Object.defineProperty(window.location, 'pathname', { writable: true, - value: `/courses/${courseId}/assessments/${assessmentId}/question/scribing/${scribingId}`, + value: `/courses/${courseId}/assessments/${assessmentId}/question/scribing/${scribingId}/edit`, }); const spyUpdate = jest.spyOn(CourseAPI.question.scribing.scribings, 'update'); @@ -223,16 +223,16 @@ describe('Scribing question', () => { - + ); await sleep(1); fetchPage.update(); - fetchPage.find('[type="submit"]').first().simulate('click'); + fetchPage.find('button').first().simulate('submit'); await sleep(1); expect(spyUpdate).toHaveBeenCalledWith(scribingId, mockUpdatedFields);