forked from openedx/frontend-lib-special-exams
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: don't show IDV interstitial if IDV is turned off for the course (…
…#52)
- Loading branch information
Showing
6 changed files
with
77 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -814,6 +814,56 @@ describe('SequenceExamWrapper', () => { | |
}); | ||
}); | ||
|
||
it('Shows download software proctored exam instructions verification is not approved, but integrity signature flag is turned on', () => { | ||
const instructions = [ | ||
'instruction 1', | ||
'instruction 2', | ||
'instruction 3', | ||
]; | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
activeAttempt: {}, | ||
proctoringSettings: Factory.build('proctoringSettings', { | ||
provider_name: 'Provider Name', | ||
provider_tech_support_email: '[email protected]', | ||
provider_tech_support_phone: '+123456789', | ||
exam_proctoring_backend: { | ||
instructions, | ||
}, | ||
}), | ||
verification: { | ||
status: VerificationStatus.NONE, | ||
can_verify: true, | ||
}, | ||
exam: Factory.build('exam', { | ||
is_proctored: true, | ||
type: ExamType.PROCTORED, | ||
attempt: Factory.build('attempt', { | ||
attempt_status: ExamStatus.CREATED, | ||
}), | ||
}), | ||
}), | ||
}); | ||
|
||
render( | ||
<ExamStateProvider> | ||
<Instructions isIntegritySignatureEnabled> | ||
<div>Sequence</div> | ||
</Instructions> | ||
</ExamStateProvider>, | ||
{ store }, | ||
); | ||
|
||
expect(screen.getByText( | ||
'If you have issues relating to proctoring, you can contact ' | ||
+ 'Provider Name technical support by emailing [email protected] or by calling +123456789.', | ||
)).toBeInTheDocument(); | ||
expect(screen.getByText('Set up and start your proctored exam.')).toBeInTheDocument(); | ||
instructions.forEach((instruction) => { | ||
expect(screen.getByText(instruction)).toBeInTheDocument(); | ||
}); | ||
}); | ||
|
||
it('Shows error message if receives unknown attempt status', () => { | ||
store.getState = () => ({ | ||
examState: Factory.build('examState', { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters