itemengine-cypress-automation 1.0.144 → 1.0.145

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +2 -2
  2. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +1 -1
  3. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingPenaltyScoring.js +0 -1
  4. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -1
  5. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +0 -1
  6. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
  7. package/cypress/e2e/ILC/Graphing/Scoring/manuallyAndNonScoredScoring.js +0 -2
  8. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -12
  9. package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
  10. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +0 -2
  11. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +1 -0
  12. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
  13. package/cypress/e2e/ILC/Graphing/specifyCorrectAnswerSection.js +0 -1
  14. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +0 -1
  15. package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +8 -8
  16. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  17. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +256 -0
  18. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +252 -0
  19. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +335 -0
  20. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingPenaltyScoring.js +60 -0
  21. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +157 -0
  22. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +2 -2
  23. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +497 -0
  24. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
  25. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +200 -0
  26. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +280 -0
  27. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +281 -0
  28. package/cypress/e2e/ILC/Matching/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
  29. package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +146 -0
  30. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingPenaltyScoring.js +55 -0
  31. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsBasic.js +116 -0
  32. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +307 -0
  33. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +163 -0
  34. package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -3
  35. package/cypress/e2e/ILC/MultipleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  36. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -0
  37. package/cypress/e2e/ILC/SingleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  38. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -5
  39. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +11 -10
  40. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +6 -9
  41. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +12 -5
  42. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +1 -2
  43. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -0
  44. package/cypress/pages/components/desmosToolComponent.js +1 -1
  45. package/cypress/pages/components/gridQuestionCommonComponent.js +28 -4
  46. package/cypress/pages/components/index.js +1 -0
  47. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +132 -0
  48. package/cypress/pages/dragAndDropIntoCategoriesPage.js +3 -113
  49. package/cypress/pages/geoGebraToolsPage.js +1 -1
  50. package/cypress/pages/graphingPage.js +6 -0
  51. package/cypress/pages/gridFillPage.js +67 -12
  52. package/cypress/pages/index.js +2 -1
  53. package/cypress/pages/matchingPage.js +433 -0
  54. package/cypress/pages/multipleSelectionGridPage.js +11 -3
  55. package/cypress/pages/singleSelectionGridPage.js +2 -1
  56. package/cypress/pages/textEntryMathPage.js +5 -0
  57. package/cypress/pages/textEntryMathWithImagePage.js +6 -1
  58. package/package.json +1 -1
@@ -20,11 +20,11 @@ describe('Preview tab contents for all views', () => {
20
20
  contentBlocksPage.steps.navigateToCreateResource('content blocks');
21
21
  contentBlocksPage.steps.enterTextInTitleInputField('This is title text');
22
22
  contentBlocksPage.steps.enterTextInSubTitleInputField('This is subtitle text');
23
- contentBlocksPage.steps.enterTextInTextBlockInputField('This is text block text');
23
+ contentBlocksPage.steps.enterTextInTextBlockInputField(0, 'This is text block text');
24
24
  contentBlocksPage.steps.addGroupDivider();
25
25
  utilities.verifyElementVisibilityState(contentBlocksPage.groupDivider(), 'visible');
26
26
  contentBlocksPage.steps.addSubTitle();
27
- contentBlocksPage.steps.enterTextInBodySubTitleInputField('This is body subtitle text');
27
+ contentBlocksPage.steps.enterTextInBodySubTitleInputField(0, 'This is body subtitle text');
28
28
  contentBlocksPage.steps.switchToPreviewTab();
29
29
  break;
30
30
  case 'Item view':
@@ -107,7 +107,7 @@ describe('Create item page - Fill in the gaps - drag and drop: All or nothing ',
107
107
  fillInTheGapsDragAndDropPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
108
108
  };
109
109
  fillInTheGapsDragAndDropPage.steps.verifyDropzoneNumeration();
110
- utilities.verifyInnerText(fillInTheGapsDragAndDropPage.correctAnswersLabel(), 'Correct answers:');
110
+ utilities.verifyInnerText(fillInTheGapsDragAndDropPage.correctAnswersLabel(), 'Correct answers');
111
111
  fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
112
112
  });
113
113
 
