@digabi/exam-engine-core 23.13.0 → 23.13.2
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/__tests__/playwright/exam/TextAnswerInput.test.d.ts +2 -0
- package/dist/__tests__/playwright/exam/TextAnswerInput.test.d.ts.map +1 -0
- package/dist/__tests__/playwright/exam/TextAnswerInput.test.js +40 -0
- package/dist/__tests__/playwright/exam/TextAnswerInput.test.js.map +1 -0
- package/dist/__tests__/playwright/stories/exam/Question.story.d.ts +5 -0
- package/dist/__tests__/playwright/stories/exam/Question.story.d.ts.map +1 -0
- package/dist/__tests__/playwright/stories/exam/Question.story.js +19 -0
- package/dist/__tests__/playwright/stories/exam/Question.story.js.map +1 -0
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/components/exam/internal/TextAnswerInput.js +1 -1
- package/dist/components/exam/internal/TextAnswerInput.js.map +1 -1
- package/dist/main-bundle.js +5049 -366
- package/dist/main.css +1 -1
- package/package.json +2 -2
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TextAnswerInput.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/TextAnswerInput.test.tsx"],"names":[],"mappings":""}
|
@@ -0,0 +1,40 @@
|
|
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('\u22125');
|
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('\u002D5');
|
19
|
+
});
|
20
|
+
});
|
21
|
+
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">
|
22
|
+
<e:exam-versions>
|
23
|
+
<e:exam-version lang="fi-FI"/>
|
24
|
+
</e:exam-versions>
|
25
|
+
<e:exam-title>Exam</e:exam-title>
|
26
|
+
<e:exam-instruction/>
|
27
|
+
<e:table-of-contents/>
|
28
|
+
<e:section>
|
29
|
+
<e:section-title>Section</e:section-title>
|
30
|
+
<e:section-instruction/>
|
31
|
+
<e:question display-number="1">
|
32
|
+
<e:question-title>Kokonaislukutehtävä</e:question-title>
|
33
|
+
<e:question-instruction>
|
34
|
+
<br/>
|
35
|
+
</e:question-instruction>
|
36
|
+
<e:text-answer type="integer" max-score="1"/>
|
37
|
+
</e:question>
|
38
|
+
</e:section>
|
39
|
+
</e:exam>`;
|
40
|
+
//# sourceMappingURL=TextAnswerInput.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TextAnswerInput.test.js","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/TextAnswerInput.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,6EAAgE;AAChE,mEAA8D;AAE9D,4BAAI,CAAC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IACpC,IAAA,4BAAI,EAAC,0CAA0C,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QACnE,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,8BAAC,8BAAa,IAAC,OAAO,EAAE,OAAO,GAAI,CAAC,CAAA;QAClE,MAAM,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,MAAM,IAAA,8BAAM,EAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;IACjE,CAAC,CAAC,CAAA;IAEF,IAAA,4BAAI,EAAC,+CAA+C,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QACxE,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,8BAAC,8BAAa,IAAC,OAAO,EAAE,OAAO,GAAI,CAAC,CAAA;QAClE,MAAM,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,MAAM,IAAA,8BAAM,EAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;IACjE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;UAkBN,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Question.story.d.ts","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/Question.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,qBAQ7D"}
|
@@ -0,0 +1,19 @@
|
|
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.QuestionStory = QuestionStory;
|
7
|
+
const react_1 = __importDefault(require("react"));
|
8
|
+
const Exam_1 = require("../../../../src/components/exam/Exam");
|
9
|
+
const Question_1 = __importDefault(require("../../../../src/components/exam/Question"));
|
10
|
+
const dom_utils_1 = require("../../../../src/dom-utils");
|
11
|
+
const parseExam_1 = __importDefault(require("../../../../src/parser/parseExam"));
|
12
|
+
const ExamComponentWrapper_1 = require("../../utils/ExamComponentWrapper");
|
13
|
+
function QuestionStory({ examXml }) {
|
14
|
+
const doc = (0, parseExam_1.default)(examXml, true);
|
15
|
+
const element = (0, dom_utils_1.queryAll)(doc.documentElement, 'question')[0];
|
16
|
+
return (react_1.default.createElement(ExamComponentWrapper_1.ExamComponentWrapper, { doc: doc },
|
17
|
+
react_1.default.createElement(Question_1.default, { element: element, renderChildNodes: (0, Exam_1.renderChildNodesBase)(), renderComponentOverrides: {} })));
|
18
|
+
}
|
19
|
+
//# sourceMappingURL=Question.story.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Question.story.js","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/Question.story.tsx"],"names":[],"mappings":";;;;;AAOA,sCAQC;AAfD,kDAAyB;AACzB,+DAA2E;AAC3E,wFAA+D;AAC/D,yDAAoD;AACpD,iFAAwD;AACxD,2EAAuE;AAEvE,SAAgB,aAAa,CAAC,EAAE,OAAO,EAAuB;IAC5D,MAAM,GAAG,GAAG,IAAA,mBAAS,EAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IACpC,MAAM,OAAO,GAAG,IAAA,oBAAQ,EAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5D,OAAO,CACL,8BAAC,2CAAoB,IAAC,GAAG,EAAE,GAAG;QAC5B,8BAAC,kBAAQ,IAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAA,2BAAoB,GAAE,EAAE,wBAAwB,EAAE,EAAE,GAAI,CACjF,CACxB,CAAA;AACH,CAAC"}
|