Skip to content

Commit

Permalink
refactor: updated snapshots for failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
BilalQamar95 committed Dec 5, 2023
1 parent 186ddb0 commit 7b333a0
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 73 deletions.
144 changes: 72 additions & 72 deletions src/data/__snapshots__/redux.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Data layer integration tests Test examRequiresAccessToken Should get exam access token 1`] = `
Object {
{
"exam_access_token": "Z173480948902JK34432",
"exam_access_token_expiration": "60",
}
`;

exports[`Data layer integration tests Test getExamAttemptsData Should get, and save exam and attempt 1`] = `
Object {
"examState": Object {
"activeAttempt": Object {
{
"examState": {
"activeAttempt": {
"attempt_code": "",
"attempt_id": 1,
"attempt_status": "started",
Expand All @@ -28,8 +28,8 @@ Object {
},
"allowProctoringOptOut": false,
"apiErrorMsg": "",
"exam": Object {
"attempt": Object {
"exam": {
"attempt": {
"attempt_code": "",
"attempt_id": 1,
"attempt_status": "started",
Expand All @@ -56,28 +56,28 @@ Object {
"is_active": true,
"is_practice_exam": false,
"is_proctored": false,
"prerequisite_status": Object {
"prerequisite_status": {
"are_prerequisites_satisifed": true,
"declined_prerequisites": Array [],
"failed_prerequisites": Array [],
"pending_prerequisites": Array [],
"satisfied_prerequisites": Array [],
"declined_prerequisites": [],
"failed_prerequisites": [],
"pending_prerequisites": [],
"satisfied_prerequisites": [],
},
"time_limit_mins": 30,
"total_time": "30 minutes",
"type": "timed",
},
"examAccessToken": Object {
"examAccessToken": {
"exam_access_token": "",
"exam_access_token_expiration": "",
},
"isLoading": false,
"proctoringSettings": Object {
"exam_proctoring_backend": Object {
"proctoringSettings": {
"exam_proctoring_backend": {
"download_url": "",
"instructions": Array [],
"instructions": [],
"name": "",
"rules": Object {},
"rules": {},
},
"integration_specific_email": "",
"learner_notification_from_email": "",
Expand All @@ -91,9 +91,9 @@ Object {
`;

exports[`Data layer integration tests Test getLatestAttemptData with edx-proctoring as a backend (no EXAMS_BASE_URL) Should get, and save latest attempt 1`] = `
Object {
"examState": Object {
"activeAttempt": Object {
{
"examState": {
"activeAttempt": {
"attempt_code": "",
"attempt_id": 1,
"attempt_status": "started",
Expand All @@ -111,18 +111,18 @@ Object {
},
"allowProctoringOptOut": false,
"apiErrorMsg": "",
"exam": Object {},
"examAccessToken": Object {
"exam": {},
"examAccessToken": {
"exam_access_token": "",
"exam_access_token_expiration": "",
},
"isLoading": false,
"proctoringSettings": Object {
"exam_proctoring_backend": Object {
"proctoringSettings": {
"exam_proctoring_backend": {
"download_url": "",
"instructions": Array [],
"instructions": [],
"name": "",
"rules": Object {},
"rules": {},
},
"integration_specific_email": "",
"learner_notification_from_email": "",
Expand All @@ -136,12 +136,12 @@ Object {
`;

exports[`Data layer integration tests Test getProctoringSettings Should fail to fetch if error occurs 1`] = `
Object {
"exam_proctoring_backend": Object {
{
"exam_proctoring_backend": {
"download_url": "",
"instructions": Array [],
"instructions": [],
"name": "",
"rules": Object {},
"rules": {},
},
"integration_specific_email": "",
"learner_notification_from_email": "",
Expand All @@ -152,12 +152,12 @@ Object {
`;

exports[`Data layer integration tests Test getProctoringSettings Should get, and save proctoringSettings 1`] = `
Object {
"exam_proctoring_backend": Object {
{
"exam_proctoring_backend": {
"download_url": "",
"instructions": Array [],
"instructions": [],
"name": "",
"rules": Object {},
"rules": {},
},
"integration_specific_email": "",
"learner_notification_from_email": "",
Expand All @@ -168,12 +168,12 @@ Object {
`;

exports[`Data layer integration tests Test getProctoringSettings Test legacy URL for getProctoringSettings Should get, and save proctoringSettings 1`] = `
Object {
"exam_proctoring_backend": Object {
{
"exam_proctoring_backend": {
"download_url": "",
"instructions": Array [],
"instructions": [],
"name": "",
"rules": Object {},
"rules": {},
},
"integration_specific_email": "",
"learner_notification_from_email": "",
Expand All @@ -184,7 +184,7 @@ Object {
`;

exports[`Data layer integration tests Test pollAttempt Should poll and update active attempt 1`] = `
Object {
{
"attempt_code": "",
"attempt_id": 1,
"attempt_status": "started",
Expand All @@ -203,7 +203,7 @@ Object {
`;

exports[`Data layer integration tests Test pollAttempt with edx-proctoring as a backend (no EXAMS_BASE_URL) Should poll and update active attempt 1`] = `
Object {
{
"attempt_code": "",
"attempt_id": 1,
"attempt_status": "started",
Expand All @@ -222,7 +222,7 @@ Object {
`;

exports[`Data layer integration tests Test pollAttempt with edx-proctoring as a backend (no EXAMS_BASE_URL) Should poll and update active attempt 2`] = `
Object {
{
"attempt_code": "",
"attempt_id": 1,
"attempt_status": "started",
Expand All @@ -241,13 +241,13 @@ Object {
`;

exports[`Data layer integration tests Test resetExam Should reset exam attempt 1`] = `
Object {
"examState": Object {
{
"examState": {
"activeAttempt": null,
"allowProctoringOptOut": false,
"apiErrorMsg": "",
"exam": Object {
"attempt": Object {
"exam": {
"attempt": {
"attempt_code": "",
"attempt_id": 2,
"attempt_status": "created",
Expand All @@ -274,28 +274,28 @@ Object {
"is_active": true,
"is_practice_exam": false,
"is_proctored": false,
"prerequisite_status": Object {
"prerequisite_status": {
"are_prerequisites_satisifed": true,
"declined_prerequisites": Array [],
"failed_prerequisites": Array [],
"pending_prerequisites": Array [],
"satisfied_prerequisites": Array [],
"declined_prerequisites": [],
"failed_prerequisites": [],
"pending_prerequisites": [],
"satisfied_prerequisites": [],
},
"time_limit_mins": 30,
"total_time": "30 minutes",
"type": "timed",
},
"examAccessToken": Object {
"examAccessToken": {
"exam_access_token": "",
"exam_access_token_expiration": "",
},
"isLoading": false,
"proctoringSettings": Object {
"exam_proctoring_backend": Object {
"proctoringSettings": {
"exam_proctoring_backend": {
"download_url": "",
"instructions": Array [],
"instructions": [],
"name": "",
"rules": Object {},
"rules": {},
},
"integration_specific_email": "",
"learner_notification_from_email": "",
Expand All @@ -309,13 +309,13 @@ Object {
`;

exports[`Data layer integration tests Test resetExam with edx-proctoring as backend (no EXAMS_BASE_URL) Should reset exam attempt 1`] = `
Object {
"examState": Object {
{
"examState": {
"activeAttempt": null,
"allowProctoringOptOut": false,
"apiErrorMsg": "",
"exam": Object {
"attempt": Object {
"exam": {
"attempt": {
"attempt_code": "",
"attempt_id": 2,
"attempt_status": "created",
Expand All @@ -342,28 +342,28 @@ Object {
"is_active": true,
"is_practice_exam": false,
"is_proctored": false,
"prerequisite_status": Object {
"prerequisite_status": {
"are_prerequisites_satisifed": true,
"declined_prerequisites": Array [],
"failed_prerequisites": Array [],
"pending_prerequisites": Array [],
"satisfied_prerequisites": Array [],
"declined_prerequisites": [],
"failed_prerequisites": [],
"pending_prerequisites": [],
"satisfied_prerequisites": [],
},
"time_limit_mins": 30,
"total_time": "30 minutes",
"type": "timed",
},
"examAccessToken": Object {
"examAccessToken": {
"exam_access_token": "",
"exam_access_token_expiration": "",
},
"isLoading": false,
"proctoringSettings": Object {
"exam_proctoring_backend": Object {
"proctoringSettings": {
"exam_proctoring_backend": {
"download_url": "",
"instructions": Array [],
"instructions": [],
"name": "",
"rules": Object {},
"rules": {},
},
"integration_specific_email": "",
"learner_notification_from_email": "",
Expand All @@ -377,7 +377,7 @@ Object {
`;

exports[`Data layer integration tests Test startProctoredExam Should start exam, and update attempt and exam 1`] = `
Object {
{
"attempt_code": "",
"attempt_id": 1,
"attempt_status": "started",
Expand All @@ -396,7 +396,7 @@ Object {
`;

exports[`Data layer integration tests Test startProctoredExam with edx-proctoring as a backend (no EXAMS_BASE_URL) Should start exam, and update attempt and exam 1`] = `
Object {
{
"attempt_code": "",
"attempt_id": 1,
"attempt_status": "started",
Expand All @@ -415,7 +415,7 @@ Object {
`;

exports[`Data layer integration tests Test startTimedExam Should create and start exam 1`] = `
Object {
{
"attempt_code": "",
"attempt_id": 1,
"attempt_status": "started",
Expand All @@ -434,7 +434,7 @@ Object {
`;

exports[`Data layer integration tests Test startTimedExam with edx-proctoring as a backend (no EXAMS_BASE_URL) Should create and start exam 1`] = `
Object {
{
"attempt_code": "",
"attempt_id": 1,
"attempt_status": "started",
Expand Down
2 changes: 1 addition & 1 deletion src/exam/__snapshots__/ExamAPIError.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ExamAPIError renders with the default information 1`] = `
Object {
{
"asFragment": [Function],
"baseElement": <body>
<div>
Expand Down

0 comments on commit 7b333a0

Please sign in to comment.