@digabi/exam-engine-core 24.0.0-alpha.0 → 25.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AnswerToolbar.js +22 -17
- package/dist/components/AnswerToolbar.js.map +1 -1
- package/dist/components/AnsweringInstructions.js +44 -6
- package/dist/components/AnsweringInstructions.js.map +1 -1
- package/dist/components/DocumentTitle.js +40 -5
- package/dist/components/DocumentTitle.js.map +1 -1
- package/dist/components/NotificationIcon.js +10 -5
- package/dist/components/NotificationIcon.js.map +1 -1
- package/dist/components/RenderChildNodes.js +8 -3
- package/dist/components/RenderChildNodes.js.map +1 -1
- package/dist/components/RenderExamElements.js +8 -3
- package/dist/components/RenderExamElements.js.map +1 -1
- package/dist/components/RenderIf.js +10 -3
- package/dist/components/RenderIf.js.map +1 -1
- package/dist/components/ScreenReaderOnly.js +9 -2
- package/dist/components/ScreenReaderOnly.js.map +1 -1
- package/dist/components/SectionElement.js +10 -5
- package/dist/components/SectionElement.js.map +1 -1
- package/dist/components/attachments/Attachment.js +40 -5
- package/dist/components/attachments/Attachment.js.map +1 -1
- package/dist/components/attachments/AttachmentTitle.js +42 -7
- package/dist/components/attachments/AttachmentTitle.js.map +1 -1
- package/dist/components/attachments/Attachments.js +87 -47
- package/dist/components/attachments/Attachments.js.map +1 -1
- package/dist/components/attachments/ExternalMaterial.js +77 -39
- package/dist/components/attachments/ExternalMaterial.js.map +1 -1
- package/dist/components/attachments/Question.js +47 -9
- package/dist/components/attachments/Question.js.map +1 -1
- package/dist/components/attachments/QuestionTitle.js +45 -10
- package/dist/components/attachments/QuestionTitle.js.map +1 -1
- package/dist/components/context/AnnotationProvider.js +10 -4
- package/dist/components/context/AnnotationProvider.js.map +1 -1
- package/dist/components/context/AttachmentContext.js +12 -6
- package/dist/components/context/AttachmentContext.js.map +1 -1
- package/dist/components/context/AudioRecorderContext.js +41 -5
- package/dist/components/context/AudioRecorderContext.js.map +1 -1
- package/dist/components/context/CommonExamContext.js +22 -15
- package/dist/components/context/CommonExamContext.js.map +1 -1
- package/dist/components/context/ExamContext.js +10 -4
- package/dist/components/context/ExamContext.js.map +1 -1
- package/dist/components/context/GradingInstructionContext.js +8 -2
- package/dist/components/context/GradingInstructionContext.js.map +1 -1
- package/dist/components/context/IsInSidebarContext.js +5 -2
- package/dist/components/context/IsInSidebarContext.js.map +1 -1
- package/dist/components/context/QuestionContext.js +21 -15
- package/dist/components/context/QuestionContext.js.map +1 -1
- package/dist/components/context/ResultsContext.js +57 -14
- package/dist/components/context/ResultsContext.js.map +1 -1
- package/dist/components/context/SectionContext.js +16 -10
- package/dist/components/context/SectionContext.js.map +1 -1
- package/dist/components/context/TOCContext.js +5 -2
- package/dist/components/context/TOCContext.js.map +1 -1
- package/dist/components/context/withContext.js +13 -6
- package/dist/components/context/withContext.js.map +1 -1
- package/dist/components/exam/Attachment.js +40 -5
- package/dist/components/exam/Attachment.js.map +1 -1
- package/dist/components/exam/AudioAnswer.js +51 -16
- package/dist/components/exam/AudioAnswer.js.map +1 -1
- package/dist/components/exam/ChoiceAnswer.js +63 -25
- package/dist/components/exam/ChoiceAnswer.js.map +1 -1
- package/dist/components/exam/DNDAllOptions.js +19 -12
- package/dist/components/exam/DNDAllOptions.js.map +1 -1
- package/dist/components/exam/DNDAnswerContainer.js +67 -30
- package/dist/components/exam/DNDAnswerContainer.js.map +1 -1
- package/dist/components/exam/DNDAnswerOptionDraggable.js +20 -13
- package/dist/components/exam/DNDAnswerOptionDraggable.js.map +1 -1
- package/dist/components/exam/DropdownAnswer.js +85 -47
- package/dist/components/exam/DropdownAnswer.js.map +1 -1
- package/dist/components/exam/Exam.js +184 -145
- package/dist/components/exam/Exam.js.map +1 -1
- package/dist/components/exam/ExamFooter.js +8 -3
- package/dist/components/exam/ExamFooter.js.map +1 -1
- package/dist/components/exam/ExamInstruction.js +8 -3
- package/dist/components/exam/ExamInstruction.js.map +1 -1
- package/dist/components/exam/ExternalMaterial.js +57 -22
- package/dist/components/exam/ExternalMaterial.js.map +1 -1
- package/dist/components/exam/GoToExamineAnswersButton.js +42 -7
- package/dist/components/exam/GoToExamineAnswersButton.js.map +1 -1
- package/dist/components/exam/Hints.js +21 -16
- package/dist/components/exam/Hints.js.map +1 -1
- package/dist/components/exam/Question.js +76 -37
- package/dist/components/exam/Question.js.map +1 -1
- package/dist/components/exam/QuestionInstruction.js +10 -5
- package/dist/components/exam/QuestionInstruction.js.map +1 -1
- package/dist/components/exam/QuestionTitle.js +57 -19
- package/dist/components/exam/QuestionTitle.js.map +1 -1
- package/dist/components/exam/RichTextAnswer.js +23 -18
- package/dist/components/exam/RichTextAnswer.js.map +1 -1
- package/dist/components/exam/Section.js +76 -38
- package/dist/components/exam/Section.js.map +1 -1
- package/dist/components/exam/SectionInstruction.js +8 -3
- package/dist/components/exam/SectionInstruction.js.map +1 -1
- package/dist/components/exam/SectionTitle.js +58 -20
- package/dist/components/exam/SectionTitle.js.map +1 -1
- package/dist/components/exam/StudentNameHeader.js +9 -2
- package/dist/components/exam/StudentNameHeader.js.map +1 -1
- package/dist/components/exam/TextAnswer.js +19 -14
- package/dist/components/exam/TextAnswer.js.map +1 -1
- package/dist/components/exam/UndoHistoryEntry.js +21 -14
- package/dist/components/exam/UndoHistoryEntry.js.map +1 -1
- package/dist/components/exam/UndoView.d.ts +0 -1
- package/dist/components/exam/UndoView.d.ts.map +1 -1
- package/dist/components/exam/UndoView.js +45 -69
- package/dist/components/exam/UndoView.js.map +1 -1
- package/dist/components/exam/internal/AudioRecorder.js +78 -39
- package/dist/components/exam/internal/AudioRecorder.js.map +1 -1
- package/dist/components/exam/internal/ErrorIndicator.js +71 -32
- package/dist/components/exam/internal/ErrorIndicator.js.map +1 -1
- package/dist/components/exam/internal/ProgressBar.js +46 -8
- package/dist/components/exam/internal/ProgressBar.js.map +1 -1
- package/dist/components/exam/internal/SaveIndicator.js +16 -11
- package/dist/components/exam/internal/SaveIndicator.js.map +1 -1
- package/dist/components/exam/internal/TextAnswerInput.js +97 -58
- package/dist/components/exam/internal/TextAnswerInput.js.map +1 -1
- package/dist/components/exam/multipleContainersKeyboardCoordinates.js +13 -9
- package/dist/components/exam/multipleContainersKeyboardCoordinates.js.map +1 -1
- package/dist/components/grading/AnswerCharacterCounter.js +12 -6
- package/dist/components/grading/AnswerCharacterCounter.js.map +1 -1
- package/dist/components/grading/GradingAnswer.js +112 -73
- package/dist/components/grading/GradingAnswer.js.map +1 -1
- package/dist/components/grading/GradingAnswerAnnotationList.js +9 -4
- package/dist/components/grading/GradingAnswerAnnotationList.js.map +1 -1
- package/dist/components/grading/editAnnotations.js +66 -16
- package/dist/components/grading/editAnnotations.js.map +1 -1
- package/dist/components/grading/largeImageDetector.js +6 -2
- package/dist/components/grading/largeImageDetector.js.map +1 -1
- package/dist/components/grading-instructions/AnswerGradingInstruction.js +42 -7
- package/dist/components/grading-instructions/AnswerGradingInstruction.js.map +1 -1
- package/dist/components/grading-instructions/AutogradedAnswer.js +59 -21
- package/dist/components/grading-instructions/AutogradedAnswer.js.map +1 -1
- package/dist/components/grading-instructions/AutogradedAnswerOption.js +13 -8
- package/dist/components/grading-instructions/AutogradedAnswerOption.js.map +1 -1
- package/dist/components/grading-instructions/ExamGradingInstruction.js +8 -3
- package/dist/components/grading-instructions/ExamGradingInstruction.js.map +1 -1
- package/dist/components/grading-instructions/GradingInstructionProvider.js +10 -3
- package/dist/components/grading-instructions/GradingInstructionProvider.js.map +1 -1
- package/dist/components/grading-instructions/GradingInstructions.js +132 -92
- package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
- package/dist/components/grading-instructions/Question.js +45 -7
- package/dist/components/grading-instructions/Question.js.map +1 -1
- package/dist/components/grading-instructions/QuestionTitle.js +50 -12
- package/dist/components/grading-instructions/QuestionTitle.js.map +1 -1
- package/dist/components/grading-instructions/Recording.js +20 -13
- package/dist/components/grading-instructions/Recording.js.map +1 -1
- package/dist/components/grading-instructions/RenderAttachmentElements.js +11 -6
- package/dist/components/grading-instructions/RenderAttachmentElements.js.map +1 -1
- package/dist/components/grading-instructions/Section.js +45 -7
- package/dist/components/grading-instructions/Section.js.map +1 -1
- package/dist/components/grading-instructions/SectionTitle.js +45 -10
- package/dist/components/grading-instructions/SectionTitle.js.map +1 -1
- package/dist/components/grading-instructions/gradingInstructionContent.js +4 -1
- package/dist/components/grading-instructions/gradingInstructionContent.js.map +1 -1
- package/dist/components/results/AudioAnswer.js +62 -24
- package/dist/components/results/AudioAnswer.js.map +1 -1
- package/dist/components/results/AudioContainer.js +27 -20
- package/dist/components/results/AudioContainer.js.map +1 -1
- package/dist/components/results/ChoiceAnswer.js +67 -29
- package/dist/components/results/ChoiceAnswer.js.map +1 -1
- package/dist/components/results/CorrectDNDAnswers.js +48 -11
- package/dist/components/results/CorrectDNDAnswers.js.map +1 -1
- package/dist/components/results/DNDAnswerOption.js +13 -6
- package/dist/components/results/DNDAnswerOption.js.map +1 -1
- package/dist/components/results/DropdownAnswer.js +68 -30
- package/dist/components/results/DropdownAnswer.js.map +1 -1
- package/dist/components/results/EndExamSession.js +22 -15
- package/dist/components/results/EndExamSession.js.map +1 -1
- package/dist/components/results/MultiLineAnswer.js +60 -20
- package/dist/components/results/MultiLineAnswer.js.map +1 -1
- package/dist/components/results/Question.js +53 -15
- package/dist/components/results/Question.js.map +1 -1
- package/dist/components/results/QuestionTitle.js +57 -19
- package/dist/components/results/QuestionTitle.js.map +1 -1
- package/dist/components/results/Results.js +144 -106
- package/dist/components/results/Results.js.map +1 -1
- package/dist/components/results/ScoredTextAnswer.js +54 -16
- package/dist/components/results/ScoredTextAnswer.js.map +1 -1
- package/dist/components/results/Section.js +46 -8
- package/dist/components/results/Section.js.map +1 -1
- package/dist/components/results/SingleLineAnswer.js +54 -16
- package/dist/components/results/SingleLineAnswer.js.map +1 -1
- package/dist/components/results/TextAnswer.js +68 -30
- package/dist/components/results/TextAnswer.js.map +1 -1
- package/dist/components/results/internal/AnnotationList.js +51 -16
- package/dist/components/results/internal/AnnotationList.js.map +1 -1
- package/dist/components/results/internal/QuestionAutoScore.js +47 -9
- package/dist/components/results/internal/QuestionAutoScore.js.map +1 -1
- package/dist/components/results/internal/QuestionManualScore.js +61 -23
- package/dist/components/results/internal/QuestionManualScore.js.map +1 -1
- package/dist/components/results/internal/QuestionScoresContainer.js +53 -15
- package/dist/components/results/internal/QuestionScoresContainer.js.map +1 -1
- package/dist/components/results/isExamineExamPageHook.js +8 -4
- package/dist/components/results/isExamineExamPageHook.js.map +1 -1
- package/dist/components/shared/AnnotationLists.js +19 -13
- package/dist/components/shared/AnnotationLists.js.map +1 -1
- package/dist/components/shared/AnswerIndicator.js +51 -12
- package/dist/components/shared/AnswerIndicator.js.map +1 -1
- package/dist/components/shared/AnswerLengthInfo.js +13 -8
- package/dist/components/shared/AnswerLengthInfo.js.map +1 -1
- package/dist/components/shared/AttachmentLink.js +53 -15
- package/dist/components/shared/AttachmentLink.js.map +1 -1
- package/dist/components/shared/AttachmentLinks.js +53 -15
- package/dist/components/shared/AttachmentLinks.js.map +1 -1
- package/dist/components/shared/Audio.js +63 -25
- package/dist/components/shared/Audio.js.map +1 -1
- package/dist/components/shared/AudioGroup.js +10 -5
- package/dist/components/shared/AudioGroup.js.map +1 -1
- package/dist/components/shared/AudioTest.js +67 -29
- package/dist/components/shared/AudioTest.js.map +1 -1
- package/dist/components/shared/DNDAnswerContainer.js +52 -15
- package/dist/components/shared/DNDAnswerContainer.js.map +1 -1
- package/dist/components/shared/DNDDroppable.js +23 -16
- package/dist/components/shared/DNDDroppable.js.map +1 -1
- package/dist/components/shared/DNDTitleAndDroppable.js +68 -28
- package/dist/components/shared/DNDTitleAndDroppable.js.map +1 -1
- package/dist/components/shared/ExamTranslation.js +10 -5
- package/dist/components/shared/ExamTranslation.js.map +1 -1
- package/dist/components/shared/File.js +44 -6
- package/dist/components/shared/File.js.map +1 -1
- package/dist/components/shared/Footer.js +9 -2
- package/dist/components/shared/Footer.js.map +1 -1
- package/dist/components/shared/Formula.js +15 -10
- package/dist/components/shared/Formula.js.map +1 -1
- package/dist/components/shared/Image.js +64 -25
- package/dist/components/shared/Image.js.map +1 -1
- package/dist/components/shared/ImageOverlay.js +65 -27
- package/dist/components/shared/ImageOverlay.js.map +1 -1
- package/dist/components/shared/Popup.js +63 -23
- package/dist/components/shared/Popup.js.map +1 -1
- package/dist/components/shared/QuestionNumber.js +42 -6
- package/dist/components/shared/QuestionNumber.js.map +1 -1
- package/dist/components/shared/Reference.js +70 -32
- package/dist/components/shared/Reference.js.map +1 -1
- package/dist/components/shared/References.js +60 -22
- package/dist/components/shared/References.js.map +1 -1
- package/dist/components/shared/Score.js +13 -6
- package/dist/components/shared/Score.js.map +1 -1
- package/dist/components/shared/TOCQuestion.js +73 -33
- package/dist/components/shared/TOCQuestion.js.map +1 -1
- package/dist/components/shared/TOCSection.js +48 -11
- package/dist/components/shared/TOCSection.js.map +1 -1
- package/dist/components/shared/TOCSectionTitle.js +65 -25
- package/dist/components/shared/TOCSectionTitle.js.map +1 -1
- package/dist/components/shared/TableOfContents.js +77 -37
- package/dist/components/shared/TableOfContents.js.map +1 -1
- package/dist/components/shared/VersionNumber.js +46 -6
- package/dist/components/shared/VersionNumber.js.map +1 -1
- package/dist/components/shared/Video.js +55 -17
- package/dist/components/shared/Video.js.map +1 -1
- package/dist/components/shared/internal/AttachmentLinkAnchor.js +8 -3
- package/dist/components/shared/internal/AttachmentLinkAnchor.js.map +1 -1
- package/dist/components/shared/internal/AudioPlayer.js +58 -23
- package/dist/components/shared/internal/AudioPlayer.js.map +1 -1
- package/dist/components/shared/internal/ModalDialog.js +40 -5
- package/dist/components/shared/internal/ModalDialog.js.map +1 -1
- package/dist/components/shared/internal/RenderIfNoError.js +15 -10
- package/dist/components/shared/internal/RenderIfNoError.js.map +1 -1
- package/dist/components/shared/internal/ResponsiveMediaContainer.js +11 -6
- package/dist/components/shared/internal/ResponsiveMediaContainer.js.map +1 -1
- package/dist/components/shared/internal/RestrictedAudioPlayer.js +64 -25
- package/dist/components/shared/internal/RestrictedAudioPlayer.js.map +1 -1
- package/dist/createRenderChildNodes.js +19 -12
- package/dist/createRenderChildNodes.js.map +1 -1
- package/dist/dom-utils.js +89 -32
- package/dist/dom-utils.js.map +1 -1
- package/dist/fonts.js +15 -9
- package/dist/fonts.js.map +1 -1
- package/dist/formatting.js +4 -1
- package/dist/formatting.js.map +1 -1
- package/dist/getDisplayName.js +4 -1
- package/dist/getDisplayName.js.map +1 -1
- package/dist/i18n/A_E.js +4 -1
- package/dist/i18n/A_E.js.map +1 -1
- package/dist/i18n/BA.js +39 -3
- package/dist/i18n/BA.js.map +1 -1
- package/dist/i18n/CA.js +39 -3
- package/dist/i18n/CA.js.map +1 -1
- package/dist/i18n/EA.js +4 -1
- package/dist/i18n/EA.js.map +1 -1
- package/dist/i18n/FA.js +4 -1
- package/dist/i18n/FA.js.map +1 -1
- package/dist/i18n/GC.js +4 -1
- package/dist/i18n/GC.js.map +1 -1
- package/dist/i18n/I.js +4 -1
- package/dist/i18n/I.js.map +1 -1
- package/dist/i18n/M.js +4 -1
- package/dist/i18n/M.js.map +1 -1
- package/dist/i18n/O_E.js +4 -1
- package/dist/i18n/O_E.js.map +1 -1
- package/dist/i18n/PA.js +4 -1
- package/dist/i18n/PA.js.map +1 -1
- package/dist/i18n/SA.js +4 -1
- package/dist/i18n/SA.js.map +1 -1
- package/dist/i18n/TC.js +4 -1
- package/dist/i18n/TC.js.map +1 -1
- package/dist/i18n/VA.js +4 -1
- package/dist/i18n/VA.js.map +1 -1
- package/dist/i18n/Z.js +4 -1
- package/dist/i18n/Z.js.map +1 -1
- package/dist/i18n/fi-FI.js +4 -1
- package/dist/i18n/fi-FI.js.map +1 -1
- package/dist/i18n/index.js +93 -51
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/sv-FI.js +4 -1
- package/dist/i18n/sv-FI.js.map +1 -1
- package/dist/ids.js +16 -13
- package/dist/ids.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -14
- package/dist/index.js.map +1 -1
- package/dist/indexedDBExamServerAPI.d.ts.map +1 -1
- package/dist/indexedDBExamServerAPI.js +14 -4
- package/dist/indexedDBExamServerAPI.js.map +1 -1
- package/dist/main.css +4486 -1
- package/dist/parser/parseExam.js +44 -8
- package/dist/parser/parseExam.js.map +1 -1
- package/dist/parser/parseExamStructure.js +18 -15
- package/dist/parser/parseExamStructure.js.map +1 -1
- package/dist/renderAnnotations.js +21 -12
- package/dist/renderAnnotations.js.map +1 -1
- package/dist/scrollToHash.js +4 -1
- package/dist/scrollToHash.js.map +1 -1
- package/dist/shortDisplayNumber.js +38 -2
- package/dist/shortDisplayNumber.js.map +1 -1
- package/dist/store/answers/actions.js +16 -7
- package/dist/store/answers/actions.js.map +1 -1
- package/dist/store/answers/reducer.js +6 -3
- package/dist/store/answers/reducer.js.map +1 -1
- package/dist/store/answers/sagas.js +22 -18
- package/dist/store/answers/sagas.js.map +1 -1
- package/dist/store/audio/actions.js +16 -7
- package/dist/store/audio/actions.js.map +1 -1
- package/dist/store/audio/reducer.js +38 -2
- package/dist/store/audio/reducer.js.map +1 -1
- package/dist/store/audio/sagas.js +18 -15
- package/dist/store/audio/sagas.js.map +1 -1
- package/dist/store/cas/actions.js +13 -7
- package/dist/store/cas/actions.js.map +1 -1
- package/dist/store/cas/reducer.js +4 -1
- package/dist/store/cas/reducer.js.map +1 -1
- package/dist/store/cas/sagas.js +19 -15
- package/dist/store/cas/sagas.js.map +1 -1
- package/dist/store/countdown.js +12 -9
- package/dist/store/countdown.js.map +1 -1
- package/dist/store/index.js +63 -24
- package/dist/store/index.js.map +1 -1
- package/dist/store/selectors.js +53 -9
- package/dist/store/selectors.js.map +1 -1
- package/dist/types/ExamAnswer.js +2 -1
- package/dist/types/ExamServerAPI.d.ts +1 -1
- package/dist/types/ExamServerAPI.d.ts.map +1 -1
- package/dist/types/ExamServerAPI.js +2 -1
- package/dist/types/GradingStructure.js +2 -1
- package/dist/types/Score.js +2 -1
- package/dist/url.js +38 -2
- package/dist/url.js.map +1 -1
- package/dist/useCached.js +6 -3
- package/dist/useCached.js.map +1 -1
- package/dist/utils.js +8 -3
- package/dist/utils.js.map +1 -1
- package/dist/validateAnswers.js +38 -2
- package/dist/validateAnswers.js.map +1 -1
- package/package.json +39 -37
- package/dist/__tests__/AnsweringInstructions.test.d.ts +0 -2
- package/dist/__tests__/AnsweringInstructions.test.d.ts.map +0 -1
- package/dist/__tests__/AnsweringInstructions.test.js +0 -95
- package/dist/__tests__/AnsweringInstructions.test.js.map +0 -1
- package/dist/__tests__/casSaga.test.d.ts +0 -2
- package/dist/__tests__/casSaga.test.d.ts.map +0 -1
- package/dist/__tests__/casSaga.test.js +0 -80
- package/dist/__tests__/casSaga.test.js.map +0 -1
- package/dist/__tests__/examServerApi.d.ts +0 -3
- package/dist/__tests__/examServerApi.d.ts.map +0 -1
- package/dist/__tests__/examServerApi.js +0 -17
- package/dist/__tests__/examServerApi.js.map +0 -1
- package/dist/__tests__/playwright/SectionElement.test.d.ts +0 -2
- package/dist/__tests__/playwright/SectionElement.test.d.ts.map +0 -1
- package/dist/__tests__/playwright/SectionElement.test.js +0 -20
- package/dist/__tests__/playwright/SectionElement.test.js.map +0 -1
- package/dist/__tests__/playwright/exam/AudioAnswer.test.d.ts +0 -2
- package/dist/__tests__/playwright/exam/AudioAnswer.test.d.ts.map +0 -1
- package/dist/__tests__/playwright/exam/AudioAnswer.test.js +0 -132
- package/dist/__tests__/playwright/exam/AudioAnswer.test.js.map +0 -1
- package/dist/__tests__/playwright/exam/AudioPlayer.test.d.ts +0 -2
- package/dist/__tests__/playwright/exam/AudioPlayer.test.d.ts.map +0 -1
- package/dist/__tests__/playwright/exam/AudioPlayer.test.js +0 -69
- package/dist/__tests__/playwright/exam/AudioPlayer.test.js.map +0 -1
- package/dist/__tests__/playwright/exam/DNDAnswerContainer.test.d.ts +0 -2
- package/dist/__tests__/playwright/exam/DNDAnswerContainer.test.d.ts.map +0 -1
- package/dist/__tests__/playwright/exam/DNDAnswerContainer.test.js +0 -125
- package/dist/__tests__/playwright/exam/DNDAnswerContainer.test.js.map +0 -1
- package/dist/__tests__/playwright/exam/Exam.test.d.ts +0 -2
- package/dist/__tests__/playwright/exam/Exam.test.d.ts.map +0 -1
- package/dist/__tests__/playwright/exam/Exam.test.js +0 -29
- package/dist/__tests__/playwright/exam/Exam.test.js.map +0 -1
- package/dist/__tests__/playwright/exam/TextAnswerInput.test.d.ts +0 -2
- package/dist/__tests__/playwright/exam/TextAnswerInput.test.d.ts.map +0 -1
- package/dist/__tests__/playwright/exam/TextAnswerInput.test.js +0 -81
- package/dist/__tests__/playwright/exam/TextAnswerInput.test.js.map +0 -1
- package/dist/__tests__/playwright/pages/AudioPlayer.page.d.ts +0 -13
- package/dist/__tests__/playwright/pages/AudioPlayer.page.d.ts.map +0 -1
- package/dist/__tests__/playwright/pages/AudioPlayer.page.js +0 -16
- package/dist/__tests__/playwright/pages/AudioPlayer.page.js.map +0 -1
- package/dist/__tests__/playwright/results/MultiLineAnswer.test.d.ts +0 -2
- package/dist/__tests__/playwright/results/MultiLineAnswer.test.d.ts.map +0 -1
- package/dist/__tests__/playwright/results/MultiLineAnswer.test.js +0 -45
- package/dist/__tests__/playwright/results/MultiLineAnswer.test.js.map +0 -1
- package/dist/__tests__/playwright/stories/exam/AudioAnswer.story.d.ts +0 -5
- package/dist/__tests__/playwright/stories/exam/AudioAnswer.story.d.ts.map +0 -1
- package/dist/__tests__/playwright/stories/exam/AudioAnswer.story.js +0 -14
- package/dist/__tests__/playwright/stories/exam/AudioAnswer.story.js.map +0 -1
- package/dist/__tests__/playwright/stories/exam/DNDAnswerContainer.story.d.ts +0 -10
- package/dist/__tests__/playwright/stories/exam/DNDAnswerContainer.story.d.ts.map +0 -1
- package/dist/__tests__/playwright/stories/exam/DNDAnswerContainer.story.js +0 -20
- package/dist/__tests__/playwright/stories/exam/DNDAnswerContainer.story.js.map +0 -1
- package/dist/__tests__/playwright/stories/exam/Exam.story.d.ts +0 -8
- package/dist/__tests__/playwright/stories/exam/Exam.story.d.ts.map +0 -1
- package/dist/__tests__/playwright/stories/exam/Exam.story.js +0 -18
- package/dist/__tests__/playwright/stories/exam/Exam.story.js.map +0 -1
- package/dist/__tests__/playwright/stories/exam/Question.story.d.ts +0 -5
- package/dist/__tests__/playwright/stories/exam/Question.story.d.ts.map +0 -1
- package/dist/__tests__/playwright/stories/exam/Question.story.js +0 -19
- package/dist/__tests__/playwright/stories/exam/Question.story.js.map +0 -1
- package/dist/__tests__/playwright/stories/results/MultiLineAnswer.story.d.ts +0 -8
- package/dist/__tests__/playwright/stories/results/MultiLineAnswer.story.d.ts.map +0 -1
- package/dist/__tests__/playwright/stories/results/MultiLineAnswer.story.js +0 -51
- package/dist/__tests__/playwright/stories/results/MultiLineAnswer.story.js.map +0 -1
- package/dist/__tests__/playwright/template/index.d.ts +0 -1
- package/dist/__tests__/playwright/template/index.d.ts.map +0 -1
- package/dist/__tests__/playwright/template/index.js +0 -5
- package/dist/__tests__/playwright/template/index.js.map +0 -1
- package/dist/__tests__/playwright/utils/ExamComponentWrapper.d.ts +0 -9
- package/dist/__tests__/playwright/utils/ExamComponentWrapper.d.ts.map +0 -1
- package/dist/__tests__/playwright/utils/ExamComponentWrapper.js +0 -26
- package/dist/__tests__/playwright/utils/ExamComponentWrapper.js.map +0 -1
- package/dist/__tests__/playwright/utils/utils.d.ts +0 -6
- package/dist/__tests__/playwright/utils/utils.d.ts.map +0 -1
- package/dist/__tests__/playwright/utils/utils.js +0 -52
- package/dist/__tests__/playwright/utils/utils.js.map +0 -1
- package/dist/__tests__/renderAnnotations.test.d.ts +0 -2
- package/dist/__tests__/renderAnnotations.test.d.ts.map +0 -1
- package/dist/__tests__/renderAnnotations.test.js +0 -134
- package/dist/__tests__/renderAnnotations.test.js.map +0 -1
- package/dist/__tests__/results/AnnotationList.test.d.ts +0 -2
- package/dist/__tests__/results/AnnotationList.test.d.ts.map +0 -1
- package/dist/__tests__/results/AnnotationList.test.js +0 -168
- package/dist/__tests__/results/AnnotationList.test.js.map +0 -1
- package/dist/__tests__/results/ResultsContext.test.d.ts +0 -2
- package/dist/__tests__/results/ResultsContext.test.d.ts.map +0 -1
- package/dist/__tests__/results/ResultsContext.test.js +0 -185
- package/dist/__tests__/results/ResultsContext.test.js.map +0 -1
- package/dist/__tests__/results/ResultsExamQuestionAutoScore.test.d.ts +0 -2
- package/dist/__tests__/results/ResultsExamQuestionAutoScore.test.d.ts.map +0 -1
- package/dist/__tests__/results/ResultsExamQuestionAutoScore.test.js +0 -60
- package/dist/__tests__/results/ResultsExamQuestionAutoScore.test.js.map +0 -1
- package/dist/__tests__/results/ResultsExamQuestionManualScore.test.d.ts +0 -2
- package/dist/__tests__/results/ResultsExamQuestionManualScore.test.d.ts.map +0 -1
- package/dist/__tests__/results/ResultsExamQuestionManualScore.test.js +0 -145
- package/dist/__tests__/results/ResultsExamQuestionManualScore.test.js.map +0 -1
- package/dist/__tests__/testExamRendering.d.ts +0 -2
- package/dist/__tests__/testExamRendering.d.ts.map +0 -1
- package/dist/__tests__/testExamRendering.js +0 -149
- package/dist/__tests__/testExamRendering.js.map +0 -1
- package/dist/__tests__/tsconfig.tsbuildinfo +0 -1
- package/dist/__tests__/util.test.d.ts +0 -2
- package/dist/__tests__/util.test.d.ts.map +0 -1
- package/dist/__tests__/util.test.js +0 -12
- package/dist/__tests__/util.test.js.map +0 -1
- package/dist/__tests__/validateAnswers.test.d.ts +0 -2
- package/dist/__tests__/validateAnswers.test.d.ts.map +0 -1
- package/dist/__tests__/validateAnswers.test.js +0 -243
- package/dist/__tests__/validateAnswers.test.js.map +0 -1
- package/dist/main-bundle.js +0 -366
- package/dist/main-bundle.js.LICENSE.txt +0 -69
- package/src/css/colors.less +0 -56
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AudioAnswer.test.js","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/AudioAnswer.test.tsx"],"names":[],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,MAAc,CAAC;QAC5C,MAAM,uBAAuB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;QAC1C,MAAM,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B,CAAC;AACH,CAAC,CAAC,CAAA;AAEF,MAAM,gBAAgB,GAAqB,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAA;AAE9F,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;UAiBP,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AudioPlayer.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/AudioPlayer.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const experimental_ct_react_1 = require("@playwright/experimental-ct-react");
|
|
8
|
-
const exam_engine_mastering_1 = require("@digabi/exam-engine-mastering");
|
|
9
|
-
const Exam_story_1 = require("../stories/exam/Exam.story");
|
|
10
|
-
const AudioPlayer_page_1 = require("../pages/AudioPlayer.page"); // Import the Page Object
|
|
11
|
-
const path_1 = __importDefault(require("path"));
|
|
12
|
-
const AUDIO_FILE_NAME = 'audio-5s.mp3';
|
|
13
|
-
// Renamed for clarity
|
|
14
|
-
const AUDIO_PLAYER_EXAM_XML = `<e:exam xmlns:e="http://ylioppilastutkinto.fi/exam.xsd" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ylioppilastutkinto.fi/exam.xsd https://abitti.dev/schema/exam.xsd" exam-schema-version="0.5">
|
|
15
|
-
<e:exam-versions>
|
|
16
|
-
<e:exam-version lang="fi-FI"/>
|
|
17
|
-
</e:exam-versions>
|
|
18
|
-
<e:exam-title>Uusi koe</e:exam-title>
|
|
19
|
-
<e:exam-instruction/>
|
|
20
|
-
<e:table-of-contents/>
|
|
21
|
-
<e:section>
|
|
22
|
-
<e:section-title/>
|
|
23
|
-
<e:section-instruction/>
|
|
24
|
-
<e:question>
|
|
25
|
-
<e:question-title/>
|
|
26
|
-
<e:question-instruction/>
|
|
27
|
-
<e:audio src="${AUDIO_FILE_NAME}"/>
|
|
28
|
-
</e:question>
|
|
29
|
-
</e:section>
|
|
30
|
-
</e:exam>`;
|
|
31
|
-
const test = experimental_ct_react_1.test.extend({
|
|
32
|
-
audioPlayerPage: async ({ page, mount }, use) => {
|
|
33
|
-
const resolveAttachment = (filename) => path_1.default.resolve(__dirname, '../data', filename);
|
|
34
|
-
const results = await (0, exam_engine_mastering_1.masterExam)(AUDIO_PLAYER_EXAM_XML, () => '', (0, exam_engine_mastering_1.getMediaMetadataFromLocalFile)(resolveAttachment));
|
|
35
|
-
const masteredExamXml = results[0];
|
|
36
|
-
await page.route(`**/attachments/${AUDIO_FILE_NAME}`, async (route) => {
|
|
37
|
-
await route.fulfill({
|
|
38
|
-
status: 200,
|
|
39
|
-
contentType: 'audio/mpeg',
|
|
40
|
-
path: path_1.default.resolve(__dirname, `../data/${AUDIO_FILE_NAME}`)
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
const mountResult = await mount(react_1.default.createElement(Exam_story_1.ExamStory, { masteredExam: masteredExamXml }));
|
|
44
|
-
const audioPlayerPageInstance = new AudioPlayer_page_1.AudioPlayerPage(mountResult);
|
|
45
|
-
await use(audioPlayerPageInstance);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
test('all UI elements are visible and in correct state', async ({ audioPlayerPage }) => {
|
|
49
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.playButton).toBeVisible();
|
|
50
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.progressBar).toBeVisible();
|
|
51
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.progressBar).toHaveAttribute('aria-label', 'Aikajana');
|
|
52
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.progressBar).toHaveAttribute('aria-valuetext', '00:00/00:05');
|
|
53
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.progressBar).toHaveAttribute('style', /--range-progress: 0%/);
|
|
54
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.currentTimeDisplay).toHaveText('00:00');
|
|
55
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.durationDisplay).toHaveText('00:05');
|
|
56
|
-
});
|
|
57
|
-
test('player is in correct state after playing whole audio', async ({ page, audioPlayerPage }) => {
|
|
58
|
-
await audioPlayerPage.playButton.click();
|
|
59
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.pauseButton).toBeVisible();
|
|
60
|
-
await page.waitForTimeout(6000);
|
|
61
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.currentTimeDisplay).toHaveText('00:05');
|
|
62
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.durationDisplay).toHaveText('00:05');
|
|
63
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.playButton).toBeVisible();
|
|
64
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.progressBar).toHaveValue(/5\.\d*/);
|
|
65
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.progressBar).toHaveAttribute('aria-label', 'Aikajana');
|
|
66
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.progressBar).toHaveAttribute('aria-valuetext', '00:05/00:05');
|
|
67
|
-
await (0, experimental_ct_react_1.expect)(audioPlayerPage.progressBar).toHaveAttribute('style', /--range-progress: 100%/);
|
|
68
|
-
});
|
|
69
|
-
//# sourceMappingURL=AudioPlayer.test.js.map
|
|
@@ -1 +0,0 @@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A;IACpE,MAAM,IAAA,8BAAM,EAAC,eAAe,CAAC,eAAe,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;IACjE,MAAM,IAAA,8BAAM,EAAC,eAAe,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAA;IACtD,MAAM,IAAA,8BAAM,EAAC,eAAe,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC/D,MAAM,IAAA,8BAAM,EAAC,eAAe,CAAC,WAAW,CAAC,CAAC,eAAe,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IACnF,MAAM,IAAA,8BAAM,EAAC,eAAe,CAAC,WAAW,CAAC,CAAC,eAAe,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAA;IAC1F,MAAM,IAAA,8BAAM,EAAC,eAAe,CAAC,WAAW,CAAC,CAAC,eAAe,CAAC,OAAO,EAAE,wBAAwB,CAAC,CAAA;AAC9F,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DNDAnswerContainer.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/DNDAnswerContainer.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const experimental_ct_react_1 = require("@playwright/experimental-ct-react");
|
|
8
|
-
const DNDAnswerContainer_story_1 = require("../stories/exam/DNDAnswerContainer.story");
|
|
9
|
-
const utils_1 = require("../utils/utils");
|
|
10
|
-
experimental_ct_react_1.test.describe.configure({ mode: 'serial' });
|
|
11
|
-
experimental_ct_react_1.test.describe('DNDAnswerContainer', () => {
|
|
12
|
-
let masteredExam;
|
|
13
|
-
experimental_ct_react_1.test.beforeAll(async () => {
|
|
14
|
-
masteredExam = await (0, utils_1.setupMasteredExam)();
|
|
15
|
-
});
|
|
16
|
-
for (const answerMediaType of ['text', 'image']) {
|
|
17
|
-
(0, experimental_ct_react_1.test)(`Connect - basic drag and drop functionality for ${answerMediaType} answers`, async ({ mount }) => {
|
|
18
|
-
const component = await mount(react_1.default.createElement(DNDAnswerContainer_story_1.DNDAnswerContainerStory, { masteredExam: masteredExam, answerMediaType: answerMediaType }));
|
|
19
|
-
const { answerContainer, answerOptionsLocator, firstOptionLocator, secondOptionLocator, firstAnswerContent, secondAnswerContent } = await setupAnswerContext(component, answerMediaType);
|
|
20
|
-
await experimental_ct_react_1.test.step('Image answers are not zoomable links in answer options', async () => {
|
|
21
|
-
if (answerMediaType === 'image') {
|
|
22
|
-
await (0, experimental_ct_react_1.expect)(firstOptionLocator.locator('.e-zoomable')).toHaveCount(0);
|
|
23
|
-
await (0, experimental_ct_react_1.expect)(secondOptionLocator.locator('.e-zoomable')).toHaveCount(0);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
await experimental_ct_react_1.test.step('Drag first answer to answer container', async () => {
|
|
27
|
-
const draggableLocator = firstOptionLocator.locator('.drag-handle');
|
|
28
|
-
await draggableLocator.dragTo(answerContainer);
|
|
29
|
-
await assertContentMatches(answerContainer, firstAnswerContent, answerMediaType);
|
|
30
|
-
await assertContentDoesNotMatch(answerOptionsLocator, firstAnswerContent, answerMediaType);
|
|
31
|
-
await assertContentMatches(answerOptionsLocator, secondAnswerContent, answerMediaType);
|
|
32
|
-
});
|
|
33
|
-
await experimental_ct_react_1.test.step('Replace first answer with second answer in answer container', async () => {
|
|
34
|
-
const draggableLocator = secondOptionLocator.locator('.drag-handle');
|
|
35
|
-
await draggableLocator.dragTo(answerContainer);
|
|
36
|
-
await assertContentMatches(answerContainer, secondAnswerContent, answerMediaType);
|
|
37
|
-
await assertContentDoesNotMatch(answerContainer, firstAnswerContent, answerMediaType);
|
|
38
|
-
await assertContentMatches(answerOptionsLocator, firstAnswerContent, answerMediaType);
|
|
39
|
-
});
|
|
40
|
-
await experimental_ct_react_1.test.step('Drag second answer back to options', async () => {
|
|
41
|
-
const draggableLocator = answerContainer.locator('.drag-handle');
|
|
42
|
-
await draggableLocator.dragTo(answerOptionsLocator);
|
|
43
|
-
await (0, experimental_ct_react_1.expect)(answerContainer).toContainText('Ei vastausta');
|
|
44
|
-
await assertContentMatches(answerOptionsLocator, firstAnswerContent, answerMediaType);
|
|
45
|
-
await assertContentMatches(answerOptionsLocator, secondAnswerContent, answerMediaType);
|
|
46
|
-
});
|
|
47
|
-
await experimental_ct_react_1.test.step('Move first answer to answer container using keyboard', async () => {
|
|
48
|
-
// We test DOM changes between key presses to make sure that DOM is updated correctly.
|
|
49
|
-
// For text answers: the answer option #343 is moved to answer containers 102 -> 101 -> 100.
|
|
50
|
-
// For image answers: the answer option #351 is moved to answer containers 103 -> 103 -> 103.
|
|
51
|
-
const handle = firstOptionLocator.locator('.drag-handle');
|
|
52
|
-
const helperText = component.locator('#DndLiveRegion-0');
|
|
53
|
-
const isTextAnswer = answerMediaType === 'text';
|
|
54
|
-
const baseText = `Draggable item ${isTextAnswer ? 343 : 351} was moved over droppable area`;
|
|
55
|
-
await handle.focus();
|
|
56
|
-
await handle.press('Enter');
|
|
57
|
-
await (0, experimental_ct_react_1.expect)(helperText).toContainText(`${baseText} root.`);
|
|
58
|
-
await handle.press('ArrowUp'); // activates root container
|
|
59
|
-
await (0, experimental_ct_react_1.expect)(helperText).toContainText(`${baseText} root.`);
|
|
60
|
-
await handle.press('ArrowUp'); // activates 3rd answer
|
|
61
|
-
await (0, experimental_ct_react_1.expect)(helperText).toContainText(`${baseText} ${isTextAnswer ? 102 : 103}.`);
|
|
62
|
-
await handle.press('ArrowUp'); // activates 2nd answer
|
|
63
|
-
await (0, experimental_ct_react_1.expect)(helperText).toContainText(`${baseText} ${isTextAnswer ? 101 : 103}.`);
|
|
64
|
-
await handle.press('ArrowUp'); // activates 1st answer
|
|
65
|
-
await (0, experimental_ct_react_1.expect)(helperText).toContainText(`${baseText} ${isTextAnswer ? 100 : 103}.`);
|
|
66
|
-
await handle.press('Enter');
|
|
67
|
-
const firstAnswerContent = (await getAnswerContent(firstOptionLocator, answerMediaType)) || ''; // first option has changed
|
|
68
|
-
await assertContentMatches(answerContainer, firstAnswerContent, answerMediaType);
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
async function assertContentMatches(answerContainer, content, mediaType) {
|
|
74
|
-
if (mediaType === 'text') {
|
|
75
|
-
await (0, experimental_ct_react_1.expect)(answerContainer).toContainText(content);
|
|
76
|
-
}
|
|
77
|
-
else if (mediaType === 'image') {
|
|
78
|
-
const images = await answerContainer.locator('img').all();
|
|
79
|
-
let found = false;
|
|
80
|
-
for (const img of images) {
|
|
81
|
-
const src = await img.getAttribute('src');
|
|
82
|
-
if (src === content) {
|
|
83
|
-
found = true;
|
|
84
|
-
break;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
(0, experimental_ct_react_1.expect)(found).toBe(true);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
async function assertContentDoesNotMatch(answerContainer, content, mediaType) {
|
|
91
|
-
if (mediaType === 'text') {
|
|
92
|
-
await (0, experimental_ct_react_1.expect)(answerContainer).not.toContainText(content);
|
|
93
|
-
}
|
|
94
|
-
else if (mediaType === 'image') {
|
|
95
|
-
const images = await answerContainer.locator('img').all();
|
|
96
|
-
for (const img of images) {
|
|
97
|
-
await (0, experimental_ct_react_1.expect)(img).not.toHaveAttribute('src', content);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
async function setupAnswerContext(component, answerMediaType) {
|
|
102
|
-
const answerContainer = component.getByTestId('dnd-droppable').first();
|
|
103
|
-
const answerOptionsLocator = component.getByTestId('dnd-droppable').last();
|
|
104
|
-
const firstOptionLocator = component.getByTestId('dnd-answer-option').nth(0);
|
|
105
|
-
const secondOptionLocator = component.getByTestId('dnd-answer-option').nth(1);
|
|
106
|
-
const firstAnswerContent = await getAnswerContent(firstOptionLocator, answerMediaType);
|
|
107
|
-
const secondAnswerContent = await getAnswerContent(secondOptionLocator, answerMediaType);
|
|
108
|
-
return {
|
|
109
|
-
answerContainer,
|
|
110
|
-
answerOptionsLocator,
|
|
111
|
-
firstOptionLocator,
|
|
112
|
-
secondOptionLocator,
|
|
113
|
-
firstAnswerContent: firstAnswerContent,
|
|
114
|
-
secondAnswerContent: secondAnswerContent
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
async function getAnswerContent(answerLocator, mediaType) {
|
|
118
|
-
if (mediaType === 'text') {
|
|
119
|
-
return await answerLocator.textContent();
|
|
120
|
-
}
|
|
121
|
-
else if (mediaType === 'image') {
|
|
122
|
-
return await answerLocator.locator('img').getAttribute('src');
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=DNDAnswerContainer.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DNDAnswerContainer.test.js","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/DNDAnswerContainer.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,6EAAgE;AAEhE,uFAAkF;AAClF,0CAAkD;AAElD,4BAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;AAE3C,4BAAI,CAAC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IACvC,IAAI,YAA2D,CAAA;IAE/D,4BAAI,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACxB,YAAY,GAAG,MAAM,IAAA,yBAAiB,GAAE,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,KAAK,MAAM,eAAe,IAAI,CAAC,MAAM,EAAE,OAAO,CAAU,EAAE,CAAC;QACzD,IAAA,4BAAI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|
-
{"version":3,"file":"Exam.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/Exam.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const experimental_ct_react_1 = require("@playwright/experimental-ct-react");
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const Exam_story_1 = require("../stories/exam/Exam.story");
|
|
9
|
-
const utils_1 = require("../utils/utils");
|
|
10
|
-
experimental_ct_react_1.test.describe.configure({ mode: 'serial' });
|
|
11
|
-
experimental_ct_react_1.test.describe('Exam', () => {
|
|
12
|
-
let masteredExam_SC;
|
|
13
|
-
let masteredExamNoAttachments;
|
|
14
|
-
experimental_ct_react_1.test.beforeAll(async () => {
|
|
15
|
-
masteredExam_SC = await (0, utils_1.setupMasteredExam)();
|
|
16
|
-
masteredExamNoAttachments = await (0, utils_1.setupMasteredExam)('test/no_attachments.xml');
|
|
17
|
-
});
|
|
18
|
-
(0, experimental_ct_react_1.test)('exam without attachments contains notification', async ({ mount }) => {
|
|
19
|
-
const component = await mount(react_1.default.createElement(Exam_story_1.ExamStory, { masteredExam: masteredExamNoAttachments }));
|
|
20
|
-
const notification = component.locator('.notification').getByText('Tämä koe ei sisällä aineistoja');
|
|
21
|
-
await (0, experimental_ct_react_1.expect)(notification).toBeVisible();
|
|
22
|
-
});
|
|
23
|
-
(0, experimental_ct_react_1.test)('exam with attachments contains no notification', async ({ mount }) => {
|
|
24
|
-
const component = await mount(react_1.default.createElement(Exam_story_1.ExamStory, { masteredExam: masteredExam_SC }));
|
|
25
|
-
const notification = component.locator('.notification').getByText('Tämä koe ei sisällä aineistoja');
|
|
26
|
-
await (0, experimental_ct_react_1.expect)(notification).not.toBeVisible();
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=Exam.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Exam.test.js","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/Exam.test.tsx"],"names":[],"mappings":";;;;;AAAA,6EAAgE;AAChE,kDAAyB;AACzB,2DAAsD;AACtD,0CAAkD;AAElD,4BAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;AAE3C,4BAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;IACzB,IAAI,eAA8D,CAAA;IAClE,IAAI,yBAAwE,CAAA;IAE5E,4BAAI,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACxB,eAAe,GAAG,MAAM,IAAA,yBAAiB,GAAE,CAAA;QAC3C,yBAAyB,GAAG,MAAM,IAAA,yBAAiB,EAAC,yBAAyB,CAAC,CAAA;IAChF,CAAC,CAAC,CAAA;IAEF,IAAA,4BAAI,EAAC,gDAAgD,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QACzE,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,8BAAC,sBAAS,IAAC,YAAY,EAAE,yBAAyB,GAAI,CAAC,CAAA;QACrF,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,gCAAgC,CAAC,CAAA;QACnG,MAAM,IAAA,8BAAM,EAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,IAAA,4BAAI,EAAC,gDAAgD,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QACzE,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,8BAAC,sBAAS,IAAC,YAAY,EAAE,eAAe,GAAI,CAAC,CAAA;QAC3E,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,gCAAgC,CAAC,CAAA;QACnG,MAAM,IAAA,8BAAM,EAAC,YAAY,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CAAA;IAC9C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnswerInput.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/TextAnswerInput.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const experimental_ct_react_1 = require("@playwright/experimental-ct-react");
|
|
8
|
-
const Question_story_1 = require("../stories/exam/Question.story");
|
|
9
|
-
experimental_ct_react_1.test.describe('TextAnswerInput', () => {
|
|
10
|
-
(0, experimental_ct_react_1.test)('integer input accepts unicode minus sign', async ({ mount }) => {
|
|
11
|
-
const component = await mount(react_1.default.createElement(Question_story_1.QuestionStory, { examXml: examXml }));
|
|
12
|
-
await component.locator('input').type('−5');
|
|
13
|
-
await (0, experimental_ct_react_1.expect)(component.locator('input')).toHaveValue('−5');
|
|
14
|
-
});
|
|
15
|
-
(0, experimental_ct_react_1.test)('integer input accepts ascii hyphen minus sign', async ({ mount }) => {
|
|
16
|
-
const component = await mount(react_1.default.createElement(Question_story_1.QuestionStory, { examXml: examXml }));
|
|
17
|
-
await component.locator('input').type('-5');
|
|
18
|
-
await (0, experimental_ct_react_1.expect)(component.locator('input')).toHaveValue('-5');
|
|
19
|
-
});
|
|
20
|
-
(0, experimental_ct_react_1.test)('rich text undo and redo move a whole debounced edit at a time', async ({ mount, page }) => {
|
|
21
|
-
// The editor's answer history is debounced by 500 ms, so everything typed within a
|
|
22
|
-
// single burst must be undone and redone as one step, not character by character.
|
|
23
|
-
const historyTimeout = 550;
|
|
24
|
-
const component = await mount(react_1.default.createElement(Question_story_1.QuestionStory, { examXml: richTextExamXml }));
|
|
25
|
-
const editor = component.getByTestId('rich-text-editor');
|
|
26
|
-
await editor.click();
|
|
27
|
-
await page.keyboard.type('aa');
|
|
28
|
-
await page.waitForTimeout(historyTimeout);
|
|
29
|
-
await page.keyboard.type('bb');
|
|
30
|
-
await page.waitForTimeout(historyTimeout);
|
|
31
|
-
await (0, experimental_ct_react_1.expect)(editor).toHaveText('aabb');
|
|
32
|
-
await page.keyboard.press('ControlOrMeta+z');
|
|
33
|
-
await (0, experimental_ct_react_1.expect)(editor).toHaveText('aa');
|
|
34
|
-
await page.keyboard.press('ControlOrMeta+z');
|
|
35
|
-
await (0, experimental_ct_react_1.expect)(editor).toHaveText('');
|
|
36
|
-
await page.keyboard.press(redoShortcut);
|
|
37
|
-
await (0, experimental_ct_react_1.expect)(editor).toHaveText('aa');
|
|
38
|
-
await page.keyboard.press(redoShortcut);
|
|
39
|
-
await (0, experimental_ct_react_1.expect)(editor).toHaveText('aabb');
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
const redoShortcut = process.platform === 'darwin' ? 'Meta+Shift+z' : 'Control+y';
|
|
43
|
-
const examXml = `<e:exam xmlns:e="http://ylioppilastutkinto.fi/exam.xsd" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ylioppilastutkinto.fi/exam.xsd https://abitti.net/schema/exam.xsd" exam-schema-version="0.5">
|
|
44
|
-
<e:exam-versions>
|
|
45
|
-
<e:exam-version lang="fi-FI"/>
|
|
46
|
-
</e:exam-versions>
|
|
47
|
-
<e:exam-title>Exam</e:exam-title>
|
|
48
|
-
<e:exam-instruction/>
|
|
49
|
-
<e:table-of-contents/>
|
|
50
|
-
<e:section>
|
|
51
|
-
<e:section-title>Section</e:section-title>
|
|
52
|
-
<e:section-instruction/>
|
|
53
|
-
<e:question display-number="1">
|
|
54
|
-
<e:question-title>Kokonaislukutehtävä</e:question-title>
|
|
55
|
-
<e:question-instruction>
|
|
56
|
-
<br/>
|
|
57
|
-
</e:question-instruction>
|
|
58
|
-
<e:text-answer type="integer" max-score="1"/>
|
|
59
|
-
</e:question>
|
|
60
|
-
</e:section>
|
|
61
|
-
</e:exam>`;
|
|
62
|
-
const richTextExamXml = `<e:exam xmlns:e="http://ylioppilastutkinto.fi/exam.xsd" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ylioppilastutkinto.fi/exam.xsd https://abitti.net/schema/exam.xsd" exam-schema-version="0.5" exam-lang="fi-FI">
|
|
63
|
-
<e:exam-versions>
|
|
64
|
-
<e:exam-version lang="fi-FI"/>
|
|
65
|
-
</e:exam-versions>
|
|
66
|
-
<e:exam-title>Exam</e:exam-title>
|
|
67
|
-
<e:exam-instruction/>
|
|
68
|
-
<e:table-of-contents/>
|
|
69
|
-
<e:section>
|
|
70
|
-
<e:section-title>Section</e:section-title>
|
|
71
|
-
<e:section-instruction/>
|
|
72
|
-
<e:question display-number="1" question-id="1" max-score="6">
|
|
73
|
-
<e:question-title>Tekstitehtävä</e:question-title>
|
|
74
|
-
<e:question-instruction>
|
|
75
|
-
<br/>
|
|
76
|
-
</e:question-instruction>
|
|
77
|
-
<e:text-answer type="rich-text" max-score="6" question-id="2" display-number="1"/>
|
|
78
|
-
</e:question>
|
|
79
|
-
</e:section>
|
|
80
|
-
</e:exam>`;
|
|
81
|
-
//# sourceMappingURL=TextAnswerInput.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnswerInput.test.js","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/TextAnswerInput.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,6EAAg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+0,0 @@
|
|
|
1
|
-
import { Locator } from '@playwright/test';
|
|
2
|
-
import type { MountResult } from '@playwright/experimental-ct-react';
|
|
3
|
-
export declare class AudioPlayerPage {
|
|
4
|
-
readonly mountResult: MountResult;
|
|
5
|
-
readonly baseLocator: Locator;
|
|
6
|
-
readonly playButton: Locator;
|
|
7
|
-
readonly pauseButton: Locator;
|
|
8
|
-
readonly progressBar: Locator;
|
|
9
|
-
readonly currentTimeDisplay: Locator;
|
|
10
|
-
readonly durationDisplay: Locator;
|
|
11
|
-
constructor(mountResult: MountResult, nth?: number);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=AudioPlayer.page.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AudioPlayer.page.d.ts","sourceRoot":"","sources":["../../../../__tests__/playwright/pages/AudioPlayer.page.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAEpE,qBAAa,eAAe;IAC1B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;IAC7B,SAAgB,UAAU,EAAE,OAAO,CAAA;IACnC,SAAgB,WAAW,EAAE,OAAO,CAAA;IACpC,SAAgB,WAAW,EAAE,OAAO,CAAA;IACpC,SAAgB,kBAAkB,EAAE,OAAO,CAAA;IAC3C,SAAgB,eAAe,EAAE,OAAO,CAAA;gBAE5B,WAAW,EAAE,WAAW,EAAE,GAAG,GAAE,MAAU;CAStD"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AudioPlayerPage = void 0;
|
|
4
|
-
class AudioPlayerPage {
|
|
5
|
-
constructor(mountResult, nth = 0) {
|
|
6
|
-
this.mountResult = mountResult;
|
|
7
|
-
this.baseLocator = this.mountResult.getByTestId('audio-player-container').nth(nth);
|
|
8
|
-
this.playButton = this.baseLocator.getByRole('button', { name: 'Toista äänite' });
|
|
9
|
-
this.pauseButton = this.baseLocator.getByRole('button', { name: 'Keskeytä äänite' });
|
|
10
|
-
this.progressBar = this.baseLocator.getByTestId('audio-player-progress-bar');
|
|
11
|
-
this.currentTimeDisplay = this.baseLocator.getByTestId('audio-player-current-time');
|
|
12
|
-
this.durationDisplay = this.baseLocator.getByTestId('audio-player-duration');
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.AudioPlayerPage = AudioPlayerPage;
|
|
16
|
-
//# sourceMappingURL=AudioPlayer.page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AudioPlayer.page.js","sourceRoot":"","sources":["../../../../__tests__/playwright/pages/AudioPlayer.page.tsx"],"names":[],"mappings":";;;AAGA,MAAa,eAAe;IAS1B,YAAY,WAAwB,EAAE,MAAc,CAAC;QACnD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAClF,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAA;QACjF,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAA;QACpF,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAAA;QAC5E,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAAA;QACnF,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAA;IAC9E,CAAC;CACF;AAlBD,0CAkBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultiLineAnswer.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/playwright/results/MultiLineAnswer.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const experimental_ct_react_1 = require("@playwright/experimental-ct-react");
|
|
8
|
-
const MultiLineAnswer_story_1 = require("../stories/results/MultiLineAnswer.story");
|
|
9
|
-
const textAnnotationScore = {
|
|
10
|
-
questionId: 1,
|
|
11
|
-
answerId: 1,
|
|
12
|
-
pregrading: {
|
|
13
|
-
score: 1,
|
|
14
|
-
annotations: [{ type: 'text', startIndex: 6, length: 5, message: 'Text annotation' }]
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
experimental_ct_react_1.test.describe('<MultiLineAnswer /> image opening', () => {
|
|
18
|
-
(0, experimental_ct_react_1.test)('adds a full size image link for downscaled images', async ({ mount }) => {
|
|
19
|
-
const component = await mount(react_1.default.createElement(MultiLineAnswer_story_1.MultiLineAnswerStory, { imageWidth: 1600 }));
|
|
20
|
-
const src = await component.locator('img').evaluate((img) => img.src);
|
|
21
|
-
await (0, experimental_ct_react_1.expect)(component.locator('.full-size-image a')).toHaveAttribute('target', '_blank');
|
|
22
|
-
await (0, experimental_ct_react_1.expect)(component.locator('.full-size-image a')).toHaveAttribute('href', src);
|
|
23
|
-
});
|
|
24
|
-
(0, experimental_ct_react_1.test)('does not add a full size image link for images rendered at natural size', async ({ mount }) => {
|
|
25
|
-
const component = await mount(react_1.default.createElement(MultiLineAnswer_story_1.MultiLineAnswerStory, { imageWidth: 400 }));
|
|
26
|
-
// we need to wait for the image to load, otherwise the assertion would be immediately true
|
|
27
|
-
await waitForImageLoad(component.locator('img'));
|
|
28
|
-
await (0, experimental_ct_react_1.expect)(component.locator('.full-size-image')).toHaveCount(0);
|
|
29
|
-
});
|
|
30
|
-
(0, experimental_ct_react_1.test)('keeps annotation marks out of the full size image wrapper', async ({ mount }) => {
|
|
31
|
-
const component = await mount(react_1.default.createElement(MultiLineAnswer_story_1.MultiLineAnswerStory, { imageWidth: 1600, score: textAnnotationScore }));
|
|
32
|
-
await (0, experimental_ct_react_1.expect)(component.locator('.full-size-image a')).toHaveCount(1);
|
|
33
|
-
await (0, experimental_ct_react_1.expect)(component.locator('.full-size-image mark')).toHaveCount(0);
|
|
34
|
-
await (0, experimental_ct_react_1.expect)(component.locator('mark')).toContainText('World');
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
async function waitForImageLoad(image) {
|
|
38
|
-
await image.evaluate((img) => {
|
|
39
|
-
if (img.complete) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
return new Promise(resolve => img.addEventListener('load', () => resolve(), { once: true }));
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=MultiLineAnswer.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultiLineAnswer.test.js","sourceRoot":"","sources":["../../../../__tests__/playwright/results/MultiLineAnswer.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,6EAAgE;AAGhE,oFAA+E;AAE/E,MAAM,mBAAmB,GAAU;IACjC,UAAU,EAAE,CAAC;IACb,QAAQ,EAAE,CAAC;IACX,UAAU,EAAE;QACV,KAAK,EAAE,CAAC;QACR,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO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,CAAC,8BAAC,4CAAoB,IAAC,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,mBAAmB,GAAI,CAAC,CAAA;QAErG,MAAM,IAAA,8BAAM,EAAC,SAAS,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;QACpE,MAAM,IAAA,8BAAM,EAAC,SAAS,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;QACvE,MAAM,IAAA,8BAAM,EAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;IAChE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,KAAK,UAAU,gBAAgB,CAAC,KAAc;IAC5C,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAqB,EAAE,EAAE;QAC7C,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;YACjB,OAAM;QACR,CAAC;QACD,OAAO,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACpG,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AudioAnswer.story.d.ts","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/AudioAnswer.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,gBAAgB,GAAI,aAAa;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,sBAGhE,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AudioAnswerStory = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const src_1 = require("../../../../src");
|
|
9
|
-
const AudioAnswerStory = ({ examXml }) => {
|
|
10
|
-
const doc = new DOMParser().parseFromString(examXml, 'application/xml');
|
|
11
|
-
return react_1.default.createElement(src_1.Exam, { doc: doc, examServerApi: (0, src_1.indexedDBExamServerAPI)('examUUID', () => '') });
|
|
12
|
-
};
|
|
13
|
-
exports.AudioAnswerStory = AudioAnswerStory;
|
|
14
|
-
//# sourceMappingURL=AudioAnswer.story.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AudioAnswer.story.js","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/AudioAnswer.story.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,yCAA8D;AAEvD,MAAM,gBAAgB,GAAG,CAAC,EAAE,OAAO,EAAuB,EAAE,EAAE;IACnE,MAAM,GAAG,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAA;IACvE,OAAO,8BAAC,UAAI,IAAC,GAAG,EAAE,GAAG,EAAE,aAAa,EAAE,IAAA,4BAAsB,EAAC,UAAU,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,GAAI,CAAA;AACxF,CAAC,CAAA;AAHY,QAAA,gBAAgB,oBAG5B"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MasteringResult } from '@digabi/exam-engine-mastering';
|
|
3
|
-
export type answerMediaType = 'text' | 'image';
|
|
4
|
-
interface DNDAnswerContainerStoryProps {
|
|
5
|
-
masteredExam: MasteringResult;
|
|
6
|
-
answerMediaType: answerMediaType;
|
|
7
|
-
}
|
|
8
|
-
export declare const DNDAnswerContainerStory: React.FC<DNDAnswerContainerStoryProps>;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=DNDAnswerContainer.story.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DNDAnswerContainer.story.d.ts","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/DNDAnswerContainer.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAO/D,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAA;AAE9C,UAAU,4BAA4B;IACpC,YAAY,EAAE,eAAe,CAAA;IAC7B,eAAe,EAAE,eAAe,CAAA;CACjC;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAe1E,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DNDAnswerContainerStory = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const Exam_1 = require("../../../../src/components/exam/Exam");
|
|
9
|
-
const DNDAnswerContainer_1 = require("../../../../src/components/exam/DNDAnswerContainer");
|
|
10
|
-
const ExamComponentWrapper_1 = require("../../utils/ExamComponentWrapper");
|
|
11
|
-
const parseExam_1 = __importDefault(require("../../../../src/parser/parseExam"));
|
|
12
|
-
const dom_utils_1 = require("../../../../src/dom-utils");
|
|
13
|
-
const DNDAnswerContainerStory = ({ masteredExam, answerMediaType }) => {
|
|
14
|
-
const doc = (0, parseExam_1.default)(masteredExam.xml, true);
|
|
15
|
-
const [textAnswers, imageAnswers] = (0, dom_utils_1.queryAll)(doc.documentElement, 'dnd-answer-container');
|
|
16
|
-
return (react_1.default.createElement(ExamComponentWrapper_1.ExamComponentWrapper, { doc: doc, resolveAttachment: (filename) => `/${masteredExam.examCode}/attachments/${filename}` },
|
|
17
|
-
react_1.default.createElement(DNDAnswerContainer_1.DNDAnswerContainer, { element: answerMediaType === 'text' ? textAnswers : imageAnswers, renderChildNodes: (0, Exam_1.renderChildNodesBase)(), renderComponentOverrides: {} })));
|
|
18
|
-
};
|
|
19
|
-
exports.DNDAnswerContainerStory = DNDAnswerContainerStory;
|
|
20
|
-
//# sourceMappingURL=DNDAnswerContainer.story.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DNDAnswerContainer.story.js","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/DNDAnswerContainer.story.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,+DAA2E;AAC3E,2FAAuF;AACvF,2EAAuE;AACvE,iFAAwD;AACxD,yDAAoD;AAS7C,MAAM,uBAAuB,GAA2C,CAAC,EAAE,YAAY,EAAE,eAAe,EAAE,EAAE,EAAE;IACnH,MAAM,GAAG,GAAG,IAAA,mBAAS,EAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAC7C,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,GAAG,IAAA,oBAAQ,EAAC,GAAG,CAAC,eAAe,EAAE,sBAAsB,CAAC,CAAA;IACzF,OAAO,CACL,8BAAC,2CAAoB,IACnB,GAAG,EAAE,GAAG,EACR,iBAAiB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,QAAQ,gBAAgB,QAAQ,EAAE;QAE5F,8BAAC,uCAAkB,IACjB,OAAO,EAAE,eAAe,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,EAChE,gBAAgB,EAAE,IAAA,2BAAoB,GAAE,EACxC,wBAAwB,EAAE,EAAE,GACR,CACD,CACxB,CAAA;AACH,CAAC,CAAA;AAfY,QAAA,uBAAuB,2BAenC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { MasteringResult } from '@digabi/exam-engine-mastering';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
interface ExamStoryProps {
|
|
4
|
-
masteredExam: MasteringResult;
|
|
5
|
-
}
|
|
6
|
-
export declare const ExamStory: React.FC<ExamStoryProps>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=Exam.story.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Exam.story.d.ts","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/Exam.story.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,UAAU,cAAc;IACtB,YAAY,EAAE,eAAe,CAAA;CAC9B;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAY9C,CAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ExamStory = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const src_1 = require("../../../../src");
|
|
9
|
-
const examServerApi_1 = require("../../../examServerApi");
|
|
10
|
-
const ExamStory = ({ masteredExam }) => {
|
|
11
|
-
const doc = new DOMParser().parseFromString(masteredExam.xml, 'application/xml');
|
|
12
|
-
return (react_1.default.createElement(src_1.Exam, { attachmentsURL: '/attachments',
|
|
13
|
-
resolveAttachment: (filename) => `/${masteredExam.examCode}/attachments/${filename}`,
|
|
14
|
-
doc,
|
|
15
|
-
examServerApi: examServerApi_1.examServerApi }));
|
|
16
|
-
};
|
|
17
|
-
exports.ExamStory = ExamStory;
|
|
18
|
-
//# sourceMappingURL=Exam.story.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Exam.story.js","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/Exam.story.tsx"],"names":[],"mappings":";;;;;;AACA,kDAAyB;AACzB,yCAAsC;AACtC,0DAAsD;AAM/C,MAAM,SAAS,GAA6B,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IACtE,MAAM,GAAG,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAA;IAChF,OAAO,CACL,8BAAC,UAAI,IAED,cAAc,EAAE,cAAc;QAC9B,iBAAiB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,QAAQ,gBAAgB,QAAQ,EAAE;QAC5F,GAAG;QACH,aAAa,EAAb,6BAAa,GAEf,CACH,CAAA;AACH,CAAC,CAAA;AAZY,QAAA,SAAS,aAYrB"}
|