itemengine-cypress-automation 1.0.381-regressionFixes10June-8dc1710.0 → 1.0.382-FixesPR3-b746986.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/ListOrderingDropdown/editTabBasicSection.js +2 -0
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +1 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +6 -6
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +213 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +249 -0
- package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +266 -0
- package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/allOrNothingForAllViews.smoke.js +268 -0
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +5 -5
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +3 -3
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsScoringBasic.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/TextEntryMath/Scoring/blankResponseScoring.js +2 -2
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +263 -0
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +217 -0
- package/cypress/e2e/ILC/TextEntryMath/equationEditor.smoke.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.smoke.js +3 -3
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +263 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +0 -1
- package/cypress/e2e/ILC/TextEntryMathWithImage/styleAndLayoutCustomization.js +1 -1
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +1 -0
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +4 -4
- package/cypress/pages/listOrderingPage.js +6 -1
- package/cypress/pages/textEntryMathPage.js +3 -7
- package/package.json +1 -1
@@ -22,7 +22,7 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
|
|
22
22
|
|
23
23
|
it('When the user has not set any answer in the \'Specify correct answer\' section and switches to the \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
|
24
24
|
textEntryMathPage.steps.switchToGradingView();
|
25
|
-
textEntryMathPage.steps.
|
25
|
+
textEntryMathPage.steps.checkManuallyScoredScoringLabel();
|
26
26
|
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
27
27
|
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
28
28
|
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
@@ -36,7 +36,7 @@ describe('Create item page - Text entry math: Partial equal weights for blank re
|
|
36
36
|
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
37
37
|
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
38
38
|
textEntryMathPage.steps.switchToGradingView();
|
39
|
-
textEntryMathPage.steps.
|
39
|
+
textEntryMathPage.steps.checkManuallyScoredScoringLabel();
|
40
40
|
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
41
41
|
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
42
42
|
textEntryMathPage.steps.verifyCorrectResponseIcon(2);
|
@@ -341,6 +341,269 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
341
341
|
});
|
342
342
|
});
|
343
343
|
|
344
|
+
views.forEach((view) => {
|
345
|
+
describe(`Text entry math: Manually scored - ${view}`, { tags: 'smoke' }, () => {
|
346
|
+
abortEarlySetup();
|
347
|
+
before(() => {
|
348
|
+
switch (view) {
|
349
|
+
case 'Question preview':
|
350
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
351
|
+
cy.barsPreLoaderWait();
|
352
|
+
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
353
|
+
textEntryMathPage.steps.addResponseArea();
|
354
|
+
textEntryMathPage.steps.addResponseArea();
|
355
|
+
textEntryMathPage.steps.addResponseArea();
|
356
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
357
|
+
textEntryMathPage.steps.selectModalVisibilityTypeButton();
|
358
|
+
textEntryMathPage.steps.expandScoringTypeDropdown();
|
359
|
+
textEntryMathPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
360
|
+
textEntryMathPage.steps.allotPoints(20);
|
361
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
362
|
+
break;
|
363
|
+
case 'Item preview':
|
364
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
365
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
366
|
+
break;
|
367
|
+
case 'Grading view':
|
368
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
369
|
+
break;
|
370
|
+
}
|
371
|
+
});
|
372
|
+
|
373
|
+
beforeEach(() => {
|
374
|
+
switch (view) {
|
375
|
+
case 'Question preview':
|
376
|
+
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
377
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
378
|
+
break;
|
379
|
+
case 'Item preview':
|
380
|
+
cy.get('body').then($body => {
|
381
|
+
if ($body.find('.preview-mode-wrapper input[aria-label="Student View"]').length) {
|
382
|
+
itemPreviewPage.steps.switchToStudentView();
|
383
|
+
}
|
384
|
+
});
|
385
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
386
|
+
break;
|
387
|
+
case 'Grading view':
|
388
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
389
|
+
break;
|
390
|
+
}
|
391
|
+
});
|
392
|
+
|
393
|
+
if (view === 'Question preview') {
|
394
|
+
after(() => {
|
395
|
+
textEntryMathPage.steps.clickOnSaveQuestionButton();
|
396
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
397
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
398
|
+
});
|
399
|
+
};
|
400
|
+
|
401
|
+
it('Question instructions should be visible', () => {
|
402
|
+
textEntryMathPage.steps.verifyQuestionInstructionsTextPreviewTab('Enter the correct answer in the response field');
|
403
|
+
textEntryMathPage.steps.verifyVisibityOfQuestionInstructionsText();
|
404
|
+
});
|
405
|
+
|
406
|
+
it('User should be able to attempt the question in student view, and correct/incorrect icons, "Your answer is correct/incorrect" label, and correct answer section should not be displayed in grading view', () => {
|
407
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
408
|
+
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Correct1');
|
409
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
410
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
411
|
+
equationEditorFlyout.steps.enterQuadraticEquation();
|
412
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
|
413
|
+
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(2, '6*3.14');
|
414
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
415
|
+
if (view === 'Grading view') {
|
416
|
+
studentViewPage.steps.submitResponse();
|
417
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
418
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
419
|
+
gradingViewPage.steps.verifyGradingViewScore('', 20);
|
420
|
+
};
|
421
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
422
|
+
textEntryMathPage.steps.checkManuallyScoredScoringLabel();
|
423
|
+
};
|
424
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
425
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
426
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
427
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
428
|
+
textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
|
429
|
+
});
|
430
|
+
});
|
431
|
+
});
|
432
|
+
|
433
|
+
views.forEach((view) => {
|
434
|
+
describe(`Text entry math: Non scored - ${view}`, { tags: 'smoke' }, () => {
|
435
|
+
abortEarlySetup();
|
436
|
+
before(() => {
|
437
|
+
switch (view) {
|
438
|
+
case 'Question preview':
|
439
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
440
|
+
cy.barsPreLoaderWait();
|
441
|
+
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
442
|
+
textEntryMathPage.steps.addResponseArea();
|
443
|
+
textEntryMathPage.steps.addResponseArea();
|
444
|
+
textEntryMathPage.steps.addResponseArea();
|
445
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
|
446
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
|
447
|
+
equationEditorFlyout.steps.clearAll();
|
448
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
449
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
450
|
+
textEntryMathPage.steps.expandAndFocusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
451
|
+
equationEditorFlyout.steps.enterQuadraticEquation();
|
452
|
+
textEntryMathPage.steps.expandAndFocusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
|
453
|
+
equationEditorFlyout.steps.enterEquationUsingPiSymbol();
|
454
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
455
|
+
textEntryMathPage.steps.selectModalVisibilityTypeButton();
|
456
|
+
textEntryMathPage.steps.expandScoringTypeDropdown();
|
457
|
+
textEntryMathPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
458
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
459
|
+
break;
|
460
|
+
case 'Item preview':
|
461
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
462
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
463
|
+
break;
|
464
|
+
case 'Grading view':
|
465
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
466
|
+
break;
|
467
|
+
}
|
468
|
+
});
|
469
|
+
|
470
|
+
beforeEach(() => {
|
471
|
+
switch (view) {
|
472
|
+
case 'Question preview':
|
473
|
+
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
474
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
475
|
+
break;
|
476
|
+
case 'Item preview':
|
477
|
+
cy.get('body').then($body => {
|
478
|
+
if ($body.find('.preview-mode-wrapper input[aria-label="Student View"]').length) {
|
479
|
+
itemPreviewPage.steps.switchToStudentView();
|
480
|
+
}
|
481
|
+
});
|
482
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
483
|
+
break;
|
484
|
+
case 'Grading view':
|
485
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
486
|
+
break;
|
487
|
+
}
|
488
|
+
});
|
489
|
+
|
490
|
+
if (view === 'Question preview') {
|
491
|
+
after(() => {
|
492
|
+
textEntryMathPage.steps.clickOnSaveQuestionButton();
|
493
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
494
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
495
|
+
});
|
496
|
+
}
|
497
|
+
|
498
|
+
it('When the user selects "Grading" view without attempting the question, no correct/incorrect icons should be displayed, correct answers section should be displayed, and no correct/incorrect label should be shown', () => {
|
499
|
+
if (view === 'Grading view') {
|
500
|
+
studentViewPage.steps.submitResponse();
|
501
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
502
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
503
|
+
}
|
504
|
+
if (view === 'Item preview' || view === 'Question preview') {
|
505
|
+
textEntryMathPage.steps.switchToGradingView();
|
506
|
+
textEntryMathPage.steps.checkNonScoredScoringLabel();
|
507
|
+
}
|
508
|
+
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
509
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct1', '2x2y2+4xy+4', '6×π']);
|
510
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
511
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
512
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
513
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
514
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
515
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
516
|
+
});
|
517
|
+
|
518
|
+
it('When the user attempts the question incorrectly, no correct/incorrect icons should be displayed, correct answers section should be displayed, and no correct/incorrect label should be shown', () => {
|
519
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
520
|
+
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Incorrect answer 1');
|
521
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
522
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
523
|
+
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(1, 'Incorrect answer 2');
|
524
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
525
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
|
526
|
+
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(2, 'Incorrect answer 3');
|
527
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
528
|
+
if (view === 'Grading view') {
|
529
|
+
studentViewPage.steps.submitResponse();
|
530
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
531
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
532
|
+
}
|
533
|
+
if (view === 'Item preview' || view === 'Question preview') {
|
534
|
+
textEntryMathPage.steps.switchToGradingView();
|
535
|
+
textEntryMathPage.steps.checkNonScoredScoringLabel();
|
536
|
+
}
|
537
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
538
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
539
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
|
540
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
541
|
+
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
542
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct1', '2x2y2+4xy+4', '6×π']);
|
543
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
544
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
545
|
+
});
|
546
|
+
|
547
|
+
it('When the user attempts the question partially correct, no correct/incorrect icons should be displayed, correct answers section should be displayed, and no correct/incorrect label should be shown', () => {
|
548
|
+
if (view === 'Grading view') {
|
549
|
+
studentViewPage.steps.clearResponses();
|
550
|
+
}
|
551
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
552
|
+
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Correct1');
|
553
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
554
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
555
|
+
equationEditorFlyout.steps.enterQuadraticEquation();
|
556
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
|
557
|
+
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(2, '6*3.14');
|
558
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
559
|
+
if (view === 'Grading view') {
|
560
|
+
studentViewPage.steps.submitResponse();
|
561
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
562
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
563
|
+
}
|
564
|
+
if (view === 'Item preview' || view === 'Question preview') {
|
565
|
+
textEntryMathPage.steps.switchToGradingView();
|
566
|
+
textEntryMathPage.steps.checkNonScoredScoringLabel();
|
567
|
+
}
|
568
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel("incorrect");
|
569
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
570
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
571
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
572
|
+
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
573
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct1', '2x2y2+4xy+4', '6×π']);
|
574
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
575
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
576
|
+
});
|
577
|
+
|
578
|
+
it('When the user attempts the question correctly, no correct/incorrect icons should be displayed, correct answers section should not be displayed, and no correct/incorrect label should be shown', () => {
|
579
|
+
if (view === 'Grading view') {
|
580
|
+
studentViewPage.steps.clearResponses();
|
581
|
+
}
|
582
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
583
|
+
textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Correct1');
|
584
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
585
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
|
586
|
+
equationEditorFlyout.steps.enterQuadraticEquation();
|
587
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
|
588
|
+
equationEditorFlyout.steps.enterEquationUsingPiSymbol();
|
589
|
+
if (view === 'Grading view') {
|
590
|
+
studentViewPage.steps.submitResponse();
|
591
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
592
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
593
|
+
}
|
594
|
+
if (view === 'Item preview' || view === 'Question preview') {
|
595
|
+
textEntryMathPage.steps.switchToGradingView();
|
596
|
+
textEntryMathPage.steps.checkNonScoredScoringLabel();
|
597
|
+
}
|
598
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel("correct");
|
599
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
600
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
601
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(2);
|
602
|
+
textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
|
603
|
+
});
|
604
|
+
});
|
605
|
+
});
|
606
|
+
|
344
607
|
if (!grepTags || !grepTags.includes('smoke')) {
|
345
608
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
346
609
|
abortEarlySetup();
|
@@ -265,4 +265,221 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
|
|
265
265
|
});
|
266
266
|
});
|
267
267
|
});
|
268
|
+
|
269
|
+
views.forEach((view) => {
|
270
|
+
describe(`Text entry math: Non scored - ${view}`, { tags: 'smoke' }, () => {
|
271
|
+
abortEarlySetup();
|
272
|
+
before(() => {
|
273
|
+
switch (view) {
|
274
|
+
case 'Question preview':
|
275
|
+
textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
|
276
|
+
cy.barsPreLoaderWait();
|
277
|
+
textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
|
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('Correct1');
|
285
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
286
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
287
|
+
textEntryMathPage.steps.focusInLayoutInputField(0);
|
288
|
+
textEntryMathPage.steps.addResponseContainer();
|
289
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
290
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(0);
|
291
|
+
textEntryMathPage.steps.expandAndFocusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
|
292
|
+
equationEditorFlyout.steps.enterQuadraticEquation();
|
293
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
294
|
+
textEntryMathPage.steps.focusInLayoutInputField(1);
|
295
|
+
textEntryMathPage.steps.addResponseContainer();
|
296
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'intermediate', symbolName: ['x', 'square', 'y', 'square'] }]);
|
297
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['add'] }]);
|
298
|
+
textEntryMathPage.steps.addResponseContainer();
|
299
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'intermediate', symbolName: ['x', 'y'] }]);
|
300
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['add'] }]);
|
301
|
+
textEntryMathPage.steps.addResponseContainer();
|
302
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
303
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(1);
|
304
|
+
textEntryMathPage.steps.expandAndFocusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
|
305
|
+
equationEditorFlyout.steps.enterEquationUsingPiSymbol();
|
306
|
+
textEntryMathPage.steps.expandLayoutAccordion();
|
307
|
+
textEntryMathPage.steps.focusInLayoutInputField(2);
|
308
|
+
textEntryMathPage.steps.addResponseContainer();
|
309
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['multiply'] }, { categoryName: 'intermediate', symbolName: ['pi'] }]);
|
310
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
311
|
+
textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(2);
|
312
|
+
textEntryMathPage.steps.expandAdditionalSettings();
|
313
|
+
textEntryMathPage.steps.selectModalVisibilityTypeButton();
|
314
|
+
textEntryMathPage.steps.expandScoringTypeDropdown();
|
315
|
+
textEntryMathPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
316
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
317
|
+
break;
|
318
|
+
case 'Item preview':
|
319
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
320
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
321
|
+
break;
|
322
|
+
case 'Grading view':
|
323
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
324
|
+
break;
|
325
|
+
}
|
326
|
+
});
|
327
|
+
|
328
|
+
beforeEach(() => {
|
329
|
+
switch (view) {
|
330
|
+
case 'Question preview':
|
331
|
+
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
332
|
+
textEntryMathPage.steps.resetQuestionPreview();
|
333
|
+
break;
|
334
|
+
case 'Item preview':
|
335
|
+
cy.get('body').then($body => {
|
336
|
+
if ($body.find('.preview-mode-wrapper input[aria-label="Student View"]').length) {
|
337
|
+
itemPreviewPage.steps.switchToStudentView();
|
338
|
+
}
|
339
|
+
});
|
340
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
341
|
+
break;
|
342
|
+
case 'Grading view':
|
343
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
344
|
+
break;
|
345
|
+
}
|
346
|
+
});
|
347
|
+
|
348
|
+
if (view === 'Question preview') {
|
349
|
+
after(() => {
|
350
|
+
textEntryMathPage.steps.clickOnSaveQuestionButton();
|
351
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
352
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
353
|
+
});
|
354
|
+
}
|
355
|
+
|
356
|
+
it('When the user selects "Grading" view without attempting the question, no correct/incorrect icons should be displayed, correct answers section should be displayed, and no correct/incorrect label should be shown', () => {
|
357
|
+
if (view === 'Grading view') {
|
358
|
+
studentViewPage.steps.submitResponse();
|
359
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
360
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
361
|
+
}
|
362
|
+
if (view === 'Item preview' || view === 'Question preview') {
|
363
|
+
textEntryMathPage.steps.switchToGradingView();
|
364
|
+
textEntryMathPage.steps.checkNonScoredScoringLabel();
|
365
|
+
}
|
366
|
+
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
367
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct1', '2x2y2+4xy+4', '6×π']);
|
368
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
369
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
370
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
371
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
372
|
+
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
373
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
374
|
+
});
|
375
|
+
|
376
|
+
it('When the user attempts the question incorrectly, no correct/incorrect icons should be displayed, correct answers section should be displayed, and no correct/incorrect label should be shown', () => {
|
377
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
378
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 1');
|
379
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
380
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
381
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 2');
|
382
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
383
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
384
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 3');
|
385
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
386
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(3);
|
387
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 4');
|
388
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
389
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(4);
|
390
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 5');
|
391
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
392
|
+
if (view === 'Grading view') {
|
393
|
+
studentViewPage.steps.submitResponse();
|
394
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
395
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
396
|
+
}
|
397
|
+
if (view === 'Item preview' || view === 'Question preview') {
|
398
|
+
textEntryMathPage.steps.switchToGradingView();
|
399
|
+
textEntryMathPage.steps.checkNonScoredScoringLabel();
|
400
|
+
}
|
401
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
402
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
|
403
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
|
404
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
405
|
+
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
406
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct1', '2x2y2+4xy+4', '6×π']);
|
407
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
408
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
409
|
+
});
|
410
|
+
|
411
|
+
it('When the user attempts the question partially correct, no correct/incorrect icons should be displayed, correct answers section should be displayed, and no correct/incorrect label should be shown', () => {
|
412
|
+
if (view === 'Grading view') {
|
413
|
+
studentViewPage.steps.clearResponses();
|
414
|
+
}
|
415
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
416
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
417
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
418
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
419
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('2');
|
420
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
421
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
422
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('4');
|
423
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
424
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(3);
|
425
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('4');
|
426
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
427
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(4);
|
428
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('1');
|
429
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
430
|
+
if (view === 'Grading view') {
|
431
|
+
studentViewPage.steps.submitResponse();
|
432
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
433
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
434
|
+
}
|
435
|
+
if (view === 'Item preview' || view === 'Question preview') {
|
436
|
+
textEntryMathPage.steps.switchToGradingView();
|
437
|
+
textEntryMathPage.steps.checkNonScoredScoringLabel();
|
438
|
+
}
|
439
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel("incorrect");
|
440
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
441
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
442
|
+
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
443
|
+
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
444
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct1', '2x2y2+4xy+4', '6×π']);
|
445
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
|
446
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
|
447
|
+
});
|
448
|
+
|
449
|
+
it('When the user attempts the question correctly, no correct/incorrect icons should be displayed, correct answers section should not be displayed, and no correct/incorrect label should be shown', () => {
|
450
|
+
if (view === 'Grading view') {
|
451
|
+
studentViewPage.steps.clearResponses();
|
452
|
+
}
|
453
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(0);
|
454
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
|
455
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
456
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(1);
|
457
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('2');
|
458
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
459
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(2);
|
460
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('4');
|
461
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
462
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(3);
|
463
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('4');
|
464
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
465
|
+
textEntryMathPage.steps.focusInResponseAnswerInputFieldFormulaTemplatePreviewTab(4);
|
466
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('6');
|
467
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
468
|
+
if (view === 'Grading view') {
|
469
|
+
studentViewPage.steps.submitResponse();
|
470
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
471
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
472
|
+
}
|
473
|
+
if (view === 'Item preview' || view === 'Question preview') {
|
474
|
+
textEntryMathPage.steps.switchToGradingView();
|
475
|
+
textEntryMathPage.steps.checkNonScoredScoringLabel();
|
476
|
+
}
|
477
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel("correct");
|
478
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
479
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
480
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(2);
|
481
|
+
textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
|
482
|
+
});
|
483
|
+
});
|
484
|
+
});
|
268
485
|
});
|
@@ -98,7 +98,7 @@ describe('Create question page - Text Entry Math: Equation Editor functionality'
|
|
98
98
|
cy.log('Adding an equation to preview input field')
|
99
99
|
equationEditorFlyout.steps.enterEquation([{ categoryName: 'intermediate', symbolName: ['x'] }, { categoryName: 'numPad', symbolName: ['add', 'five', 'equalTo', 'one'] }]);
|
100
100
|
equationEditorFlyout.steps.clickOnOkButton();
|
101
|
-
textEntryMathPage.steps.verifyResponseFieldEquationTextNew(0, 'x+5=1');
|
101
|
+
textEntryMathPage.steps.verifyResponseFieldEquationTextNew(0, 'x+5=1');
|
102
102
|
});
|
103
103
|
|
104
104
|
textEntryMathPage.tests.editEquationInPreviewTab('text entry math');
|
@@ -1021,14 +1021,14 @@ describe('Create item page - Text entry math: Equivalent structure evaluation me
|
|
1021
1021
|
});
|
1022
1022
|
|
1023
1023
|
//Syntax: Expression
|
1024
|
-
it('When user has selected \'Expression\' from the syntax dropdown and user enters input using integer in preview tab response fields they should be treated as
|
1024
|
+
it('When user has selected \'Expression\' from the syntax dropdown and user enters input using integer in preview tab response fields they should be treated as correct', () => {
|
1025
1025
|
textEntryMathPage.steps.resetQuestionPreview();
|
1026
1026
|
textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
1027
1027
|
equationEditorFlyout.steps.enterTextInPreviewInputField('90');
|
1028
1028
|
equationEditorFlyout.steps.clickOnOkButton();
|
1029
1029
|
textEntryMathPage.steps.switchToGradingView();
|
1030
|
-
textEntryMathPage.steps.
|
1031
|
-
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('
|
1030
|
+
textEntryMathPage.steps.verifyCorrectResponseIcon(0);
|
1031
|
+
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
1032
1032
|
});
|
1033
1033
|
|
1034
1034
|
it('When user has selected \'Expression\' from the syntax dropdown and user enters input using single variable with coefficient in preview tab response fields they should be treated as incorrect', () => {
|