itemengine-cypress-automation 1.0.278 → 1.0.280-RepoUpdate13thJan-133bc9f.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +21 -21
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +9 -9
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneBasic.js +7 -6
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +10 -9
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +11 -10
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +1 -1
  7. package/cypress/e2e/ILC/EditItem/editItem.ts +133 -0
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +4 -4
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +15 -15
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +14 -14
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +214 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +4 -4
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +14 -14
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +8 -8
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
  17. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +8 -8
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +14 -14
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
  21. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
  22. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +1 -1
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/blankResponseScoring.js +228 -0
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/manuallyAndNonScored.js +3 -3
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/blankResponseScoring.js +242 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/blankResponseScoring.js +245 -0
  27. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/blankResponseScoring.js +237 -0
  28. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +4 -4
  29. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +14 -14
  30. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +14 -14
  31. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
  32. package/cypress/e2e/ILC/Matching/Scoring/blankResponseScoring.js +239 -0
  33. package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +2 -2
  34. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +2 -2
  35. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -7
  36. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +7 -7
  37. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +7 -7
  38. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +4 -4
  39. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +14 -14
  40. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
  41. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
  42. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +3 -2
  43. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +7 -7
  44. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +7 -7
  45. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +7 -7
  46. package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +212 -0
  47. package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +2 -2
  48. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +2 -2
  49. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -7
  50. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +7 -7
  51. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +7 -7
  52. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +4 -4
  53. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -7
  54. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +7 -7
  55. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +7 -7
  56. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/blankResponseScoring.js +366 -0
  57. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/blankResponseScoring.js +306 -0
  58. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +243 -0
  59. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +242 -0
  60. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +289 -0
  61. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +284 -0
  62. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +238 -0
  63. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +279 -0
  64. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsScoringBasic.js +641 -0
  65. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +278 -0
  66. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +228 -0
  67. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +234 -0
  68. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsScoringBasic.js +237 -0
  69. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAddEvaluation.js +134 -0
  70. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAlternateAnswer.js +138 -0
  71. package/cypress/e2e/ILC/TextEntryMath/Scoring/blankResponseScoring.js +263 -0
  72. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  73. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasicForAlternateAnswer.js +166 -0
  74. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +3 -3
  75. package/cypress/e2e/ILC/TextEntryMath/customSettings.js +3 -3
  76. package/cypress/e2e/ILC/TextEntryMath/customSettingsSeparators.ts +193 -0
  77. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +5 -5
  78. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +1 -1
  79. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +1 -1
  80. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +4 -4
  81. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +8 -8
  82. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
  83. package/cypress/pages/components/customSettingsSeparatorsComponent.ts +17 -0
  84. package/cypress/pages/components/equationEditorFlyout.js +1 -1
  85. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +1 -1
  86. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +5 -1
  87. package/cypress/pages/components/gridQuestionCommonComponent.js +40 -0
  88. package/cypress/pages/components/optionsWrapperComponent.js +1 -1
  89. package/cypress/pages/createItemPage.js +38 -1
  90. package/cypress/pages/fillInTheGapsDragAndDropPage.js +45 -3
  91. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +35 -2
  92. package/cypress/pages/listOrderingPage.js +11 -11
  93. package/cypress/pages/matchingPage.js +31 -4
  94. package/cypress/pages/multipleSelectionPage.js +17 -2
  95. package/cypress/pages/readingRulerPage.js +5 -3
  96. package/cypress/pages/singleSelectionPage.js +3 -0
  97. package/cypress/pages/textEntryMathPage.js +19 -5
  98. package/package.json +1 -1
