Fixing an issue with double digit interaction counts

This commit is contained in:
Jonathan Putney
2020-06-26 12:07:06 -04:00
parent 8f2db32e27
commit 9847b0f1eb
6 changed files with 29 additions and 15 deletions

View File

@@ -282,7 +282,12 @@ describe('SCORM 1.2 API Tests', () => {
});
h.checkLMSSetValue({
api: apiInitialized(),
fieldName: 'cmi.interactions.0.correct_responses.0.pattern',
fieldName: 'cmi.interactions.0.objectives.0.id',
valueToTest: 'AAA',
});
h.checkLMSSetValue({
api: apiInitialized(),
fieldName: 'cmi.interactions.10.correct_responses.0.pattern',
valueToTest: 't',
});
});

View File

@@ -305,6 +305,15 @@ describe('SCORM 2004 API Tests', () => {
String(scorm2004API.lmsGetLastError())
).to.equal(String(0));
});
it('should allow cmi.interactions.10.correct_responses.0.pattern to be set - T/F',
() => {
const scorm2004API = apiInitialized();
scorm2004API.setCMIValue('cmi.interactions.0.type', 'true-false');
scorm2004API.setCMIValue('cmi.interactions.0.correct_responses.0.pattern', 'true');
expect(
String(scorm2004API.lmsGetLastError())
).to.equal(String(0));
});
it('should allow cmi.interactions.0.correct_responses.0.pattern to be set - choice',
() => {
const scorm2004API = apiInitialized();