itemengine-cypress-automation 1.0.584-IEI-7041-1da58ac.0 → 1.0.585-IEI-7048-5c19852.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +1 -4
  2. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +8 -109
  3. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +8 -109
  4. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +8 -109
  5. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +2 -7
  6. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +10 -139
  7. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +1 -4
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +9 -124
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +10 -139
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +1 -4
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +9 -124
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +8 -109
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +9 -124
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -243
  15. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +77 -0
  16. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +78 -1
  17. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +78 -1
  18. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +104 -9
  19. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +4 -0
  20. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +95 -0
  21. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +95 -0
  22. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +84 -0
  23. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +4 -0
  24. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +73 -0
  25. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +84 -0
  26. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +187 -2
  27. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +79 -1
  28. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +79 -0
  29. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +79 -0
  30. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +4 -0
  31. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +103 -0
  32. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +4 -0
  33. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +103 -0
  34. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
  35. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +91 -0
  36. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +4 -0
  37. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +79 -0
  38. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +91 -0
  39. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +209 -5
  40. package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +195 -1
  41. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
  42. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +85 -0
  43. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +82 -0
  44. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +85 -0
  45. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +109 -6
  46. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsBasic.js +4 -0
  47. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +103 -0
  48. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
  49. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +91 -0
  50. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsBasic.js +4 -0
  51. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +79 -0
  52. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +91 -0
  53. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +207 -3
  54. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +9 -1
  55. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +102 -2
  56. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +102 -2
  57. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +107 -2
  58. package/cypress/e2e/ILC/Matching/Scoring/blankResponseScoring.js +36 -2
  59. package/cypress/e2e/ILC/Matching/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +5 -0
  60. package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +1 -0
  61. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +10 -1
  62. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +128 -2
  63. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +115 -2
  64. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +128 -2
  65. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +9 -1
  66. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -2
  67. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +102 -2
  68. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +115 -2
  69. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +226 -2
  70. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +9 -1
  71. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +102 -2
  72. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +102 -2
  73. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +102 -2
  74. package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +32 -5
  75. package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +3 -0
  76. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +10 -1
  77. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +128 -2
  78. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +115 -2
  79. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +128 -2
  80. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +9 -1
  81. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -2
  82. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +102 -2
  83. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +115 -2
  84. package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +216 -2
  85. package/cypress/pages/components/correctIncorrectAnswerLabelComponent.js +18 -1
  86. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +1 -25
  87. package/cypress/pages/listOrderingPage.js +60 -1
  88. package/cypress/pages/matchingPage.js +23 -1
  89. package/package.json +1 -1
@@ -2,6 +2,7 @@ import { listOrderingPage } from "../../../../pages/listOrderingPage";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
 
4
4
  let options = ['sprout', 'plant', 'flower', 'seed'];
5
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
5
6
 