@@ -0,0 +1,138 @@
1
+ import { textEntryMathPage } from "../../../../pages";
2
+ import { equationEditorFlyout } from "../../../../pages/components";
3
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
+ import utilities from "../../../../support/helpers/utilities";
5
+
6
+ describe('Create Item page - Text entry math: Preview scoring', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe(`Text entry math: All or nothing with alternative answer - When \'Alternative answer\' points are more than \'Correct answer\' points`, () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
15
+ cy.barsPreLoaderWait();
16
+ textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
17
+ textEntryMathPage.steps.addResponseArea();
18
+ textEntryMathPage.steps.addResponseArea();
19
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
20
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
21
+ equationEditorFlyout.steps.clearAll();
22
+ equationEditorFlyout.steps.enterTextInPreviewInputField('car');
23
+ equationEditorFlyout.steps.clickOnOkButton();
24
+ textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(0);
25
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(1, 'bus');
26
+ textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(0);
27
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
28
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
29
+ equationEditorFlyout.steps.clearAll();
30
+ equationEditorFlyout.steps.enterTextInPreviewInputField('cat');
31
+ equationEditorFlyout.steps.clickOnOkButton();
32
+ textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(1);
33
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(3, 'dog');
34
+ textEntryMathPage.steps.allotPoints(20);
35
+ textEntryMathPage.steps.expandAdditionalSettings();
36
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
37
+ textEntryMathPage.steps.switchToPreviewTab();
38
+ });
39
+
40
+ it('When the user selects \'Grading\' view without attempting the question, response numeration should be displayed, correct answers section should be displayed with correct answers from the alternative accordion and respective response numeration, no status message should be displayed', () => {
41
+ textEntryMathPage.steps.switchToGradingView();
42
+ textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
43
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['c⁢a⁢r', 'c⁢a⁢t']);
44
+ textEntryMathPage.steps.switchToGradingView();
45
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
46
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
47
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctIncorrectStatusMessageText(), 'notExist');
48
+ });
49
+
50
+ it('When the user attempts the question with responses from the correct answer, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
51
+ textEntryMathPage.steps.resetQuestionPreview();
52
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
53
+ equationEditorFlyout.steps.enterTextInPreviewInputField('car');
54
+ equationEditorFlyout.steps.clickOnOkButton();
55
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
56
+ equationEditorFlyout.steps.enterTextInPreviewInputField('cat');
57
+ equationEditorFlyout.steps.clickOnOkButton();
58
+ textEntryMathPage.steps.verifyPreviewScore(20, 20);
59
+ textEntryMathPage.steps.switchToGradingView();
60
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
61
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
62
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
63
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
64
+ textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
65
+ });
66
+
67
+ it('When the user attempts the question with responses from the alternate correct answer, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
68
+ textEntryMathPage.steps.resetQuestionPreview();
69
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
70
+ equationEditorFlyout.steps.enterTextInPreviewInputField('bus');
71
+ equationEditorFlyout.steps.clickOnOkButton();
72
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
73
+ equationEditorFlyout.steps.enterTextInPreviewInputField('dog');
74
+ equationEditorFlyout.steps.clickOnOkButton();
75
+ textEntryMathPage.steps.verifyPreviewScore(20, 20);
76
+ textEntryMathPage.steps.switchToGradingView();
77
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
78
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
79
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
80
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
81
+ textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
82
+ });
83
+
84
+ it('When the user attempts the question with one responses from the correct answer and other from the alternate correct answer part , then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
85
+ textEntryMathPage.steps.resetQuestionPreview();
86
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
87
+ equationEditorFlyout.steps.enterTextInPreviewInputField('car');
88
+ equationEditorFlyout.steps.clickOnOkButton();
89
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
90
+ equationEditorFlyout.steps.enterTextInPreviewInputField('dog');
91
+ equationEditorFlyout.steps.clickOnOkButton();
92
+ textEntryMathPage.steps.verifyPreviewScore(20, 20);
93
+ textEntryMathPage.steps.switchToGradingView();
94
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
95
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
96
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
97
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
98
+ textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
99
+ });
100
+
101
+ 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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with dropzone cell numeration should be displayed', () => {
102
+ textEntryMathPage.steps.resetQuestionPreview();
103
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
104
+ equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 1');
105
+ equationEditorFlyout.steps.clickOnOkButton();
106
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
107
+ equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 2');
108
+ equationEditorFlyout.steps.clickOnOkButton();
109
+ textEntryMathPage.steps.verifyPreviewScore(0, 20);
110
+ textEntryMathPage.steps.switchToGradingView();
111
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
112
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
113
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
114
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['c⁢a⁢r', 'c⁢a⁢t']);
115
+ textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
116
+ });
117
+
118
+ it('When the user adds an alternate answer and does not set any answer for that alternate answer and attempts the option as a blank,then the user should be awarded full points and on switching to\'Grading\' view, correct icons should be displayed beside all the correct responses and the correct answer section should not be displayed', () => {
119
+ textEntryMathPage.steps.switchToEditTab();
120
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
121
+ textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(0);
122
+ textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(0);
123
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
124
+ textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(1);
125
+ textEntryMathPage.steps.switchToPreviewTab();
126
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
127
+ equationEditorFlyout.steps.enterTextInPreviewInputField('o');
128
+ equationEditorFlyout.steps.clearAll();
129
+ equationEditorFlyout.steps.clickOnOkButton();
130
+ textEntryMathPage.steps.verifyPreviewScore(20, 20);
131
+ textEntryMathPage.steps.switchToGradingView();
132
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
133
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
134
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
135
+ textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
136
+ });
137
+ });
138
+ });
@@ -0,0 +1,263 @@
1
+ import { dialogBoxBase, gradingViewPage, itemPreviewPage, studentViewPage, textEntryMathPage } from "../../../../pages";
2
+ import { equationEditorFlyout } from "../../../../pages/components";
3
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
+ import utilities from "../../../../support/helpers/utilities";
5
+ var itemReferenceID = "";
6
+
7
+ describe('Create item page - Text entry math: Partial equal weights for blank responses', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe(`Auto scored - All or nothing`, () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
16
+ cy.barsPreLoaderWait();
17
+ textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Text Entry Math');
18
+ textEntryMathPage.steps.allotPoints(24);
19
+ textEntryMathPage.steps.addResponseArea();
20
+ textEntryMathPage.steps.addResponseArea();
21
+ textEntryMathPage.steps.addResponseArea();
22
+ textEntryMathPage.steps.switchToPreviewTab();
23
+ });
24
+
25
+ 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', () => {
26
+ textEntryMathPage.steps.switchToGradingView();
27
+ textEntryMathPage.steps.verifyPreviewScore(0, 24);
28
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
29
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
30
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
31
+ textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
32
+ utilities.verifyInnerText(textEntryMathPage.correctAnswersLabel(), 'Correct answers');
33
+ textEntryMathPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
34
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['', '', '']);
35
+ });
36
+
37
+ it('When the user has not set any answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then correct icons should be displayed beside all the responses, full points should be allocated and correct answer section should not be displayed', () => {
38
+ textEntryMathPage.steps.resetQuestionPreview();
39
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
40
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
41
+ textEntryMathPage.steps.switchToGradingView();
42
+ textEntryMathPage.steps.verifyPreviewScore(24, 24);
43
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
44
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
45
+ textEntryMathPage.steps.verifyCorrectResponseIcon(2);
46
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
47
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
48
+ });
49
+
50
+ it('When the user sets an answer in the \'Specify correct answer\' section then on switching to \'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', () => {
51
+ textEntryMathPage.steps.switchToEditTab();
52
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
53
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
54
+ equationEditorFlyout.steps.clearAll();
55
+ equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
56
+ equationEditorFlyout.steps.clickOnOkButton();
57
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
58
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
59
+ equationEditorFlyout.steps.enterEquationUsingPiSymbol();
60
+ textEntryMathPage.steps.expandAdditionalSettings();
61
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
62
+ textEntryMathPage.steps.switchToPreviewTab();
63
+ textEntryMathPage.steps.verifyPreviewScore(0, 24);
64
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
65
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
66
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
67
+ textEntryMathPage.steps.switchToGradingView();
68
+ textEntryMathPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
69
+ textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
70
+ utilities.verifyInnerText(textEntryMathPage.correctAnswersLabel(), 'Correct answers');
71
+ textEntryMathPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
72
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
73
+ });
74
+
75
+ it('When the user has set an answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then correct icons should be displayed beside all the correct responses and incorrect icon beside the incorrect responses, points should be allocated for the correct answers and correct answer section should be displayed', () => {
76
+ textEntryMathPage.steps.resetQuestionPreview();
77
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
78
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
79
+ textEntryMathPage.steps.switchToGradingView();
80
+ textEntryMathPage.steps.verifyPreviewScore(0, 24);
81
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
82
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
83
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
84
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
85
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
86
+ });
87
+
88
+ it('When the user has set an answer in the \'Specify correct answer\' section and enters responses in the preview tab then correct icons should be displayed beside all the correct responses and incorrect icon beside the incorrect responses, points should be allocated for the correct answers and correct answer section should be displayed', () => {
89
+ textEntryMathPage.steps.resetQuestionPreview();
90
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
91
+ textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Correct1');
92
+ equationEditorFlyout.steps.clickOnOkButton();
93
+ textEntryMathPage.steps.switchToGradingView();
94
+ textEntryMathPage.steps.verifyPreviewScore(0, 24);
95
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
96
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
97
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
98
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
99
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
100
+ });
101
+
102
+ 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, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
103
+ textEntryMathPage.steps.resetQuestionPreview();
104
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
105
+ textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Incorrect answer 1');
106
+ equationEditorFlyout.steps.clickOnOkButton();
107
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
108
+ textEntryMathPage.steps.enterTextInPreviewInputFieldNew(1, 'Incorrect answer 2');
109
+ equationEditorFlyout.steps.clickOnOkButton();
110
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
111
+ textEntryMathPage.steps.enterTextInPreviewInputFieldNew(2, 'Incorrect answer 3');
112
+ equationEditorFlyout.steps.clickOnOkButton();
113
+ textEntryMathPage.steps.verifyPreviewScore(0, 24);
114
+ textEntryMathPage.steps.switchToGradingView();
115
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
116
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
117
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
118
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
119
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
120
+ });
121
+
122
+ it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
123
+ textEntryMathPage.steps.resetQuestionPreview();
124
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
125
+ textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Correct1');
126
+ equationEditorFlyout.steps.clickOnOkButton();
127
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
128
+ equationEditorFlyout.steps.enterEquationUsingPiSymbol();
129
+ textEntryMathPage.steps.verifyPreviewScore(24, 24);
130
+ textEntryMathPage.steps.switchToGradingView();
131
+ textEntryMathPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
132
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
133
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
134
+ textEntryMathPage.steps.verifyCorrectResponseIcon(2);
135
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
136
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
137
+ });
138
+ });
139
+
140
+ describe(`Auto scored - Partial equal weights`, () => {
141
+ abortEarlySetup();
142
+ before(() => {
143
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
144
+ cy.barsPreLoaderWait();
145
+ textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Text Entry Math');
146
+ textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial equal weights')
147
+ textEntryMathPage.steps.allotPoints(24);
148
+ textEntryMathPage.steps.addResponseArea();
149
+ textEntryMathPage.steps.addResponseArea();
150
+ textEntryMathPage.steps.addResponseArea();
151
+ textEntryMathPage.steps.switchToPreviewTab();
152
+ });
153
+
154
+ 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', () => {
155
+ textEntryMathPage.steps.switchToGradingView();
156
+ textEntryMathPage.steps.verifyPreviewScore(0, 24);
157
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
158
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
159
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
160
+ textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
161
+ utilities.verifyInnerText(textEntryMathPage.correctAnswersLabel(), 'Correct answers');
162
+ textEntryMathPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
163
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['', '', '']);
164
+ });
165
+
166
+ it('When the user has not set any answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then correct icons should be displayed beside all the responses, full points should be allocated and correct answer section should not be displayed', () => {
167
+ textEntryMathPage.steps.resetQuestionPreview();
168
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
169
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
170
+ textEntryMathPage.steps.switchToGradingView();
171
+ textEntryMathPage.steps.verifyPreviewScore(24, 24);
172
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
173
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
174
+ textEntryMathPage.steps.verifyCorrectResponseIcon(2);
175
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
176
+ });
177
+
178
+ it('When the user sets an answer in the \'Specify correct answer\' section then on switching to \'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', () => {
179
+ textEntryMathPage.steps.switchToEditTab();
180
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
181
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
182
+ equationEditorFlyout.steps.clearAll();
183
+ equationEditorFlyout.steps.enterTextInPreviewInputField('Correct1');
184
+ equationEditorFlyout.steps.clickOnOkButton();
185
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
186
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
187
+ equationEditorFlyout.steps.enterEquationUsingPiSymbol();
188
+ textEntryMathPage.steps.expandAdditionalSettings();
189
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
190
+ textEntryMathPage.steps.switchToPreviewTab();
191
+ textEntryMathPage.steps.verifyPreviewScore(0, 24);
192
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
193
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
194
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
195
+ textEntryMathPage.steps.switchToGradingView();
196
+ textEntryMathPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
197
+ textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
198
+ utilities.verifyInnerText(textEntryMathPage.correctAnswersLabel(), 'Correct answers');
199
+ textEntryMathPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
200
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
201
+ });
202
+
203
+ it('When the user has set an answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then correct icons should be displayed beside all the correct responses and incorrect icon beside the incorrect responses, points should be allocated for the correct answers and correct answer section should be displayed', () => {
204
+ textEntryMathPage.steps.resetQuestionPreview();
205
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
206
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
207
+ textEntryMathPage.steps.switchToGradingView();
208
+ textEntryMathPage.steps.verifyPreviewScore(8, 24);
209
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
210
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
211
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
212
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
213
+ });
214
+
215
+ it('When the user has set an answer in the \'Specify correct answer\' section and enters responses in the preview tab then correct icons should be displayed beside all the correct responses and incorrect icon beside the incorrect responses, points should be allocated for the correct answers and correct answer section should be displayed', () => {
216
+ textEntryMathPage.steps.resetQuestionPreview();
217
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
218
+ textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Correct1');
219
+ equationEditorFlyout.steps.clickOnOkButton();
220
+ textEntryMathPage.steps.switchToGradingView();
221
+ textEntryMathPage.steps.verifyPreviewScore(16, 24);
222
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
223
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
224
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
225
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
226
+ });
227
+
228
+ 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, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
229
+ textEntryMathPage.steps.resetQuestionPreview();
230
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
231
+ textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Incorrect answer 1');
232
+ equationEditorFlyout.steps.clickOnOkButton();
233
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
234
+ textEntryMathPage.steps.enterTextInPreviewInputFieldNew(1, 'Incorrect answer 2');
235
+ equationEditorFlyout.steps.clickOnOkButton();
236
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
237
+ textEntryMathPage.steps.enterTextInPreviewInputFieldNew(2, 'Incorrect answer 3');
238
+ equationEditorFlyout.steps.clickOnOkButton();
239
+ textEntryMathPage.steps.verifyPreviewScore(0, 24);
240
+ textEntryMathPage.steps.switchToGradingView();
241
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
242
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
243
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
244
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t⁢1', '', '6×π']);
245
+ });
246
+
247
+ it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
248
+ textEntryMathPage.steps.resetQuestionPreview();
249
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
250
+ textEntryMathPage.steps.enterTextInPreviewInputFieldNew(0, 'Correct1');
251
+ equationEditorFlyout.steps.clickOnOkButton();
252
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(2);
253
+ equationEditorFlyout.steps.enterEquationUsingPiSymbol();
254
+ textEntryMathPage.steps.verifyPreviewScore(24, 24);
255
+ textEntryMathPage.steps.switchToGradingView();
256
+ textEntryMathPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
257
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
258
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
259
+ textEntryMathPage.steps.verifyCorrectResponseIcon(2);
260
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
261
+ });
262
+ });
263
+ });
@@ -108,7 +108,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
108
108
  equationEditorFlyout.steps.clickOnOkButton();
