@digabi/exam-engine-core 20.3.1 → 20.3.2-annoteta-react.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/dist/__tests__/annotations.test.d.ts +2 -0
  2. package/dist/__tests__/annotations.test.d.ts.map +1 -0
  3. package/dist/__tests__/annotations.test.js +179 -0
  4. package/dist/__tests__/annotations.test.js.map +1 -0
  5. package/dist/__tests__/testExamRendering.js.map +1 -1
  6. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  7. package/dist/components/attachments/Attachments.d.ts.map +1 -1
  8. package/dist/components/attachments/Attachments.js +17 -13
  9. package/dist/components/attachments/Attachments.js.map +1 -1
  10. package/dist/components/context/AnnotationContext.d.ts +9 -0
  11. package/dist/components/context/AnnotationContext.d.ts.map +1 -0
  12. package/dist/components/context/AnnotationContext.js +3 -0
  13. package/dist/components/context/AnnotationContext.js.map +1 -0
  14. package/dist/components/context/AnnotationProvider.d.ts +16 -0
  15. package/dist/components/context/AnnotationProvider.d.ts.map +1 -0
  16. package/dist/components/context/AnnotationProvider.js +19 -0
  17. package/dist/components/context/AnnotationProvider.js.map +1 -0
  18. package/dist/components/exam/DropdownAnswer.d.ts.map +1 -1
  19. package/dist/components/exam/DropdownAnswer.js +9 -1
  20. package/dist/components/exam/DropdownAnswer.js.map +1 -1
  21. package/dist/components/exam/Exam.d.ts +6 -1
  22. package/dist/components/exam/Exam.d.ts.map +1 -1
  23. package/dist/components/exam/Exam.js +35 -31
  24. package/dist/components/exam/Exam.js.map +1 -1
  25. package/dist/components/grading/editAnnotations.d.ts.map +1 -1
  26. package/dist/components/grading/editAnnotations.js +1 -0
  27. package/dist/components/grading/editAnnotations.js.map +1 -1
  28. package/dist/components/grading/examAnnotationUtils.d.ts +4 -0
  29. package/dist/components/grading/examAnnotationUtils.d.ts.map +1 -0
  30. package/dist/components/grading/examAnnotationUtils.js +53 -0
  31. package/dist/components/grading/examAnnotationUtils.js.map +1 -0
  32. package/dist/components/grading/reactAnnotation.d.ts +4 -0
  33. package/dist/components/grading/reactAnnotation.d.ts.map +1 -0
  34. package/dist/components/grading/reactAnnotation.js +54 -0
  35. package/dist/components/grading/reactAnnotation.js.map +1 -0
  36. package/dist/components/grading-instructions/GradingInstructions.d.ts +2 -2
  37. package/dist/components/grading-instructions/GradingInstructions.d.ts.map +1 -1
  38. package/dist/components/grading-instructions/GradingInstructions.js +19 -14
  39. package/dist/components/grading-instructions/GradingInstructions.js.map +1 -1
  40. package/dist/components/shared/AnnotationPopup.d.ts +3 -0
  41. package/dist/components/shared/AnnotationPopup.d.ts.map +1 -0
  42. package/dist/components/shared/AnnotationPopup.js +61 -0
  43. package/dist/components/shared/AnnotationPopup.js.map +1 -0
  44. package/dist/components/shared/CreateAnnotationPopup.d.ts +6 -0
  45. package/dist/components/shared/CreateAnnotationPopup.d.ts.map +1 -0
  46. package/dist/components/shared/CreateAnnotationPopup.js +11 -0
  47. package/dist/components/shared/CreateAnnotationPopup.js.map +1 -0
  48. package/dist/createRenderChildNodes.d.ts.map +1 -1
  49. package/dist/createRenderChildNodes.js +85 -6
  50. package/dist/createRenderChildNodes.js.map +1 -1
  51. package/dist/main-bundle.js +1 -1
  52. package/dist/main.css +1 -1
  53. package/dist/types/Score.d.ts +17 -8
  54. package/dist/types/Score.d.ts.map +1 -1
  55. package/package.json +2 -2
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=annotations.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotations.test.d.ts","sourceRoot":"","sources":["../../__tests__/annotations.test.tsx"],"names":[],"mappings":"AAWA,OAAO,2BAA2B,CAAA"}
@@ -0,0 +1,179 @@
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 = require("@testing-library/react");
7
+ const user_event_1 = __importDefault(require("@testing-library/user-event"));
8
+ const Exam_1 = __importDefault(require("../src/components/exam/Exam"));
9
+ const GradingInstructions_1 = __importDefault(require("../src/components/grading-instructions/GradingInstructions"));
10
+ const fs_1 = require("fs");
11
+ const exam_engine_mastering_1 = require("@digabi/exam-engine-mastering");
12
+ const exam_engine_exams_1 = require("@digabi/exam-engine-exams");
13
+ const path_1 = __importDefault(require("path"));
14
+ const parseExam_1 = __importDefault(require("../dist/parser/parseExam"));
15
+ const examServerApi_1 = require("./examServerApi");
16
+ const react_2 = __importDefault(require("react"));
17
+ require("@testing-library/jest-dom");
18
+ const Attachments_1 = __importDefault(require("../src/components/attachments/Attachments"));
19
+ class IntersectionObserver {
20
+ constructor() {
21
+ this.root = null;
22
+ this.rootMargin = '';
23
+ this.thresholds = [];
24
+ this.disconnect = () => null;
25
+ this.observe = () => null;
26
+ this.takeRecords = () => [];
27
+ this.unobserve = () => null;
28
+ }
29
+ }
30
+ window.IntersectionObserver = IntersectionObserver;
31
+ global.IntersectionObserver = IntersectionObserver;
32
+ window.scrollTo = jest.fn();
33
+ document.execCommand = jest.fn();
34
+ describe('Annotations', () => {
35
+ let doc;
36
+ beforeEach(async () => {
37
+ window.getSelection = jest.fn();
38
+ const examPath = (0, exam_engine_exams_1.resolveExam)('FF/FF.xml');
39
+ const resolveAttachment = (filename) => path_1.default.resolve(path_1.default.dirname(examPath), 'attachments', filename);
40
+ const source = await fs_1.promises.readFile(examPath, 'utf-8');
41
+ const results = await (0, exam_engine_mastering_1.masterExam)(source, () => '', (0, exam_engine_mastering_1.getMediaMetadataFromLocalFile)(resolveAttachment), {
42
+ removeCorrectAnswers: false
43
+ });
44
+ doc = (0, parseExam_1.default)(results[0].xml, true);
45
+ });
46
+ afterEach(() => {
47
+ ;
48
+ window.getSelection.mockReset();
49
+ window.scrollTo.mockReset();
50
+ document.execCommand.mockReset();
51
+ });
52
+ const defaultTextToAnnotate = 'Sekä moraali että tavat pyrkivät ohjaamaan ihmisten käyttäytymistä.';
53
+ const defaultAnnotationAnchor = 'e:exam:-1 > e:section:1 > e:question:2 > e:question-instruction:1 > span:0 > p:0 > #text:0';
54
+ it('popup is rendered', async () => {
55
+ const exam = (0, react_1.render)(react_2.default.createElement(Exam_1.default, { ...getExamProps(), annotations: {}, onClickAnnotation: () => { }, onSaveAnnotation: () => { } }));
56
+ await annotateText(exam, defaultTextToAnnotate);
57
+ expect(exam.getByTestId('annotation-popup')).toBeVisible();
58
+ });
59
+ it('popup is not rendered if annotation props are not passed', async () => {
60
+ const exam = (0, react_1.render)(react_2.default.createElement(Exam_1.default, { ...getExamProps() }));
61
+ await annotateText(exam, defaultTextToAnnotate);
62
+ expect(exam.queryByTestId('annotation-popup')).not.toBeInTheDocument();
63
+ });
64
+ it('callback is called when annotation is saved', async () => {
65
+ const saveAnnotationMock = jest.fn();
66
+ const exam = (0, react_1.render)(react_2.default.createElement(Exam_1.default, { ...getExamProps(), annotations: {}, onClickAnnotation: () => { }, onSaveAnnotation: saveAnnotationMock }));
67
+ await annotateText(exam, defaultTextToAnnotate);
68
+ const textbox = exam.getByTestId('edit-comment');
69
+ react_1.fireEvent.input(textbox, {
70
+ target: { innerText: 'New Value', innerHTML: 'New Value' }
71
+ });
72
+ await user_event_1.default.click(exam.getByText('Vastaa'));
73
+ expect(saveAnnotationMock).toHaveBeenCalledTimes(1);
74
+ expect(saveAnnotationMock).toHaveBeenCalledWith({
75
+ annotationAnchor: defaultAnnotationAnchor,
76
+ annotationId: undefined,
77
+ displayNumber: '2',
78
+ length: defaultTextToAnnotate.length,
79
+ message: 'New Value',
80
+ selectedText: defaultTextToAnnotate,
81
+ startIndex: 67
82
+ });
83
+ });
84
+ it('callback is called when annotation is clicked', async () => {
85
+ const clickAnnotationMock = jest.fn();
86
+ const exam = (0, react_1.render)(react_2.default.createElement(Exam_1.default, { ...getExamProps(), annotations: { [defaultAnnotationAnchor]: [createAnnotation(1, 1, 1)] }, onClickAnnotation: clickAnnotationMock, onSaveAnnotation: () => { } }));
87
+ await user_event_1.default.click(exam.container.querySelector('[data-annotation-id="1"]'));
88
+ expect(clickAnnotationMock).toHaveBeenCalledTimes(1);
89
+ expect(clickAnnotationMock).toHaveBeenCalledWith(expect.anything(), {
90
+ annotationAnchor: defaultAnnotationAnchor,
91
+ annotationId: 1,
92
+ displayNumber: '',
93
+ hidden: false,
94
+ length: 1,
95
+ message: '',
96
+ selectedText: '',
97
+ startIndex: 1
98
+ });
99
+ });
100
+ it('annotations are added to dom when provided', () => {
101
+ const annotationProps = {
102
+ annotations: {
103
+ [defaultAnnotationAnchor]: [createAnnotation(1, 1, 1), createAnnotation(3, 4, 2)]
104
+ },
105
+ onClickAnnotation: () => { },
106
+ onSaveAnnotation: () => { }
107
+ };
108
+ const exam = (0, react_1.render)(react_2.default.createElement(Exam_1.default, { ...getExamProps(), ...annotationProps }));
109
+ expect(exam.container.querySelector('[data-annotation-id="1"]')).toBeInTheDocument();
110
+ expect(exam.container.querySelector('[data-annotation-id="3"]')).toBeInTheDocument();
111
+ });
112
+ it('grading instructions can be annotated', async () => {
113
+ const gi = (0, react_1.render)(react_2.default.createElement(GradingInstructions_1.default, { ...getCommonProps(), annotations: {}, onClickAnnotation: () => { }, onSaveAnnotation: () => { } }));
114
+ await annotateText(gi, defaultTextToAnnotate);
115
+ expect(gi.getByTestId('annotation-popup')).toBeVisible();
116
+ });
117
+ it('attachments can be annotated', async () => {
118
+ const gi = (0, react_1.render)(react_2.default.createElement(Attachments_1.default, { ...getCommonProps(), annotations: {}, onClickAnnotation: () => { }, onSaveAnnotation: () => { } }));
119
+ await annotateText(gi, 'Mollit sint magna aliquip in.');
120
+ expect(gi.getByTestId('annotation-popup')).toBeVisible();
121
+ });
122
+ function createAnnotation(id, startIndex, length) {
123
+ return {
124
+ annotationId: id,
125
+ annotationAnchor: defaultAnnotationAnchor,
126
+ hidden: false,
127
+ startIndex,
128
+ length,
129
+ message: '',
130
+ displayNumber: '',
131
+ selectedText: ''
132
+ };
133
+ }
134
+ async function annotateText(exam, text) {
135
+ mockWindowSelection(text, text.length);
136
+ const textElement = exam.getByText(text);
137
+ await user_event_1.default.click(textElement);
138
+ }
139
+ function mockWindowSelection(text = 'mocked selection text', length = 5) {
140
+ ;
141
+ window.getSelection.mockImplementation(() => ({
142
+ toString: () => text,
143
+ rangeCount: 1,
144
+ getRangeAt: jest.fn().mockReturnValue({
145
+ startOffset: 0,
146
+ endOffset: length,
147
+ startContainer: {},
148
+ endContainer: {},
149
+ cloneContents: jest.fn().mockReturnValue({ children: [], childNodes: [] })
150
+ })
151
+ }));
152
+ }
153
+ function getCommonProps() {
154
+ return {
155
+ doc,
156
+ answers: [],
157
+ attachmentsURL: '/attachments',
158
+ resolveAttachment: (filename) => `/attachments/${encodeURIComponent(filename)}`
159
+ };
160
+ }
161
+ function getExamProps() {
162
+ const examProps = {
163
+ ...getCommonProps(),
164
+ casStatus: 'forbidden',
165
+ examServerApi: examServerApi_1.examServerApi,
166
+ restrictedAudioPlaybackStats: [],
167
+ studentName: '[Kokelaan Nimi]',
168
+ showUndoView: false,
169
+ undoViewProps: {
170
+ questionId: 0,
171
+ title: '',
172
+ close: () => undefined,
173
+ restoreAnswer: () => undefined
174
+ }
175
+ };
176
+ return examProps;
177
+ }
178
+ });
179
+ //# sourceMappingURL=annotations.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotations.test.js","sourceRoot":"","sources":["../../__tests__/annotations.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAwE;AACxE,6EAAmD;AACnD,uEAA8E;AAC9E,qHAA4F;AAC5F,2BAAmC;AACnC,yEAAyF;AACzF,iEAAuD;AACvD,gDAAuB;AACvB,yEAAgD;AAChD,mDAA+C;AAC/C,kDAAyB;AACzB,qCAAkC;AAClC,4FAAmE;AAGnE,MAAM,oBAAoB;IAA1B;QACE,SAAI,GAAG,IAAI,CAAA;QACX,eAAU,GAAG,EAAE,CAAA;QACf,eAAU,GAAG,EAAE,CAAA;QACf,eAAU,GAAG,GAAG,EAAE,CAAC,IAAI,CAAA;QACvB,YAAO,GA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AAC;QACrE,CAAC;QAAC,MAAM,CAAC,YAA0B,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,CAAC;YAC5D,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI;YACpB,UAAU,EAAE,CAAC;YACb,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC;gBACpC,WAAW,EAAE,CAAC;gBACd,SAAS,EAAE,MAAM;gBACjB,cAAc,EAAE,EAAE;gBAClB,YAAY,EAAE,EAAE;gBAChB,aAAa,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;aAC3E,CAAC;SACH,CAAC,CAAC,CAAA;IACL,CAAC;IAED,SAAS,cAAc;QACrB,OAAO;YACL,GAAG;YACH,OAAO,EAAE,EAAE;YACX,cAAc,EAAE,cAAc;YAC9B,iBAAiB,EAAE,CAAC,QAAgB,EAAE,EAAE,CAAC,gBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE;SACxF,CAAA;IACH,CAAC;IAED,SAAS,YAAY;QACnB,MAAM,SAAS,GAAc;YAC3B,GAAG,cAAc,EAAE;YACnB,SAAS,EAAE,WAAW;YACtB,aAAa,EAAb,6BAAa;YACb,4BAA4B,EAAE,EAAE;YAChC,WAAW,EAAE,iBAAiB;YAC9B,YAAY,EAAE,KAAK;YACnB,aAAa,EAAE;gBACb,UAAU,EAAE,CAAC;gBACb,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS;gBACtB,aAAa,EAAE,GAAG,EAAE,CAAC,SAAS;aAC/B;SACF,CAAA;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"testExamRendering.js","sourceRoot":"","sources":["../../__tests__/testExamRendering.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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