@digabi/exam-engine-core 23.1.2-alpha.0 → 23.1.4-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/playwright/exam/DNDAnswerContainer.test.js +10 -6
- package/dist/__tests__/playwright/exam/DNDAnswerContainer.test.js.map +1 -1
- package/dist/__tests__/playwright/stories/exam/DNDAnswerContainer.story.d.ts.map +1 -1
- package/dist/__tests__/playwright/stories/exam/DNDAnswerContainer.story.js +0 -1
- package/dist/__tests__/playwright/stories/exam/DNDAnswerContainer.story.js.map +1 -1
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/components/context/ResultsContext.js +1 -1
- package/dist/components/context/ResultsContext.js.map +1 -1
- package/dist/components/exam/DNDAnswerContainer.d.ts +3 -1
- package/dist/components/exam/DNDAnswerContainer.d.ts.map +1 -1
- package/dist/components/exam/DNDAnswerContainer.js +26 -16
- package/dist/components/exam/DNDAnswerContainer.js.map +1 -1
- package/dist/components/results/AudioContainer.d.ts +4 -0
- package/dist/components/results/AudioContainer.d.ts.map +1 -0
- package/dist/components/results/AudioContainer.js +26 -0
- package/dist/components/results/AudioContainer.js.map +1 -0
- package/dist/components/results/DNDAnswerContainer.d.ts.map +1 -1
- package/dist/components/results/DNDAnswerContainer.js +5 -18
- package/dist/components/results/DNDAnswerContainer.js.map +1 -1
- package/dist/components/results/Results.js +2 -2
- package/dist/components/results/Results.js.map +1 -1
- package/dist/components/shared/DNDTitleAndDroppable.js +2 -2
- package/dist/components/shared/DNDTitleAndDroppable.js.map +1 -1
- package/dist/main-bundle.js +3 -3
- package/dist/main.css +1 -1
- package/package.json +3 -3
@@ -59,12 +59,8 @@ async function setupAnswerContext(component, answerMediaType) {
|
|
59
59
|
const answerOptionsLocator = component.getByTestId('dnd-droppable').last();
|
60
60
|
const firstAnswerLocator = component.getByTestId('dnd-answer-option').nth(0);
|
61
61
|
const secondAnswerLocator = component.getByTestId('dnd-answer-option').nth(1);
|
62
|
-
const firstAnswerContent =
|
63
|
-
|
64
|
-
: await firstAnswerLocator.locator('img').getAttribute('src');
|
65
|
-
const secondAnswerContent = answerMediaType === 'text'
|
66
|
-
? await secondAnswerLocator.textContent()
|
67
|
-
: await secondAnswerLocator.locator('img').getAttribute('src');
|
62
|
+
const firstAnswerContent = await getAnswerContent(firstAnswerLocator, answerMediaType);
|
63
|
+
const secondAnswerContent = await getAnswerContent(secondAnswerLocator, answerMediaType);
|
68
64
|
return {
|
69
65
|
answerContainer,
|
70
66
|
answerOptionsLocator,
|
@@ -74,4 +70,12 @@ async function setupAnswerContext(component, answerMediaType) {
|
|
74
70
|
secondAnswerContent: secondAnswerContent
|
75
71
|
};
|
76
72
|
}
|
73
|
+
async function getAnswerContent(answerLocator, mediaType) {
|
74
|
+
if (mediaType === 'text') {
|
75
|
+
return await answerLocator.textContent();
|
76
|
+
}
|
77
|
+
else if (mediaType === 'image') {
|
78
|
+
return await answerLocator.locator('img').getAttribute('src');
|
79
|
+
}
|
80
|
+
}
|
77
81
|
//# sourceMappingURL=DNDAnswerContainer.test.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DNDAnswerContainer.test.js","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/DNDAnswerContainer.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,2BAAiC;AACjC,gDAAuB;AACvB,6EAAgE;AAEhE,iEAAuD;AACvD,yEAA0G;AAC1G,uFAAkF;AAElF,4BAAI,CAAC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IACvC,IAAI,YAA6B,CAAA;IAEjC,4BAAI,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACxB,YAAY,GAAG,MAAM,iBAAiB,EAAE,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,KAAK,MAAM,eAAe,IAAI,CAAC,MAAM,EAAE,OAAO,CAAU,EAAE,CAAC;QACzD,IAAA,4BAAI,EAAC,mDAAmD,eAAe,UAAU,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,E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BAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IAC5E,MAAM,mBAAmB,GAAG,SAAS,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;
|
1
|
+
{"version":3,"file":"DNDAnswerContainer.test.js","sourceRoot":"","sources":["../../../../__tests__/playwright/exam/DNDAnswerContainer.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,2BAAiC;AACjC,gDAAuB;AACvB,6EAAgE;AAEhE,iEAAuD;AACvD,yEAA0G;AAC1G,uFAAkF;AAElF,4BAAI,CAAC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IACvC,IAAI,YAA6B,CAAA;IAEjC,4BAAI,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACxB,YAAY,GAAG,MAAM,iBAAiB,EAAE,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,KAAK,MAAM,eAAe,IAAI,CAAC,MAAM,EAAE,OAAO,CAAU,EAAE,CAAC;QACzD,IAAA,4BAAI,EAAC,mDAAmD,eAAe,UAAU,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YACrG,MAAM,SAAS,GAAG,MAAM,KAAK,CAC3B,8BAAC,kDAAuB,IAAC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,GAAI,CAC1F,CAAA;YACD,MAAM,EACJ,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACpB,GAAG,MAAM,kBAAkB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAA;YAExD,MAAM,4BAAI,CAAC,IAAI,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;gBAClE,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;gBACnE,MAAM,gBAAgB,CAAC,MAAM,CAAC,eAAe,CAAC,CAAA;gBAC9C,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SAA2B;IACjF,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACzB,OAAO,MAAM,aAAa,CAAC,WAAW,EAAE,CAAA;IAC1C,CAAC;SAAM,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO,MAAM,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IAC/D,CAAC;AACH,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DNDAnswerContainer.story.d.ts","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/DNDAnswerContainer.story.tsx"],"names":[],"mappings":"
|
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,CAc1E,CAAA"}
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.DNDAnswerContainerStory = void 0;
|
7
|
-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
8
7
|
const react_1 = __importDefault(require("react"));
|
9
8
|
const Exam_1 = require("../../../../src/components/exam/Exam");
|
10
9
|
const DNDAnswerContainer_1 = require("../../../../src/components/exam/DNDAnswerContainer");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DNDAnswerContainer.story.js","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/DNDAnswerContainer.story.tsx"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"DNDAnswerContainer.story.js","sourceRoot":"","sources":["../../../../../__tests__/playwright/stories/exam/DNDAnswerContainer.story.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,+DAAuE;AACvE,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,uBAAgB,GACd,CACD,CACxB,CAAA;AACH,CAAC,CAAA;AAdY,QAAA,uBAAuB,2BAcnC"}
|