109
109
  textEntryMathPage.steps.verifyPreviewScore(10, 18);
110
110
  textEntryMathPage.steps.switchToGradingView();
111
- textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
111
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
112
112
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
113
113
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
114
114
  textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
@@ -124,7 +124,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
124
124
  equationEditorFlyout.steps.clickOnOkButton();
125
125
  textEntryMathPage.steps.verifyPreviewScore(14, 18);
126
126
  textEntryMathPage.steps.switchToGradingView();
127
- textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
127
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
128
128
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
129
129
  textEntryMathPage.steps.verifyCorrectResponseIcon(2);
130
130
  textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
@@ -142,7 +142,7 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
142
142
  textEntryMathPage.steps.switchToGradingView();
143
143
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
144
144
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
145
- textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
145
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
146
146
  textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
147
147
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
148
148
  });
@@ -174,8 +174,8 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
174
174
  textEntryMathPage.steps.verifyPreviewScore(4, 18);
175
175
  textEntryMathPage.steps.switchToGradingView();
176
176
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
177
- textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
178
- textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
177
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
178
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
179
179
  textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['C⁢o⁢r⁢r⁢e⁢c⁢t', '6×π', '7.07⁢e']);
180
180
  textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
181
181
  });
@@ -0,0 +1,166 @@
1
+ import { textEntryMathPage } from "../../../../pages";
2
+ import { equationEditorFlyout } from "../../../../pages/components";
3
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
+ import utilities from "../../../../support/helpers/utilities";
5
+
6
+ describe('Create Item page - Text entry math: Preview scoring', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe(`Text entry math: All or nothing with alternative answer - When \'Alternative answer\' points are more than \'Correct answer\' points`, () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
15
+ cy.barsPreLoaderWait();
16
+ textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
17
+ textEntryMathPage.steps.addResponseArea();
18
+ textEntryMathPage.steps.addResponseArea();
19
+ textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
20
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
21
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
22
+ equationEditorFlyout.steps.clearAll();
23
+ equationEditorFlyout.steps.enterTextInPreviewInputField('car');
24
+ equationEditorFlyout.steps.clickOnOkButton();
25
+ textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(0);
26
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(1, 'bus');
27
+ textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(0);
28
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
29
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
30
+ equationEditorFlyout.steps.clearAll();
31
+ equationEditorFlyout.steps.enterTextInPreviewInputField('cat');
32
+ equationEditorFlyout.steps.clickOnOkButton();
33
+ textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(1);
34
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(3, 'dog');
35
+ textEntryMathPage.steps.allotPoints(20);
36
+ textEntryMathPage.steps.expandAdditionalSettings();
37
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
38
+ textEntryMathPage.steps.switchToPreviewTab();
39
+ });
40
+
41
+ it('When the user selects \'Grading\' view without attempting the question, response numeration should be displayed, correct answers section should be displayed with correct answers from the alternative accordion and respective response numeration, no status message should be displayed', () => {
42
+ textEntryMathPage.steps.switchToGradingView();
43
+ textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
44
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['c⁢a⁢r', 'c⁢a⁢t']);
45
+ textEntryMathPage.steps.switchToGradingView();
46
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
47
+ textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
48
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctIncorrectStatusMessageText(), 'notExist');
49
+ });
50
+
51
+ it('When the user attempts the question with partially correct options exclusively from the correct answer option part, then the user should be awarded points for the correctly attempted options', () => {
52
+ textEntryMathPage.steps.resetQuestionPreview();
53
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
54
+ equationEditorFlyout.steps.enterTextInPreviewInputField('car');
55
+ equationEditorFlyout.steps.clickOnOkButton();
56
+ textEntryMathPage.steps.verifyPreviewScore(10, 20);
57
+ textEntryMathPage.steps.switchToGradingView();
58
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
59
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
60
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctIncorrectStatusMessageText(), 'notExist');
61
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['c⁢a⁢r', 'c⁢a⁢t']);
62
+ });
63
+
64
+ it('When the user attempts the question with all the responses from the correct answer option, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses and correct answer section should not be displayed', () => {
65
+ textEntryMathPage.steps.resetQuestionPreview();
66
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
67
+ equationEditorFlyout.steps.enterTextInPreviewInputField('car');
68
+ equationEditorFlyout.steps.clickOnOkButton();
69
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
70
+ equationEditorFlyout.steps.enterTextInPreviewInputField('cat');
71
+ equationEditorFlyout.steps.clickOnOkButton();
72
+ textEntryMathPage.steps.verifyPreviewScore(20, 20);
73
+ textEntryMathPage.steps.switchToGradingView();
74
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
75
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
76
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
77
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctIncorrectStatusMessageText(), 'notExist');
78
+ textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
79
+ });
80
+
81
+ it('When the user attempts the question with partially correct options exclusively from the alternate correct answer option part, then the user should be awarded points for the correctly attempted options', () => {
82
+ textEntryMathPage.steps.resetQuestionPreview();
83
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
84
+ equationEditorFlyout.steps.enterTextInPreviewInputField('bus');
85
+ equationEditorFlyout.steps.clickOnOkButton();
86
+ textEntryMathPage.steps.verifyPreviewScore(10, 20);
87
+ textEntryMathPage.steps.switchToGradingView();
88
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
89
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
90
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctIncorrectStatusMessageText(), 'notExist');
91
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['c⁢a⁢r', 'c⁢a⁢t']);
92
+ });
93
+
94
+ it('When the user attempts the question with all the responses from the alternate correct answer option, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses and correct answer section should not be displayed', () => {
95
+ textEntryMathPage.steps.resetQuestionPreview();
96
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
97
+ equationEditorFlyout.steps.enterTextInPreviewInputField('bus');
98
+ equationEditorFlyout.steps.clickOnOkButton();
99
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
100
+ equationEditorFlyout.steps.enterTextInPreviewInputField('dog');
101
+ equationEditorFlyout.steps.clickOnOkButton();
102
+ textEntryMathPage.steps.verifyPreviewScore(20, 20);
103
+ textEntryMathPage.steps.switchToGradingView();
104
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
105
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
106
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctIncorrectStatusMessageText(), 'notExist');
107
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
108
+ textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
109
+ });
110
+
111
+ it('When the user attempts the question with one responses from the correct answer and other from the alternate correct answer part , then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses and correct answer section should not be displayed', () => {
112
+ textEntryMathPage.steps.resetQuestionPreview();
113
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
114
+ equationEditorFlyout.steps.enterTextInPreviewInputField('car');
115
+ equationEditorFlyout.steps.clickOnOkButton();
116
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
117
+ equationEditorFlyout.steps.enterTextInPreviewInputField('dog');
118
+ equationEditorFlyout.steps.clickOnOkButton();
119
+ textEntryMathPage.steps.verifyPreviewScore(20, 20);
120
+ textEntryMathPage.steps.switchToGradingView();
121
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
122
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
123
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctIncorrectStatusMessageText(), 'notExist');
124
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
125
+ textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
126
+ });
127
+
128
+ 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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with dropzone cell numeration should be displayed', () => {
129
+ textEntryMathPage.steps.resetQuestionPreview();
130
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
131
+ equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 1');
132
+ equationEditorFlyout.steps.clickOnOkButton();
133
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
134
+ equationEditorFlyout.steps.enterTextInPreviewInputField('Incorrect answer 2');
135
+ equationEditorFlyout.steps.clickOnOkButton();
136
+ textEntryMathPage.steps.verifyPreviewScore(0, 20);
137
+ textEntryMathPage.steps.switchToGradingView();
138
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
139
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
140
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctIncorrectStatusMessageText(), 'notExist');
141
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['c⁢a⁢r', 'c⁢a⁢t']);
142
+ textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
143
+ });
144
+
145
+ it('When the user adds an alternate answer and does not set any answer for that alternate answer and attempts the option as a blank,then the user should be awarded full points and on switching to\'Grading\' view, correct icons should be displayed beside all the correct responses and the correct answer section should not be displayed', () => {
146
+ textEntryMathPage.steps.switchToEditTab();
147
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
148
+ textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(0);
149
+ textEntryMathPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(0);
150
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
151
+ textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(1);
152
+ textEntryMathPage.steps.switchToPreviewTab();
153
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
154
+ equationEditorFlyout.steps.enterTextInPreviewInputField('o');
155
+ equationEditorFlyout.steps.clearAll();
156
+ equationEditorFlyout.steps.clickOnOkButton();
157
+ textEntryMathPage.steps.verifyPreviewScore(20, 20);
158
+ textEntryMathPage.steps.switchToGradingView();
159
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
160
+ textEntryMathPage.steps.verifyCorrectResponseIcon(1);
161
+ textEntryMathPage.steps.verifyCorrectAnswerSectionNotExists();
162
+ utilities.verifyElementVisibilityState(textEntryMathPage.correctIncorrectStatusMessageText(), 'notExist');
163
+ textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
164
+ });
165
+ });
166
+ });