itemengine-cypress-automation 1.0.602-IEI-7053-d31077b.0 → 1.0.602-IEI-7260-20e3fb8.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/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -108
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAddEvaluation.js +5 -58
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAlternateAnswer.js +2 -25
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -108
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +7 -108
- package/cypress/e2e/ILC/TextEntryMath/Scoring/blankResponseScoring.js +10 -93
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +9 -124
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -123
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -47
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -123
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -123
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +0 -234
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +0 -235
- package/cypress/e2e/ILC/ThinkSphere/gradingViewPlanTabSection.js +1 -0
- package/cypress/pages/textEntryMathPage.js +3 -35
- package/package.json +1 -1
|
@@ -2,9 +2,6 @@ import { textEntryMathPage, gradingViewPage, itemPreviewPage, studentViewPage, d
|
|
|
2
2
|
import { equationEditorFlyout } from "../../../pages/components";
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
|
5
|
-
import { showAlternativeAnswersComponent } from "../../../pages/components";
|
|
6
|
-
|
|
7
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
8
5
|
const grepTags = Cypress.env('grepTags');
|
|
9
6
|
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
|
10
7
|
const views = utilities.getViews(correctAnswerViews);
|
|
@@ -267,237 +264,6 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
|
267
264
|
});
|
|
268
265
|
});
|
|
269
266
|
|
|
270
|
-
if (alternativeAnswerCheck) {
|
|
271
|
-
views.forEach((view) => {
|
|
272
|
-
describe(`Text entry math: all or nothing scoring with alternative answer - ${view}`, { tags: 'smoke' }, () => {
|
|
273
|
-
abortEarlySetup();
|
|
274
|
-
before(() => {
|
|
275
|
-
switch (view) {
|
|
276
|
-
case 'Question preview':
|
|
277
|
-
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
|
278
|
-
textEntryMathPage.steps.addResponseArea();
|
|
279
|
-
textEntryMathPage.steps.addResponseArea();
|
|
280
|
-
textEntryMathPage.steps.addResponseArea();
|
|
281
|
-
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
|
282
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
|
283
|
-
equationEditorFlyout.steps.clearAll();
|
|
284
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
|
285
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
286
|
-
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
|
287
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
|
288
|
-
equationEditorFlyout.steps.enterQuadraticEquation();
|
|
289
|
-
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
|
|
290
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
|
|
291
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('9000%');
|
|
292
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
293
|
-
textEntryMathPage.steps.allotPoints(20);
|
|
294
|
-
textEntryMathPage.steps.addAlternativeAnswerAccordion(1);
|
|
295
|
-
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
|
296
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
|
297
|
-
equationEditorFlyout.steps.clearAll();
|
|
298
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
|
299
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
300
|
-
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
|
301
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
|
302
|
-
equationEditorFlyout.steps.enterEquationUsingPiSymbol();
|
|
303
|
-
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
|
|
304
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
|
|
305
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('7.07e');
|
|
306
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
307
|
-
textEntryMathPage.steps.allotPoints(12);
|
|
308
|
-
textEntryMathPage.steps.expandAdditionalSettings();
|
|
309
|
-
textEntryMathPage.steps.selectModalVisibilityTypeButton();
|
|
310
|
-
textEntryMathPage.steps.switchToPreviewTab();
|
|
311
|
-
break;
|
|
312
|
-
case 'Item preview':
|
|
313
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
314
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
315
|
-
break;
|
|
316
|
-
case 'Grading view':
|
|
317
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
beforeEach(() => {
|
|
323
|
-
switch (view) {
|
|
324
|
-
case 'Question preview':
|
|
325
|
-
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
326
|
-
textEntryMathPage.steps.resetQuestionPreview();
|
|
327
|
-
break;
|
|
328
|
-
case 'Item preview':
|
|
329
|
-
itemPreviewPage.steps.switchToStudentView();
|
|
330
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
|
331
|
-
break;
|
|
332
|
-
case 'Grading view':
|
|
333
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
|
|
338
|
-
if (view === 'Question preview') {
|
|
339
|
-
after(() => {
|
|
340
|
-
textEntryMathPage.steps.clickOnSaveQuestionButton();
|
|
341
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
342
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
343
|
-
});
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
it(`When the user selects \'Grading\' view without attempting the question, correct/incorrect icons should not be displayed correct answers section should be displayed with the correct answers, correct answer label and border should not be displayed`, () => {
|
|
347
|
-
if (view === 'Grading view') {
|
|
348
|
-
studentViewPage.steps.submitResponse();
|
|
349
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
350
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
351
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
352
|
-
}
|
|
353
|
-
if (view === 'Item preview' || view === 'Question preview') {
|
|
354
|
-
textEntryMathPage.steps.switchToGradingView();
|
|
355
|
-
textEntryMathPage.steps.verifyPreviewScore(0, 20);
|
|
356
|
-
}
|
|
357
|
-
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
|
358
|
-
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
359
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
360
|
-
{
|
|
361
|
-
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
362
|
-
points: ['(20 points)']
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
366
|
-
points: ['(12 points)']
|
|
367
|
-
},
|
|
368
|
-
]);
|
|
369
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
|
370
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
|
371
|
-
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
|
372
|
-
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
|
373
|
-
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
|
374
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
375
|
-
});
|
|
376
|
-
|
|
377
|
-
it(`When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, and \'Your answer is incorrect\' label should be displayed`, () => {
|
|
378
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
|
379
|
-
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Incorrect answer 1');
|
|
380
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
381
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
|
382
|
-
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(1, 'Incorrect answer 2');
|
|
383
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
384
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
|
|
385
|
-
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(2, 'Incorrect answer 3');
|
|
386
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
387
|
-
if (view === 'Grading view') {
|
|
388
|
-
studentViewPage.steps.submitResponse();
|
|
389
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
390
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
391
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
392
|
-
}
|
|
393
|
-
if (view === 'Item preview' || view === 'Question preview') {
|
|
394
|
-
textEntryMathPage.steps.switchToGradingView();
|
|
395
|
-
textEntryMathPage.steps.verifyPreviewScore(0, 20);
|
|
396
|
-
}
|
|
397
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
|
398
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
|
|
399
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
|
400
|
-
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
|
401
|
-
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
402
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
403
|
-
{
|
|
404
|
-
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
405
|
-
points: ['(20 points)']
|
|
406
|
-
},
|
|
407
|
-
{
|
|
408
|
-
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
409
|
-
points: ['(12 points)']
|
|
410
|
-
},
|
|
411
|
-
]);
|
|
412
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
|
413
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
|
414
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
415
|
-
});
|
|
416
|
-
|
|
417
|
-
it(`When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icons should be displayed besides the correct responses, incorrect icons should be displayed beside the incorrect responses, and \'Your answer is incorrect\' label should be displayed`, () => {
|
|
418
|
-
if (view === 'Grading view') {
|
|
419
|
-
studentViewPage.steps.clearResponses();
|
|
420
|
-
}
|
|
421
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
|
422
|
-
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Correct1');
|
|
423
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
424
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
|
425
|
-
equationEditorFlyout.steps.enterQuadraticEquation();
|
|
426
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
|
|
427
|
-
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(2, '6*3.14');
|
|
428
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
429
|
-
if (view === 'Grading view') {
|
|
430
|
-
studentViewPage.steps.submitResponse();
|
|
431
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
|
432
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
433
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
434
|
-
}
|
|
435
|
-
if (view === 'Item preview' || view === 'Question preview') {
|
|
436
|
-
textEntryMathPage.steps.switchToGradingView();
|
|
437
|
-
textEntryMathPage.steps.verifyPreviewScore(0, 20);
|
|
438
|
-
}
|
|
439
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
|
440
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
|
441
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
|
442
|
-
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
|
443
|
-
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
444
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
445
|
-
{
|
|
446
|
-
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
447
|
-
points: ['(20 points)']
|
|
448
|
-
},
|
|
449
|
-
{
|
|
450
|
-
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
451
|
-
points: ['(12 points)']
|
|
452
|
-
},
|
|
453
|
-
]);
|
|
454
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
|
455
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
|
456
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
457
|
-
});
|
|
458
|
-
|
|
459
|
-
it(`When the user attempts the question partially correct with a incomplete response, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icons should be displayed besides the correct responses and unattempted correct options, no icon should be displayed beside unattempted response, \'Your answer is incorrect\' should be displayed`, () => {
|
|
460
|
-
if (view === 'Grading view') {
|
|
461
|
-
studentViewPage.steps.clearResponses();
|
|
462
|
-
}
|
|
463
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
|
464
|
-
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Correct1');
|
|
465
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
466
|
-
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
|
467
|
-
equationEditorFlyout.steps.enterQuadraticEquation();
|
|
468
|
-
if (view === 'Grading view') {
|
|
469
|
-
studentViewPage.steps.submitResponse();
|
|
470
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
|
471
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
472
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
473
|
-
}
|
|
474
|
-
if (view === 'Item preview' || view === 'Question preview') {
|
|
475
|
-
textEntryMathPage.steps.switchToGradingView();
|
|
476
|
-
textEntryMathPage.steps.verifyPreviewScore(0, 20);
|
|
477
|
-
}
|
|
478
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
|
479
|
-
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
|
480
|
-
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
|
481
|
-
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
|
482
|
-
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
483
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
484
|
-
{
|
|
485
|
-
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
486
|
-
points: ['(20 points)']
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
490
|
-
points: ['(12 points)']
|
|
491
|
-
},
|
|
492
|
-
]);
|
|
493
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
|
494
|
-
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
|
495
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
496
|
-
});
|
|
497
|
-
});
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
|
|
501
267
|
views.forEach((view) => {
|
|
502
268
|
describe(`Text entry math: all or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
|
|
503
269
|
abortEarlySetup();
|
|
@@ -2,9 +2,6 @@ import { textEntryMathWithImagePage, gradingViewPage, itemPreviewPage, studentVi
|
|
|
2
2
|
import { equationEditorFlyout } from "../../../pages/components";
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
|
5
|
-
import { showAlternativeAnswersComponent } from "../../../pages/components";
|
|
6
|
-
|
|
7
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
8
5
|
const grepTags = Cypress.env('grepTags');
|
|
9
6
|
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
|
10
7
|
const views = utilities.getViews(correctAnswerViews);
|
|
@@ -266,238 +263,6 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
|
266
263
|
});
|
|
267
264
|
});
|
|
268
265
|
|
|
269
|
-
if (alternativeAnswerCheck) {
|
|
270
|
-
views.forEach((view) => {
|
|
271
|
-
describe(`Text entry math: all or nothing scoring with alternative answers - ${view}`, { tags: 'smoke' }, () => {
|
|
272
|
-
abortEarlySetup();
|
|
273
|
-
before(() => {
|
|
274
|
-
switch (view) {
|
|
275
|
-
case 'Question preview':
|
|
276
|
-
textEntryMathWithImagePage.steps.navigateToCreateQuestion('Text Entry Math');
|
|
277
|
-
cy.wait(5000);//waiting for question instructions to load
|
|
278
|
-
cy.barsPreLoaderWait();
|
|
279
|
-
textEntryMathWithImagePage.steps.addBackground();
|
|
280
|
-
textEntryMathWithImagePage.steps.allotPoints(20);
|
|
281
|
-
textEntryMathWithImagePage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
|
282
|
-
textEntryMathWithImagePage.steps.uploadFile('highlightImage.jpg');
|
|
283
|
-
textEntryMathWithImagePage.steps.verifyImageIsUploaded();
|
|
284
|
-
textEntryMathWithImagePage.steps.insertResponseArea(10);
|
|
285
|
-
textEntryMathWithImagePage.steps.insertResponseArea(40);
|
|
286
|
-
textEntryMathWithImagePage.steps.insertResponseArea(50);
|
|
287
|
-
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
|
288
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
|
289
|
-
equationEditorFlyout.steps.clearAll();
|
|
290
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
|
291
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
292
|
-
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
|
293
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
|
294
|
-
equationEditorFlyout.steps.enterQuadraticEquation();
|
|
295
|
-
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
|
|
296
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
|
|
297
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('9000%');
|
|
298
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
299
|
-
textEntryMathWithImagePage.steps.allotPoints(20);
|
|
300
|
-
textEntryMathWithImagePage.steps.addAlternativeAnswerAccordion(1);
|
|
301
|
-
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
|
302
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
|
303
|
-
equationEditorFlyout.steps.clearAll();
|
|
304
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct');
|
|
305
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
306
|
-
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
|
|
307
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
|
308
|
-
equationEditorFlyout.steps.enterEquationUsingPiSymbol();
|
|
309
|
-
textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
|
|
310
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
|
|
311
|
-
equationEditorFlyout.steps.enterTextInPreviewInputField('7.07e');
|
|
312
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
313
|
-
textEntryMathWithImagePage.steps.allotPoints(12);
|
|
314
|
-
textEntryMathWithImagePage.steps.switchToPreviewTab();
|
|
315
|
-
break;
|
|
316
|
-
case 'Item preview':
|
|
317
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
318
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
319
|
-
break;
|
|
320
|
-
case 'Grading view':
|
|
321
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
322
|
-
break;
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
|
|
326
|
-
beforeEach(() => {
|
|
327
|
-
switch (view) {
|
|
328
|
-
case 'Question preview':
|
|
329
|
-
textEntryMathWithImagePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
330
|
-
textEntryMathWithImagePage.steps.resetQuestionPreview();
|
|
331
|
-
break;
|
|
332
|
-
case 'Item preview':
|
|
333
|
-
itemPreviewPage.steps.switchToStudentView();
|
|
334
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
|
335
|
-
break;
|
|
336
|
-
case 'Grading view':
|
|
337
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
338
|
-
break;
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
|
|
342
|
-
if (view === 'Question preview') {
|
|
343
|
-
after(() => {
|
|
344
|
-
textEntryMathWithImagePage.steps.clickOnSaveQuestionButton();
|
|
345
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
346
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
347
|
-
});
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
it('When the user selects \'Grading\' view without attempting the question, correct/incorrect icons should not be displayed correct answers section should be displayed with the correct answers, correct answer label and border should not be displayed', () => {
|
|
351
|
-
if (view === 'Grading view') {
|
|
352
|
-
studentViewPage.steps.submitResponse();
|
|
353
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
354
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
355
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
356
|
-
}
|
|
357
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
358
|
-
textEntryMathWithImagePage.steps.switchToGradingView();
|
|
359
|
-
textEntryMathWithImagePage.steps.verifyPreviewScore(0, 20);
|
|
360
|
-
}
|
|
361
|
-
textEntryMathWithImagePage.steps.verifyResponseFieldNumerationPreviewTab();
|
|
362
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
363
|
-
{
|
|
364
|
-
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
365
|
-
points: ['(20 points)']
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
369
|
-
points: ['(12 points)']
|
|
370
|
-
},
|
|
371
|
-
]);
|
|
372
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
|
373
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
|
374
|
-
textEntryMathWithImagePage.steps.verifyCorrectIncorrectIconNotExist(0);
|
|
375
|
-
textEntryMathWithImagePage.steps.verifyCorrectIncorrectIconNotExist(1);
|
|
376
|
-
textEntryMathWithImagePage.steps.verifyCorrectIncorrectIconNotExist(2);
|
|
377
|
-
textEntryMathWithImagePage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, and \'Your answer is incorrect\' label should be displayed', () => {
|
|
381
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
|
382
|
-
textEntryMathWithImagePage.steps.enterTextInResponsePreviewInputField(0, '13');
|
|
383
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
384
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
|
385
|
-
textEntryMathWithImagePage.steps.enterTextInResponsePreviewInputField(1, '14');
|
|
386
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
387
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
|
|
388
|
-
textEntryMathWithImagePage.steps.enterTextInResponsePreviewInputField(2, '15');
|
|
389
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
390
|
-
if (view === 'Grading view') {
|
|
391
|
-
studentViewPage.steps.submitResponse();
|
|
392
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
393
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
394
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
395
|
-
}
|
|
396
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
397
|
-
textEntryMathWithImagePage.steps.verifyPreviewScore(0, 20);
|
|
398
|
-
textEntryMathWithImagePage.steps.switchToGradingView();
|
|
399
|
-
}
|
|
400
|
-
textEntryMathWithImagePage.steps.verifyIncorrectResponseIcon(0);
|
|
401
|
-
textEntryMathWithImagePage.steps.verifyIncorrectResponseIcon(1);
|
|
402
|
-
textEntryMathWithImagePage.steps.verifyIncorrectResponseIcon(2);
|
|
403
|
-
textEntryMathWithImagePage.steps.verifyResponseFieldNumerationPreviewTab();
|
|
404
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
405
|
-
{
|
|
406
|
-
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
407
|
-
points: ['(20 points)']
|
|
408
|
-
},
|
|
409
|
-
{
|
|
410
|
-
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
411
|
-
points: ['(12 points)']
|
|
412
|
-
},
|
|
413
|
-
]);
|
|
414
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
|
415
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
|
416
|
-
textEntryMathWithImagePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
417
|
-
});
|
|
418
|
-
|
|
419
|
-
it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icons should be displayed besides the correct responses, incorrect icons should be displayed beside the incorrect responses, and \'Your answer is incorrect\' label should be displayed', () => {
|
|
420
|
-
if (view === 'Grading view') {
|
|
421
|
-
studentViewPage.steps.clearResponses();
|
|
422
|
-
}
|
|
423
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
|
424
|
-
textEntryMathWithImagePage.steps.enterTextInResponsePreviewInputField(0, '12');
|
|
425
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
426
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
|
427
|
-
equationEditorFlyout.steps.enterQuadraticEquation();
|
|
428
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
|
|
429
|
-
textEntryMathWithImagePage.steps.enterTextInResponsePreviewInputField(2, '13');
|
|
430
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
431
|
-
if (view === 'Grading view') {
|
|
432
|
-
studentViewPage.steps.submitResponse();
|
|
433
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
|
434
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
435
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
436
|
-
}
|
|
437
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
438
|
-
textEntryMathWithImagePage.steps.verifyPreviewScore(0, 20);
|
|
439
|
-
textEntryMathWithImagePage.steps.switchToGradingView();
|
|
440
|
-
}
|
|
441
|
-
textEntryMathWithImagePage.steps.verifyCorrectResponseIcon(0);
|
|
442
|
-
textEntryMathWithImagePage.steps.verifyCorrectResponseIcon(1);
|
|
443
|
-
textEntryMathWithImagePage.steps.verifyIncorrectResponseIcon(2);
|
|
444
|
-
textEntryMathWithImagePage.steps.verifyResponseFieldNumerationPreviewTab();
|
|
445
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
446
|
-
{
|
|
447
|
-
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
448
|
-
points: ['(20 points)']
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
452
|
-
points: ['(12 points)']
|
|
453
|
-
},
|
|
454
|
-
]);
|
|
455
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
|
456
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
|
457
|
-
textEntryMathWithImagePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
458
|
-
});
|
|
459
|
-
|
|
460
|
-
it('When the user attempts the question partially correct with an incomplete response, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icons should be displayed besides the correct responses and unattempted correct options, no icon should be displayed beside unattempted response, \'Your answer is incorrect\' should be displayed', () => {
|
|
461
|
-
if (view === 'Grading view') {
|
|
462
|
-
studentViewPage.steps.clearResponses();
|
|
463
|
-
}
|
|
464
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
|
465
|
-
textEntryMathWithImagePage.steps.enterTextInResponsePreviewInputField(0, '12');
|
|
466
|
-
equationEditorFlyout.steps.clickOnOkButton();
|
|
467
|
-
textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
|
468
|
-
equationEditorFlyout.steps.enterQuadraticEquation();
|
|
469
|
-
if (view === 'Grading view') {
|
|
470
|
-
studentViewPage.steps.submitResponse();
|
|
471
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
|
472
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
473
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
474
|
-
}
|
|
475
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
476
|
-
textEntryMathWithImagePage.steps.verifyPreviewScore(0, 20);
|
|
477
|
-
textEntryMathWithImagePage.steps.switchToGradingView();
|
|
478
|
-
}
|
|
479
|
-
textEntryMathWithImagePage.steps.verifyCorrectResponseIcon(0);
|
|
480
|
-
textEntryMathWithImagePage.steps.verifyCorrectResponseIcon(1);
|
|
481
|
-
textEntryMathWithImagePage.steps.verifyIncorrectResponseIcon(2);
|
|
482
|
-
textEntryMathWithImagePage.steps.verifyResponseFieldNumerationPreviewTab();
|
|
483
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
484
|
-
{
|
|
485
|
-
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
486
|
-
points: ['(20 points)']
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
490
|
-
points: ['(12 points)']
|
|
491
|
-
},
|
|
492
|
-
]);
|
|
493
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
|
494
|
-
textEntryMathWithImagePage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
|
495
|
-
textEntryMathWithImagePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
496
|
-
});
|
|
497
|
-
});
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
|
|
501
266
|
views.forEach((view) => {
|
|
502
267
|
describe(`Text entry math with image: manually scored - ${view}`, { tags: 'smoke' }, () => {
|
|
503
268
|
abortEarlySetup();
|
|
@@ -16,6 +16,7 @@ describe('Grading view : ThinkSphere Question - Plan Section', () => {
|
|
|
16
16
|
browseItemsPage.steps.clickOnActionMenuItem(0);
|
|
17
17
|
thinkSpherePage.steps.clickOnStrategiesPreviewListLI();
|
|
18
18
|
thinkSpherePage.steps.stepsBeforeGradingView();
|
|
19
|
+
thinkSpherePage.steps.clickOnPlanTab();
|
|
19
20
|
});
|
|
20
21
|
|
|
21
22
|
after(() => {
|
|
@@ -5,8 +5,6 @@ import { customSettingsSeparatorComponent } from "./components/customSettingsSep
|
|
|
5
5
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
6
6
|
import { createItemPage } from "./createItemPage";
|
|
7
7
|
|
|
8
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
9
|
-
|
|
10
8
|
const css = Cypress.env('css');
|
|
11
9
|
const borderStyles = ["Dashed", "Dotted", "Solid", "None"]
|
|
12
10
|
const modifiedColor = 'rgb(121, 60, 60)'
|
|
@@ -130,9 +128,6 @@ const selectors = {
|
|
|
130
128
|
tickIcon: () => cy.get('.tick-icon-wrapper'),
|
|
131
129
|
correctAnswersContainerResponse: () => cy.get('.cloze-math-correct-answer-wrapper .question-text-wrapper'),
|
|
132
130
|
correctAnswersContainerResponseNumeration: () => cy.get('.cloze-math-correct-answer-wrapper .answer-numeration-number-box'),
|
|
133
|
-
correctAnswersSectionResponse: () => cy.get('.correct-answer-section-wrapper .question-text-wrapper'),
|
|
134
|
-
correctAnswersSectionResponseNumeration: () => cy.get('.correct-answer-section-wrapper .answer-numeration-number-box'),
|
|
135
|
-
correctAnswerSectionPointsLabel: () => cy.get('[class*="CorrectAnswerSectionstyle__CorrectAnswerLabelWrapper"] p'),
|
|
136
131
|
correctAnswersLabel: () => cy.get('.cloze-with-text-correct-answer-label'),
|
|
137
132
|
correctIncorrectStatusMessageText: () => cy.get('[class*="AnswerLabelText"]'),
|
|
138
133
|
correctAnswersContainer: () => cy.get('[class*="__AnswerLabelWrapper"]'),
|
|
@@ -780,40 +775,13 @@ const steps = {
|
|
|
780
775
|
* @param {string[]} correctAnswerArray An array of arrays, each containing the expected answer options for a specific correct answer section.
|
|
781
776
|
*/
|
|
782
777
|
verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount: (correctAnswerArray) => {
|
|
783
|
-
utilities.verifyElementCount(
|
|
784
|
-
alternativeAnswerCheck ? textEntryMathPage.correctAnswersSectionResponseNumeration() : textEntryMathPage.correctAnswersContainerResponseNumeration(),
|
|
785
|
-
correctAnswerArray.length
|
|
786
|
-
);
|
|
778
|
+
utilities.verifyElementCount(textEntryMathPage.correctAnswersContainerResponse(), correctAnswerArray.length);
|
|
787
779
|
correctAnswerArray.forEach((correctAnswer, index) => {
|
|
788
|
-
utilities.verifyTextContent(utilities.getNthElement(
|
|
789
|
-
|
|
790
|
-
index
|
|
791
|
-
), index + 1);
|
|
792
|
-
utilities.verifyTextContent(utilities.getNthElement(
|
|
793
|
-
alternativeAnswerCheck ? textEntryMathPage.correctAnswersSectionResponse(): textEntryMathPage.correctAnswersContainerResponse(),
|
|
794
|
-
index
|
|
795
|
-
), correctAnswer);
|
|
780
|
+
utilities.verifyTextContent(utilities.getNthElement(textEntryMathPage.correctAnswersContainerResponseNumeration(), index), index + 1);
|
|
781
|
+
utilities.verifyTextContent(utilities.getNthElement(textEntryMathPage.correctAnswersContainerResponse(), index), correctAnswer);
|
|
796
782
|
});
|
|
797
783
|
},
|
|
798
784
|
|
|
799
|
-
verifyCorrectAnswerResponsesInCorrectAnswerSection: (correctAnswersArray) => {
|
|
800
|
-
let responseIndex = 0;
|
|
801
|
-
let pointsIndex = 0;
|
|
802
|
-
correctAnswersArray.forEach(({
|
|
803
|
-
correctAnswers, points
|
|
804
|
-
}) => {
|
|
805
|
-
correctAnswers.forEach((answer, index) => {
|
|
806
|
-
utilities.verifyTextContent(utilities.getNthElement(textEntryMathPage.correctAnswersSectionResponseNumeration(), responseIndex), index + 1);
|
|
807
|
-
utilities.verifyTextContent(utilities.getNthElement(textEntryMathPage.correctAnswersSectionResponse(), responseIndex), answer);
|
|
808
|
-
responseIndex += 1;
|
|
809
|
-
})
|
|
810
|
-
points.forEach((pointsText) => {
|
|
811
|
-
utilities.verifyTextContent(utilities.getNthElement(textEntryMathPage.correctAnswerSectionPointsLabel(), pointsIndex), pointsText);
|
|
812
|
-
pointsIndex += 1;
|
|
813
|
-
})
|
|
814
|
-
})
|
|
815
|
-
},
|
|
816
|
-
|
|
817
785
|
/**
|
|
818
786
|
*@description Verifies the correctness of answer responses in the correct answer section, including the count.
|
|
819
787
|
* @param {string} correctAnswerArray the expected answer options aria label for a specific correct answer section.
|