@@ -14,7 +14,6 @@ describe('Create item page - Graphing: Penalty scoring and Round negative score
14
14
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
15
15
  graphingPage.steps.selectToolOptions(['Circle', 'Polygon']);
16
16
  graphingPage.steps.checkPatternBackground();
17
- graphingPage.steps.checkSnapToGridCheckbox();
18
17
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
19
18
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
20
19
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -17,7 +17,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
17
17
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
18
18
  graphingPage.steps.selectToolOptions(unselectedToolOption);
19
19
  graphingPage.steps.checkPatternBackground();
20
- graphingPage.steps.checkSnapToGridCheckbox();
21
20
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
22
21
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
23
22
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -17,7 +17,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
17
17
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
18
18
  graphingPage.steps.selectToolOptions(unselectedToolOption);
19
19
  graphingPage.steps.checkPatternBackground();
20
- graphingPage.steps.checkSnapToGridCheckbox();
21
20
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
22
21
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
23
22
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -17,7 +17,6 @@ describe('Create Item page - Graphing: All or nothing with alternative answer',
17
17
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
18
18
  graphingPage.steps.selectToolOptions(unselectedToolOption);
19
19
  graphingPage.steps.checkPatternBackground();
20
- graphingPage.steps.checkSnapToGridCheckbox();
21
20
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
22
21
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
23
22
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -15,7 +15,6 @@ describe('Create Item page - Graphing: Manually and non scored', () => {
15
15
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
16
16
  graphingPage.steps.selectToolOptions(['Circle', 'Polygon']);
17
17
  graphingPage.steps.checkPatternBackground();
18
- graphingPage.steps.checkSnapToGridCheckbox();
19
18
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
20
19
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
21
20
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -52,7 +51,6 @@ describe('Create Item page - Graphing: Manually and non scored', () => {
52
51
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
53
52
  graphingPage.steps.selectToolOptions(['Circle', 'Polygon']);
54
53
  graphingPage.steps.checkPatternBackground();
55
- graphingPage.steps.checkSnapToGridCheckbox();
56
54
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
57
55
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
58
56
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -22,7 +22,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
22
22
  cy.barsPreLoaderWait();
23
23
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
24
24
  graphingPage.steps.selectToolOptions(unselectedToolOption);
25
- graphingPage.steps.checkSnapToGridCheckbox();
26
25
  graphingPage.steps.checkPatternBackground();
27
26
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
28
27
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -67,7 +66,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
67
66
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
68
67
  graphingPage.steps.selectToolOptions(unselectedToolOption);
69
68
  graphingPage.steps.checkPatternBackground();
70
- graphingPage.steps.checkSnapToGridCheckbox();
71
69
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
72
70
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
73
71
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -307,7 +305,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
307
305
  cy.barsPreLoaderWait();
308
306
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
309
307
  graphingPage.steps.checkPatternBackground();
310
- graphingPage.steps.checkSnapToGridCheckbox();
311
308
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
312
309
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
313
310
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -372,7 +369,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
372
369
  cy.barsPreLoaderWait();
373
370
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
374
371
  graphingPage.steps.checkPatternBackground();
375
- graphingPage.steps.checkSnapToGridCheckbox();
376
372
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
377
373
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
378
374
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -488,7 +484,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
488
484
  cy.barsPreLoaderWait();
489
485
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
490
486
  graphingPage.steps.checkPatternBackground();
491
- graphingPage.steps.checkSnapToGridCheckbox();
492
487
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
493
488
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
494
489
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -544,7 +539,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
544
539
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
545
540
  graphingPage.steps.selectToolOptions(['Polygon']);
546
541
  graphingPage.steps.checkPatternBackground();
547
- graphingPage.steps.checkSnapToGridCheckbox();
548
542
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
549
543
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
550
544
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -588,7 +582,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
588
582
  cy.barsPreLoaderWait();
589
583
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
590
584
  graphingPage.steps.checkPatternBackground();
591
- graphingPage.steps.checkSnapToGridCheckbox();
592
585
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
593
586
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
594
587
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -633,7 +626,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
633
626
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
634
627
  graphingPage.steps.selectToolOptions(['Circle']);
635
628
  graphingPage.steps.checkPatternBackground();
636
- graphingPage.steps.checkSnapToGridCheckbox();
637
629
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
638
630
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
639
631
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -687,7 +679,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
687
679
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
688
680
  graphingPage.steps.selectToolOptions(['Parabola']);
689
681
  graphingPage.steps.checkPatternBackground();
690
- graphingPage.steps.checkSnapToGridCheckbox();
691
682
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
692
683
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
693
684
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -741,7 +732,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
741
732
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
742
733
  graphingPage.steps.selectToolOptions(['Sine']);
743
734
  graphingPage.steps.checkPatternBackground();
744
- graphingPage.steps.checkSnapToGridCheckbox();
745
735
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
746
736
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
747
737
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -795,7 +785,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
795
785
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
796
786
  graphingPage.steps.selectToolOptions(['Polygon']);
797
787
  graphingPage.steps.checkPatternBackground();
798
- graphingPage.steps.checkSnapToGridCheckbox();
799
788
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
800
789
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
801
790
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -837,7 +826,6 @@ describe('Create Item page - Graphing: All or nothing ', () => {
837
826
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
838
827
  graphingPage.steps.selectToolOptions(['Circle', 'Polygon']);
839
828
  graphingPage.steps.checkPatternBackground();
840
- graphingPage.steps.checkSnapToGridCheckbox();
841
829
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
842
830
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
843
831
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -37,7 +37,6 @@ describe('Create item page - Graphing - Check answer functionality', () => {
37
37
  cy.barsPreLoaderWait();
38
38
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
39
39
  graphingPage.steps.selectToolOptions(unselectedToolOption);
40
- graphingPage.steps.checkSnapToGridCheckbox();
41
40
  graphingPage.steps.checkPatternBackground();
42
41
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
43
42
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -24,7 +24,6 @@ describe('Create item page - Graphing: Grading view, Correct answer view content
24
24
  graphingPage.steps.allotPoints(10);
25
25
  graphingPage.steps.selectToolOptions(unselectedToolOption);
26
26
  graphingPage.steps.checkPatternBackground();
27
- graphingPage.steps.checkSnapToGridCheckbox();
28
27
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
29
28
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
30
29
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -136,7 +135,6 @@ describe('Create item page - Graphing: Grading view, Correct answer view content
136
135
  graphingPage.steps.allotPoints(10);
137
136
  graphingPage.steps.selectToolOptions(unselectedToolOption);
138
137
  graphingPage.steps.checkPatternBackground();
139
- graphingPage.steps.checkSnapToGridCheckbox();
140
138
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
141
139
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
142
140
  graphingPage.steps.selectGraphToolOptionEditTab('Circle');
@@ -358,6 +358,7 @@ describe('Graphing: Layout section - Edit tab and preview tab tool options', ()
358
358
 
359
359
  //Snap to grid
360
360
  it('When snap to grid is unchecked user should be able to plot decimal points on the graph in \'Specify correct answer\' section and background section graph', () => {
361
+ graphingPage.steps.uncheckSnapToGridCheckbox();
361
362
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2.5, xRange: 20, y: 1, yRange: 20 }]);
362
363
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2.5, xRange: 20, y: 1, yRange: 20 }]);
363
364
  graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: 3.5, xRange: 20, y: 1, yRange: 20 }]);
@@ -28,7 +28,6 @@ describe('Create item page - Graphing - Preview contents in all views', () => {
28
28
  graphingPage.steps.allotPoints(10);
29
29
  graphingPage.steps.selectToolOptions(unselectedToolOption);
30
30
  graphingPage.steps.checkPatternBackground();
31
- graphingPage.steps.checkSnapToGridCheckbox();
32
31
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
33
32
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
34
33
  graphingPage.steps.verifyPointsPlottedOnEditTabGraph([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -13,7 +13,6 @@ describe('Create Item page - Graphing: Specify correct answer, Alternative corre
13
13
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
14
14
  graphingPage.steps.selectToolOptions(['Circle']);
15
15
  graphingPage.steps.checkPatternBackground();
16
- graphingPage.steps.checkSnapToGridCheckbox();
17
16
  cy.barsPreLoaderWait();
18
17
  });
19
18
 
@@ -31,7 +31,6 @@ describe('Create Item page - Graphing: Student view settings', () => {
31
31
  cy.barsPreLoaderWait();
32
32
  graphingPage.steps.addTextInQuestionInstructionsInputField('Plot the graph');
33
33
  graphingPage.steps.selectToolOptions(['Polygon', 'Circle']);
34
- graphingPage.steps.checkSnapToGridCheckbox();
35
34
  graphingPage.steps.checkPatternBackground();
36
35
  graphingPage.steps.selectGraphToolOptionEditTab('Line');
37
36
  graphingPage.steps.plotPointsOnGraphEditTab([{ x: 2, xRange: 20, y: 1, yRange: 20 }, { x: 2, xRange: 20, y: -5, yRange: 20 }]);
@@ -84,39 +84,39 @@ describe('Create item page - Grid fill: Scoring section', () => {
84
84
 
85
85
  it('When the user gives a score input to \'Points\' input field, then the score should be equally divided and displayed with a \'Points per response\' label', () => {
86
86
  gridFillPage.steps.allotPoints(6);
87
- gridFillPage.steps.selectCell(0, 0)
87
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0)
88
88
  gridFillPage.steps.verifyPointsPerResponseScore(6);
89
89
  });
90
90
 
91
91
  it('When the user selects more cells in specify correct answer section, then points per response should get updated accordingly', () => {
92
- gridFillPage.steps.selectCell(0, 1);
93
- gridFillPage.steps.selectCell(0, 2);
92
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
93
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 2);
94
94
  gridFillPage.steps.verifyPointsPerResponseScore(2);
95
95
  });
96
96
 
97
97
  it('When the user unselects cell in specify correct answer section, then points per response should get updated accordingly', () => {
98
- gridFillPage.steps.unselectCell(0, 2);
98
+ gridFillPage.steps.unselectCellSpecifyCorrectAnswerSection(0, 2);
99
99
  gridFillPage.steps.verifyPointsPerResponseScore(3);
100
100
  });
101
101
 
102
102
  it('When user shades a cell in customize layout then points per response should get updated accordingly', () => {
103
- gridFillPage.steps.expandCustomizeLayoutAccordion();
103
+ gridFillPage.steps.clickOnCustomizeLayoutAccordionButton();
104
104
  gridFillPage.steps.shadeCell(1, 3);
105
105
  gridFillPage.steps.verifyPointsPerResponseScore(2);
106
106
  });
107
107
 
108
108
  it('When user unselects the shaded cell in specify correct answer section, then points per response should get updated accordingly', () => {
109
- gridFillPage.steps.unselectCell(1, 3);
109
+ gridFillPage.steps.unselectCellSpecifyCorrectAnswerSection(1, 3);
110
110
  gridFillPage.steps.verifyPointsPerResponseScore(3);
111
111
  });
112
112
 
113
113
  it('When user selects the shaded cell in specify correct answer section then points per response should get updated accordingly', () => {
114
- gridFillPage.steps.selectCell(1, 3);
114
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(1, 3);
115
115
  gridFillPage.steps.verifyPointsPerResponseScore(2);
116
116
  });
117
117
 
118
118
  it('When user unshades the shaded cell in customize layout section, then points per response should get updated accordingly', () => {
119
- gridFillPage.steps.unshadeCell(1,3);
119
+ gridFillPage.steps.unShadeCell(1,3);
120
120
  gridFillPage.steps.verifyPointsPerResponseScore(2);
121
121
  });
122
122
 
@@ -23,10 +23,10 @@ describe('Create item page - Grid fill : Preview contents', () => {
23
23
  gridFillPage.steps.allotPoints(5);
24
24
  gridFillPage.steps.increaseColumnsCount();
25
25
  gridFillPage.steps.increaseRowsCount();
26
- gridFillPage.steps.expandCustomizeLayoutAccordion();
26
+ gridFillPage.steps.clickOnCustomizeLayoutAccordionButton();
27
27
  gridFillPage.steps.shadeCell(0, 0);
28
28
  gridFillPage.steps.selectHideCellButton();
29
- gridFillPage.steps.hideCell(2);
29
+ gridFillPage.steps.hideCell(0, 2);
30
30
  gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 4);
31
31
  gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 5);
32
32
  gridFillPage.steps.switchToPreviewTab();
@@ -205,7 +205,7 @@ describe('Create item page - Grid fill : Preview contents', () => {
205
205
  }
206
206
  });
207
207
 
208
- it.skip('Accessibility of preview tab', { tags: 'a11y' }, () => {
208
+ it('Accessibility of preview tab', { tags: 'a11y' }, () => {
209
209
  cy.checkAccessibility(gridFillPage.questionInstructionsText().parents('[class*="preview"]'));
210
210
  });
211
211
  });
@@ -0,0 +1,256 @@
1
+ import { gridFillPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ const css = Cypress.env('css');
4
+
5
+ describe('Create item page - Grid fill: All or nothing with alternative answers', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
14
+ cy.barsPreLoaderWait();
15
+ gridFillPage.steps.allotPoints(10);
16
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
17
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
18
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 2);
19
+ gridFillPage.steps.addAlternativeAnswerAccordion(1);
20
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 2);
21
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 3);
22
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 4);
23
+ gridFillPage.steps.allotPoints(20);
24
+ gridFillPage.steps.checkAllowStudentToCheckAnswerCheckbox();
25
+ gridFillPage.steps.switchToPreviewTab();
26
+ });
27
+
28
+ it('When the user selects \'Grading\' view without attempting the question, correct icon should be displayed in responses from alternative accordion', () => {
29
+ gridFillPage.steps.switchToGradingView();
30
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
31
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
32
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
33
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
34
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 3);
35
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 3);
36
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
37
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 4);
38
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 4);
39
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
40
+ });
41
+
42
+ it('When the user attempts the question with responses from the correct accordion, then the user should be awarded with points specified for correct accordion (less than overall points) and on switching to \'Grading\' view, correct icon, background and border should be displayed in responses from correct accordion, and a status message with text \'Your answer is correct\' should be displayed', () => {
43
+ gridFillPage.steps.resetQuestionPreview();
44
+ gridFillPage.steps.selectCellPreviewTab(0, 0);
45
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
46
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
47
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
48
+ gridFillPage.steps.selectCellPreviewTab(0, 2);
49
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
50
+ gridFillPage.steps.verifyPreviewScore(10, 20);
51
+ gridFillPage.steps.switchToGradingView();
52
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
53
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
54
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
55
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
56
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
57
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
58
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
59
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
60
+ cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the responses from correct accordion and status message with text \'Your answer is correct\' should be displayed')
61
+ gridFillPage.steps.checkAnswer();
62
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 0);
63
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 1);
64
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
65
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 0);
66
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 1);
67
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
68
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
69
+ });
70
+
71
+ it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with full points and on switching to \'Grading\' view, correct icon, background and border should be displayed in responses from alternative accordion and status message with text \'Your answer is correct\' should be displayed', () => {
72
+ gridFillPage.steps.resetQuestionPreview();
73
+ gridFillPage.steps.selectCellPreviewTab(0, 2);
74
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
75
+ gridFillPage.steps.selectCellPreviewTab(0, 3);
76
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 3);
77
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
78
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
79
+ gridFillPage.steps.verifyPreviewScore(20, 20);
80
+ gridFillPage.steps.switchToGradingView();
81
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
82
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
83
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
84
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
85
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
86
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
87
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
88
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
89
+ cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the responses from alternative accordion and a status message with text \'Your answer is correct\' should be displayed')
90
+ gridFillPage.steps.checkAnswer();
91
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
92
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
93
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
94
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
95
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
96
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
97
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
98
+ });
99
+
100
+ it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon and border should be displayed in the selected responses from alternative accordion, incorrect icon should be displayed for partially selected correct accordion response and a status message with text \'Your answer is incorrect\' should be displayed', () => {
101
+ gridFillPage.steps.resetQuestionPreview();
102
+ gridFillPage.steps.selectCellPreviewTab(0, 0);
103
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
104
+ gridFillPage.steps.selectCellPreviewTab(0, 1);
105
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 1);
106
+ gridFillPage.steps.verifyPreviewScore(0, 20);
107
+ gridFillPage.steps.switchToGradingView();
108
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
109
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
110
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
111
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
112
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
113
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
114
+ gridFillPage.steps.verifyIncorrectResponseIcon(0, 0);
115
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 0);
116
+ gridFillPage.steps.verifyIncorrectResponseIcon(0, 1);
117
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 1);
118
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
119
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
120
+ cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then incorrect icon should be displayed for partially selected correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
121
+ gridFillPage.steps.checkAnswer();
122
+ gridFillPage.steps.verifyIncorrectResponseIcon(0, 0);
123
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 0);
124
+ gridFillPage.steps.verifyIncorrectResponseIcon(0, 1);
125
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 1);
126
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
127
+ });
128
+
129
+ it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon, background and border should be displayed in the selected alternative accordion responses, correct icon and border should be displayed for unselected alternative accordion response and a status message with text \'Your answer is incorrect\' should be displayed', () => {
130
+ gridFillPage.steps.resetQuestionPreview();
131
+ gridFillPage.steps.selectCellPreviewTab(0, 3);
132
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 3);
133
+ gridFillPage.steps.verifyPreviewScore(0, 20);
134
+ gridFillPage.steps.switchToGradingView();
135
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
136
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
137
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
138
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
139
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 4);
140
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
141
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
142
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 4);
143
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
144
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
145
+ cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the correct answer responses, no icon/border should be displayed for unselected response cell and a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
146
+ gridFillPage.steps.checkAnswer();
147
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
148
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
149
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
150
+ });
151
+
152
+ it('When the user attempts the question partially correct with all the responses correct as per the correct accordion but one response incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon, background and border should be displayed in the selected alternative accordion responses, correct icon and border should be displayed for unselected correct answer response and a status message with text \'Your answer is incorrect\' should be displayed', () => {
153
+ gridFillPage.steps.resetQuestionPreview();
154
+ gridFillPage.steps.selectCellPreviewTab(0, 3);
155
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 3);
156
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
157
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
158
+ gridFillPage.steps.verifyPreviewScore(0, 20);
159
+ gridFillPage.steps.switchToGradingView();
160
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
161
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
162
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
163
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
164
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
165
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
166
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
167
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
168
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
169
+ cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed in the response from the alternative accordion and no icon should be displayed for unselected response, a status message with text \'Your answer is incorrect\' should be displayed')
170
+ gridFillPage.steps.checkAnswer();
171
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
172
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 3);
173
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
174
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
175
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
176
+ });
177
+
178
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be displayed in selected alternative accordion response, correct icon should be displayed for unselected response from alternative accordion, incorrect icon should be displayed in selected correct accordion response and a status message with text \'Your answer is incorrect\' should be displayed', () => {
179
+ gridFillPage.steps.resetQuestionPreview();
180
+ gridFillPage.steps.selectCellPreviewTab(0, 0);
181
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 0);
182
+ gridFillPage.steps.selectCellPreviewTab(0, 4);
183
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 4);
184
+ gridFillPage.steps.verifyPreviewScore(0, 20);
185
+ gridFillPage.steps.switchToGradingView();
186
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
187
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
188
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
189
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
190
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 3);
191
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 3);
192
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
193
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
194
+ gridFillPage.steps.verifyIncorrectResponseIcon(0, 0);
195
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 0);
196
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
197
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
198
+ cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon, background and border should be displayed in alternative accordion response, incorrect icon, background and border should be displayed in correct accordion response and a status message with text \'Your answer is incorrect\' should be displayed')
199
+ gridFillPage.steps.checkAnswer();
200
+ gridFillPage.steps.verifyIncorrectResponseIcon(0, 0);
201
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(0, 0);
202
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
203
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 4);
204
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
205
+ });
206
+
207
+ it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon, background and border should be in the common response and correct icon and border response from alternative answer accordion and a status message \'Your answer is incorrect\' should be displayed', () => {
208
+ gridFillPage.steps.resetQuestionPreview();
209
+ gridFillPage.steps.selectCellPreviewTab(0, 2);
210
+ gridFillPage.steps.verifyCellSelectedPreviewTab(0, 2);
211
+ gridFillPage.steps.verifyPreviewScore(0, 20);
212
+ gridFillPage.steps.switchToGradingView();
213
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
214
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
215
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
216
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 3);
217
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 3);
218
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
219
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 4);
220
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 4);
221
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
222
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
223
+ cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed in the correct answer responses, no icon should be displayed for unselected response area and a status message with text \'Your answer is incorrect\' should be displayed')
224
+ gridFillPage.steps.checkAnswer();
225
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
226
+ gridFillPage.steps.verifyCorrectResponseBorderAndBackgroundColor(0, 2);
227
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
228
+ });
229
+
230
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon, background and border should be displayed in incorrect response, a status message with text \'Your answer is incorrect\' and correct icon and border with all correct answers from the alternative accordion should be displayed', () => {
231
+ gridFillPage.steps.resetQuestionPreview();
232
+ gridFillPage.steps.selectCellPreviewTab(1, 2);
233
+ gridFillPage.steps.verifyCellSelectedPreviewTab(1, 2);
234
+ gridFillPage.steps.verifyPreviewScore(0, 20);
235
+ gridFillPage.steps.switchToGradingView();
236
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 2);
237
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 3);
238
+ gridFillPage.steps.verifyCorrectResponseIcon(0, 4);
239
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 2);
240
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 3);
241
+ gridFillPage.steps.verifyCorrectResponseBorder(0, 4);
242
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 2);
243
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 3);
244
+ gridFillPage.steps.verifyResponseCellHasDefaultBackgroundColor(0, 4);
245
+ gridFillPage.steps.verifyIncorrectResponseIcon(1, 2);
246
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 2);
247
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
248
+ gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
249
+ cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon, background and border should be displayed in incorrect response and a status message with text \'Your answer is incorrect\' should be displayed')
250
+ gridFillPage.steps.checkAnswer();
251
+ gridFillPage.steps.verifyIncorrectResponseIcon(1, 2);
252
+ gridFillPage.steps.verifyIncorrectResponseBorderAndBackgroundColor(1, 2);
253
+ gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
254
+ });
255
+ });
256
+ });