6
7
  describe('Create Item page - List ordering: Partial different weights scoring with alternative answer - When alternative answer points are equal to correct answer points', () => {
7
8
  before(() => {
@@ -35,6 +36,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
35
36
  listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
36
37
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
37
38
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
39
+ if (alternativeAnswerCheck === 'true') {
40
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
41
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
42
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
43
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
44
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
45
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
46
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
47
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 9 pts, 6 pts)', 1);
48
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
49
+ }
38
50
  listOrderingPage.steps.verifyCorrectOptionIconsDropdownLayoutCorrectAnswersSection();
39
51
  });
40
52
 
@@ -49,6 +61,9 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
49
61
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
50
62
  listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
51
63
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
64
+ if (alternativeAnswerCheck === 'true') {
65
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
66
+ }
52
67
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
53
68
  /*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 besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
54
69
  listOrderingPage.steps.checkAnswer();
@@ -71,6 +86,9 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
71
86
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
72
87
  listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
73
88
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
89
+ if (alternativeAnswerCheck === 'true') {
90
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
91
+ }
74
92
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
75
93
  /*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 besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
76
94
  listOrderingPage.steps.checkAnswer();
@@ -93,6 +111,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
93
111
  listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
94
112
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
95
113
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
114
+ if (alternativeAnswerCheck === 'true') {
115
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
116
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
117
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
118
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
119
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
120
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
121
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
122
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 9 pts, 6 pts)', 1);
123
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
124
+ }
96
125
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
97
126
  /*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 correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
98
127
  listOrderingPage.steps.checkAnswer()
@@ -115,6 +144,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
115
144
  listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
116
145
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
117
146
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
147
+ if (alternativeAnswerCheck === 'true') {
148
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
149
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
150
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
151
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
152
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
153
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
154
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
155
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 9 pts, 6 pts)', 1);
156
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
157
+ }
118
158
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
119
159
  /*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 besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
120
160
  listOrderingPage.steps.checkAnswer();
@@ -138,6 +178,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
138
178
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
139
179
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
140
180
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
181
+ if (alternativeAnswerCheck === 'true') {
182
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
183
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
184
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
185
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
186
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
187
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
188
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
189
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 9 pts, 6 pts)', 1);
190
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
191
+ }
141
192
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
142
193
  /*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 should be displayed besides the correct answer responses, incorrect icon should be displayed beside incorrect responses correct/incorrect status message and correct answer section should not be displayed')
143
194
  listOrderingPage.steps.checkAnswer();
@@ -160,6 +211,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
160
211
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
161
212
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
162
213
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
214
+ if (alternativeAnswerCheck === 'true') {
215
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
216
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
217
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
218
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
219
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
220
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
221
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
222
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 9 pts, 6 pts)', 1);
223
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
224
+ }
163
225
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
164
226
  /*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 should be displayed besides the correct answer responses, incorrect icon should be displayed beside incorrect responses correct/incorrect status message and correct answer section should not be displayed')
165
227
  listOrderingPage.steps.checkAnswer();
@@ -182,6 +244,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
182
244
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
183
245
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
184
246
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
247
+ if (alternativeAnswerCheck === 'true') {
248
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
249
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
250
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
251
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
252
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
253
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
254
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
255
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 9 pts, 6 pts)', 1);
256
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
257
+ }
185
258
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
186
259
  /*cy.log('Race condition: When the user attempts the question with the common option between correct accordion and alternative accordion then on selecting the \'Check answer\' button the correct icon should be displayed beside the common option and incorrect should be displayed beside the incorrect responses, correct/incorrect status message and correct answer section should not be displayed')
187
260
  listOrderingPage.steps.checkAnswer();
@@ -204,6 +277,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
204
277
  listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
205
278
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
206
279
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
280
+ if (alternativeAnswerCheck === 'true') {
281
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
282
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
283
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
284
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
285
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
286
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
287
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
288
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 5 pts, 4 pts, 9 pts, 6 pts)', 1);
289
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
290
+ }
207
291
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
208
292
  /*cy.log('When user attempts the question incorrectly and clicks on the \'Check Answer\' button, then incorrect icons should be displayed beside all the options, correct/incorrect status message and correct answer section should not be displayed')
209
293
  listOrderingPage.steps.checkAnswer();
@@ -240,6 +324,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
240
324
  listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(4);
241
325
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(['sprout', 'plant', 'flower', 'seed', 'fruit'], ['2', '3', '4', '1', '5']);
242
326
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
327
+ if (alternativeAnswerCheck === 'true') {
328
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 24.5 pts, 1.5 pts, 4.5 pts, 1.5 pts, 3.5 pts)', 0);
329
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
330
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
331
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
332
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
333
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
334
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
335
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 22.5 pts, 6.5 pts, 1.5 pts, 1.5 pts, 3.5 pts)', 1);
336
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['1', '2', '3', '5', '4']);
337
+ }
243
338
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
244
339
  /*cy.log('Overachiever case: When the user has attempted the question with more number of correct options from the correct accordion than the alternative accordion, correct icons should be displayed for the alternative accordion response, incorrect icon should be displayed for the correct accordion options, correct/incorrect status message and correct answer section should not be displayed')
245
340
  listOrderingPage.steps.checkAnswer();
@@ -2,6 +2,7 @@ import { listOrderingPage } from "../../../../pages/listOrderingPage";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
 
4
4
  let options = ['sprout', 'plant', 'flower', 'seed'];
5
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
5
6
 
6
7
  describe('Create Item page - List ordering: Partial different weights scoring with alternative answer - When correct answer points are more than alternative answer points', () => {
7
8
  before(() => {
@@ -35,6 +36,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
35
36
  listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
36
37
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
37
38
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
39
+ if (alternativeAnswerCheck === 'true') {
40
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
41
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
42
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
43
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
44
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
45
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
46
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
47
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 2 pts, 9 pts, 3 pts, 6 pts)', 1);
48
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
49
+ }
38
50
  listOrderingPage.steps.verifyCorrectOptionIconsDropdownLayoutCorrectAnswersSection();
39
51
  });
40
52
 
@@ -49,6 +61,9 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
49
61
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
50
62
  listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
51
63
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
64
+ if (alternativeAnswerCheck === 'true') {
65
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
66
+ }
52
67
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
53
68
  /*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 besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
54
69
  listOrderingPage.steps.checkAnswer()
@@ -71,6 +86,9 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
71
86
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
72
87
  listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
73
88
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
89
+ if (alternativeAnswerCheck === 'true') {
90
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
91
+ }
74
92
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
75
93
  /*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 besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
76
94
  listOrderingPage.steps.checkAnswer();
@@ -93,6 +111,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
93
111
  listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
94
112
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
95
113
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
114
+ if (alternativeAnswerCheck === 'true') {
115
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
116
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
117
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
118
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
119
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
120
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
121
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
122
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 2 pts, 9 pts, 3 pts, 6 pts)', 1);
123
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
124
+ }
96
125
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
97
126
  /*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 correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
98
127
  listOrderingPage.steps.checkAnswer();
@@ -115,6 +144,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
115
144
  listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
116
145
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
117
146
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
147
+ if (alternativeAnswerCheck === 'true') {
148
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
149
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
150
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
151
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
152
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
153
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
154
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
155
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 2 pts, 9 pts, 3 pts, 6 pts)', 1);
156
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
157
+ }
118
158
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
119
159
  /*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 besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
120
160
  listOrderingPage.steps.checkAnswer();
@@ -137,6 +177,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
137
177
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
138
178
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
139
179
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
180
+ if (alternativeAnswerCheck === 'true') {
181
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
182
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
183
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
184
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
185
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
186
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
187
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
188
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 2 pts, 9 pts, 3 pts, 6 pts)', 1);
189
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
190
+ }
140
191
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
141
192
  /*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 should be displayed besides the correct answer responses, incorrect icon should be displayed beside incorrect responses correct/incorrect status message and correct answer section should not be displayed')
142
193
  listOrderingPage.steps.checkAnswer();
@@ -159,6 +210,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
159
210
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
160
211
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
161
212
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
213
+ if (alternativeAnswerCheck === 'true') {
214
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
215
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
216
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
217
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
218
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
219
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
220
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
221
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 2 pts, 9 pts, 3 pts, 6 pts)', 1);
222
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
223
+ }
162
224
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
163
225
  /*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 should be displayed besides the correct answer responses, incorrect icon should be displayed beside incorrect responses correct/incorrect status message and correct answer section should not be displayed')
164
226
  listOrderingPage.steps.checkAnswer();
@@ -181,6 +243,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
181
243
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
182
244
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
183
245
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
246
+ if (alternativeAnswerCheck === 'true') {
247
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
248
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
249
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
250
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
251
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
252
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
253
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
254
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 2 pts, 9 pts, 3 pts, 6 pts)', 1);
255
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
256
+ }
184
257
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
185
258
  /*cy.log('Race condition: When the user attempts the question with the common option between correct accordion and alternative accordion then on selecting the \'Check answer\' button the correct icon should be displayed beside the common option and incorrect should be displayed beside the incorrectly ordered options, correct/incorrect status message and correct answer section should not be displayed')
186
259
  listOrderingPage.steps.checkAnswer();
@@ -203,6 +276,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
203
276
  listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
204
277
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['2', '3', '4', '1']);
205
278
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
279
+ if (alternativeAnswerCheck === 'true') {
280
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 5 pts, 4 pts, 8 pts, 7 pts)', 0);
281
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
282
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
283
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
284
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
285
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
286
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
287
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 2 pts, 9 pts, 3 pts, 6 pts)', 1);
288
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['3', '4', '2', '1']);
289
+ }
206
290
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
207
291
  /*cy.log('When user attempts the question incorrectly and clicks on the \'Check Answer\' button, then incorrect icons should be displayed beside all the options, correct/incorrect status message and correct answer section should not be displayed')
208
292
  listOrderingPage.steps.checkAnswer();
@@ -237,6 +321,17 @@ describe('Create Item page - List ordering: Partial different weights scoring wi
237
321
  listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(4);
238
322
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(['sprout', 'plant', 'flower', 'seed', 'fruit'], ['2', '3', '4', '1', '5']);
239
323
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
324
+ if (alternativeAnswerCheck === 'true') {
325
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response in order of appearance - 24.5 pts, 1.5 pts, 4.5 pts, 1.5 pts, 3.5 pts)', 0);
326
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
327
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
328
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
329
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
330
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
331
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
332
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response in order of appearance - 14.5 pts, 2.5 pts, 1.5 pts, 2.5 pts, 3.5 pts)', 1);
333
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['1', '2', '3', '5', '4']);
334
+ }
240
335
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
241
336
  /*cy.log('Overachiever case: When the user has attempted the question with more number of correct options from the correct accordion than the alternative accordion, correct icons should be displayed for the alternative accordion response, incorrect icon should be displayed for the correct accordion options, correct/incorrect status message and correct answer section should not be displayed')
242
337
  listOrderingPage.steps.checkAnswer();
@@ -1,6 +1,7 @@
1
1
  import { listOrderingPage } from "../../../../pages/listOrderingPage";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
 
4
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
4
5
  let options = ['sprout', 'plant', 'flower', 'seed'];
5
6
 
6
7
  describe('Create Item page - List ordering: Partial equal weights scoring with alternative answer - When alternative answer points are more than correct answer points', () => {
@@ -35,6 +36,17 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
35
36
  listOrderingPage.steps.verifyCorrectIncorrectOptionIconDropdownLayoutNotExists(3);
36
37
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
37
38
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
39
+ if (alternativeAnswerCheck === 'true') {
40
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 6 pts)', 0);
41
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
42
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
43
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
44
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
45
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
46
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
47
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
48
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
49
+ }
38
50
  });
39
51
 
40
52
  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 full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
@@ -48,6 +60,9 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
48
60
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
49
61
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
50
62
  listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
63
+ if (alternativeAnswerCheck === 'true') {
64
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
65
+ }
51
66
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
52
67
  /*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 besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
53
68
  listOrderingPage.steps.checkAnswer();
@@ -70,6 +85,9 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
70
85
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
71
86
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
72
87
  listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
88
+ if (alternativeAnswerCheck === 'true') {
89
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
90
+ }
73
91
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
74
92
  /*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 besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
75
93
  listOrderingPage.steps.checkAnswer();
@@ -92,6 +110,17 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
92
110
  listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
93
111
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
94
112
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
113
+ if (alternativeAnswerCheck === 'true') {
114
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 6 pts)', 0);
115
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
116
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
117
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
118
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
119
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
120
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
121
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
122
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
123
+ }
95
124
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
96
125
  /*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 correct icon should be displayed besides the correct answer responses, a status message should not be displayed and correct answer section should not be displayed')
97
126
  listOrderingPage.steps.checkAnswer();
@@ -114,6 +143,17 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
114
143
  listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
115
144
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
116
145
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
146
+ if (alternativeAnswerCheck === 'true') {
147
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 6 pts)', 0);
148
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
149
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
150
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
151
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
152
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
153
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
154
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
155
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
156
+ }
117
157
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
118
158
  /*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 besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
119
159
  listOrderingPage.steps.checkAnswer();
@@ -136,6 +176,17 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
136
176
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
137
177
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
138
178
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
179
+ if (alternativeAnswerCheck === 'true') {
180
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 6 pts)', 0);
181
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
182
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
183
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
184
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
185
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
186
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
187
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
188
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
189
+ }
139
190
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
140
191
  /*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 should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses a status message should not be displayed and correct answer section should not be displayed')
141
192
  listOrderingPage.steps.checkAnswer();
@@ -158,6 +209,17 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
158
209
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
159
210
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
160
211
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
212
+ if (alternativeAnswerCheck === 'true') {
213
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 6 pts)', 0);
214
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
215
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
216
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
217
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
218
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
219
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
220
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
221
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
222
+ }
161
223
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
162
224
  /*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 should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
163
225
  listOrderingPage.steps.checkAnswer();
@@ -180,6 +242,17 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
180
242
  listOrderingPage.steps.verifyIncorrectOptionIconDropdownLayout(3);
181
243
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '4', '2', '1']);
182
244
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
245
+ if (alternativeAnswerCheck === 'true') {
246
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 6 pts)', 0);
247
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
248
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
249
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
250
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
251
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
252
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
253
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 5 pts)', 1);
254
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
255
+ }
183
256
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
184
257
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
185
258
  listOrderingPage.steps.checkAnswer();
@@ -211,6 +284,17 @@ describe('Create Item page - List ordering: Partial equal weights scoring with a
211
284
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
212
285
  listOrderingPage.steps.verifyOptionsPositionInCorrectAnswerSection(options, ['3', '1', '2', '4']);
213
286
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
287
+ if (alternativeAnswerCheck === 'true') {
288
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(Points per response - 12.5 pts)', 0);
289
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
290
+ listOrderingPage.steps.disableShowAlternativeAnswersToggle();
291
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
292
+ listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
293
+ listOrderingPage.steps.clickShowAlternativeAnswersToggle();
294
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
295
+ listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(Points per response - 2.5 pts)', 1);
296
+ listOrderingPage.steps.verifyOptionsPositionInAlternativeAnswerSection(1, options, ['2', '3', '4', '1']);
297
+ }
214
298
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
215
299
  /*cy.log('Overachiever case: When the user attempts the question with more number of correct responses from the correct accordion than the alternative accordion and clicks on \'Check answer\' button, correct icons should be displayed for the alternative accordion response, incorrect icon should be displayed for the correct accordion responses, correct/incorrect status message and correct answer section should not be displayed')
216
300
  listOrderingPage.steps.checkAnswer();
@@ -2,6 +2,7 @@ import { listOrderingPage } from "../../../../pages/listOrderingPage";
2
2
  import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
3
  let options = ['sprout', 'plant', 'flower', 'seed'];
4
4
  let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
5
+ const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
5
6
 
6
7
  describe('Create Item page - List ordering: Partial equal weights', () => {
7
8
  before(() => {
@@ -87,6 +88,9 @@ describe('Create Item page - List ordering: Partial equal weights', () => {
87
88
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(2);
88
89
  listOrderingPage.steps.verifyCorrectOptionIconDropdownLayout(3);
89
90
  listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
91
+ if (alternativeAnswerCheck === 'true') {
92
+ listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
93
+ }
90
94
  listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
91
95
  listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
92
96
  /*cy.log('When user attempts the question correctly and clicks on the \'Check Answer\' button, then correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed')