itemengine-cypress-automation 1.0.128 → 1.0.131-updateILCrepo6March-02c78d1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +210 -0
  2. package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +91 -0
  3. package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +392 -0
  4. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -1
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
  6. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
  7. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -1
  8. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -0
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +152 -0
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +196 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +195 -0
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +288 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +141 -0
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +245 -0
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +413 -0
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +218 -0
  17. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +245 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +163 -0
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
  21. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
  22. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +83 -0
  23. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +653 -0
  24. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +180 -0
  25. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabScoringSection.js +229 -0
  26. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +90 -0
  27. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/switchingCasesBetweenOptionsLayout.js +50 -0
  28. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +204 -0
  29. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +204 -0
  30. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +298 -0
  31. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingPenaltyScoring.js +63 -0
  32. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +111 -0
  33. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +231 -0
  34. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsBasic.js +90 -0
  35. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
  36. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +232 -0
  37. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +231 -0
  38. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsBasic.js +138 -0
  39. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +213 -0
  40. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +186 -0
  41. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
  42. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +161 -0
  43. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +328 -0
  44. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +144 -0
  45. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabScoringSection.js +250 -0
  46. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +75 -0
  47. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  48. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +74 -0
  49. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +188 -0
  50. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +8 -8
  51. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
  52. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +4 -2
  53. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -52
  54. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +3 -211
  55. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +39 -3
  56. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -8
  57. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
  58. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -50
  59. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +325 -0
  60. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +1 -146
  61. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
  62. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +78 -0
  63. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +265 -0
  64. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +75 -0
  65. package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  66. package/cypress/e2e/ILC/FillInTheGapsTextNew/responseAnswersAndAcceptedStudentInput.js +56 -0
  67. package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +40 -2
  68. package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +249 -0
  69. package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +64 -0
  70. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +128 -0
  71. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +889 -0
  72. package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +168 -0
  73. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +203 -0
  74. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +222 -0
  75. package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +349 -0
  76. package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +132 -0
  77. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +35 -7
  78. package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +213 -0
  79. package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +41 -0
  80. package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +377 -0
  81. package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +161 -0
  82. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +250 -0
  83. package/cypress/e2e/migration/migration.js +4 -41
  84. package/cypress/e2e/migration/migration10.js +6 -43
  85. package/cypress/e2e/migration/migration2.js +6 -43
  86. package/cypress/e2e/migration/migration3.js +6 -43
  87. package/cypress/e2e/migration/migration4.js +6 -43
  88. package/cypress/e2e/migration/migration5.js +6 -43
  89. package/cypress/e2e/migration/migration6.js +6 -43
  90. package/cypress/e2e/migration/migration7.js +6 -43
  91. package/cypress/e2e/migration/migration8.js +6 -43
  92. package/cypress/e2e/migration/migration9.js +6 -43
  93. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  94. package/cypress/fixtures/theme/ilc.json +6 -1
  95. package/cypress/fixtures/uploadResponseFileType.js +5 -0
  96. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -13
  97. package/cypress/pages/components/customizeSpecialCharacterComponent.js +24 -6
  98. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  99. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +42 -4
  100. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +149 -5
  101. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +954 -77
  102. package/cypress/pages/components/questionInputFieldComponent.js +1 -1
  103. package/cypress/pages/components/questionInstructionsComponent.js +2 -1
  104. package/cypress/pages/contentBlocksPage.js +515 -0
  105. package/cypress/pages/drawingResponsePage.js +2 -2
  106. package/cypress/pages/fillInTheGapsDragAndDropPage.js +359 -3
  107. package/cypress/pages/fillInTheGapsDropdownPage.js +21 -1
  108. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +5 -57
  109. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -24
  110. package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -435
  111. package/cypress/pages/fillInTheGapsTextPage.js +9 -2
  112. package/cypress/pages/graphingPage.js +484 -0
  113. package/cypress/pages/index.js +4 -1
  114. package/cypress/pages/simpleCalculatorPage.js +310 -0
  115. package/cypress/pages/uploadResponsePage.js +260 -92
  116. package/cypress/support/commands.js +33 -1
  117. package/package.json +2 -2
  118. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +0 -242
  119. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +0 -99
  120. package/cypress/e2e/ILC/Passage/passageEditTab.js +0 -241
  121. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +0 -73
  122. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +0 -246
@@ -0,0 +1,265 @@
1
+ import { fillInTheGapsTextPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('Create item page - Fill in the gaps with text: Scoring section', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Scoring section contents', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
15
+ cy.barsPreLoaderWait();
16
+ });
17
+
18
+ fillInTheGapsTextPage.tests.verifyScoringTypeLabelAndDropdown('Auto scored');
19
+
20
+ fillInTheGapsTextPage.tests.verifyScoringSubtypeContentsForMultipleResponseTypeQuestion();
21
+ });
22
+
23
+ describe('Auto scored: All or nothing scoring - Scoring section', () => {
24
+ abortEarlySetup();
25
+ before(() => {
26
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
27
+ cy.barsPreLoaderWait();
28
+ });
29
+
30
+ it('When the user has selected \'All or nothing\' scoring subtype, minimum scoring dropdown should be displayed in the scoring section', () => {
31
+ fillInTheGapsTextPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
32
+ });
33
+ });
34
+
35
+ describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
36
+ abortEarlySetup();
37
+ before(() => {
38
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
39
+ cy.barsPreLoaderWait();
40
+ });
41
+
42
+ fillInTheGapsTextPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
43
+
44
+ fillInTheGapsTextPage.tests.verifyPointsLabelAndInputField();
45
+ });
46
+
47
+ describe('Auto scored: Partial - equal weights scoring - Scoring section', () => {
48
+ abortEarlySetup();
49
+ before(() => {
50
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
51
+ cy.barsPreLoaderWait();
52
+ });
53
+
54
+ it('User should be able to select \'Partial - equal weights\' scoring type', () => {
55
+ fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
56
+ });
57
+
58
+ it('When the user has switched to \'Partial - equal weights\' scoring, then \'Penalty scoring\', \'Minimum scoring\' and \'Rounding\' label and dropdown should be displayed in the \'Scoring\' section, \'Round negative scores to zero\' label and checkbox should not be displayed in the \'Scoring\' section', () => {
59
+ fillInTheGapsTextPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
60
+ fillInTheGapsTextPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
61
+ fillInTheGapsTextPage.steps.verifyRoundingLabelAndDropdownDefaultState();
62
+ utilities.verifyElementVisibilityState(fillInTheGapsTextPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
63
+ });
64
+ });
65
+
66
+ describe('Auto scored: Partial - equal weights scoring - Specify correct answer section', () => {
67
+ abortEarlySetup();
68
+ before(() => {
69
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
70
+ cy.barsPreLoaderWait();
71
+ fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
72
+ });
73
+
74
+ fillInTheGapsTextPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
75
+
76
+ it('When no points are entered in the points input field, then points per response should not be displayed on the response accordion', () => {
77
+ utilities.verifyElementVisibilityState(fillInTheGapsTextPage.responseAccordionPointsWrapper(), 'hidden');
78
+ });
79
+
80
+ it('When the user gives a score input to \'Points\' input field, then the score should be equally divided and displayed on each response tab with a \'Points:\' label', () => {
81
+ fillInTheGapsTextPage.steps.allotPoints(4);
82
+ fillInTheGapsTextPage.steps.verifyPointsDisplayedOnResponseAccordion(0, 2);
83
+ fillInTheGapsTextPage.steps.verifyPointsDisplayedOnResponseAccordion(1, 2);
84
+ });
85
+
86
+ it('When the user adds one more response area, then points per response should get updated accordingly', () => {
87
+ fillInTheGapsTextPage.steps.addResponseArea();
88
+ fillInTheGapsTextPage.steps.verifyPointsDisplayedOnResponseAccordion(0, 1.33);
89
+ fillInTheGapsTextPage.steps.verifyPointsDisplayedOnResponseAccordion(1, 1.33);
90
+ fillInTheGapsTextPage.steps.verifyPointsDisplayedOnResponseAccordion(2, 1.33);
91
+ });
92
+
93
+ it('When the user deletes a response token, then points per response should get updated accordingly', () => {
94
+ fillInTheGapsTextPage.steps.deleteAResponseArea(0);
95
+ fillInTheGapsTextPage.steps.verifyPointsDisplayedOnResponseAccordion(0, 2);
96
+ fillInTheGapsTextPage.steps.verifyPointsDisplayedOnResponseAccordion(1, 2);
97
+ });
98
+
99
+ it('When user adds an alternate answer field in a response accordion, then the points per response accordion should not be updated', () => {
100
+ fillInTheGapsTextPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
101
+ fillInTheGapsTextPage.steps.addAlternateAnswerInResponseAccordion(0);
102
+ fillInTheGapsTextPage.steps.verifyPointsDisplayedOnResponseAccordion(0, 2);
103
+ fillInTheGapsTextPage.steps.verifyPointsDisplayedOnResponseAccordion(1, 2);
104
+ });
105
+
106
+ it('When the user switches to \'All or nothing\' scoring, then the points on each response accordion should not be displayed and the points displayed in \'Points\' input field should remain unchanged', () => {
107
+ fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('All or nothing');
108
+ utilities.verifyElementVisibilityState(fillInTheGapsTextPage.responseAccordionPointsWrapper(), 'notExist');
109
+ fillInTheGapsTextPage.steps.verifyPointsFieldValue(4);
110
+ });
111
+
112
+ it('When the user updates the entered points in \'All or nothing\' scoring type and switches to \'Partial equal weights\' scoring type, then the points should be equally divided and displayed on each response accordion', () => {
113
+ fillInTheGapsTextPage.steps.allotPoints(9);
114
+ fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
115
+ fillInTheGapsTextPage.steps.verifyPointsDisplayedOnResponseAccordion(0, 4.5);
116
+ fillInTheGapsTextPage.steps.verifyPointsDisplayedOnResponseAccordion(1, 4.5);
117
+ });
118
+
119
+ it('CSS of \'Points:\' label and its displayed score', { tags: 'css' }, () => {
120
+ utilities.verifyCSS(fillInTheGapsTextPage.responseAccordionPointsLabel(), {
121
+ 'color': css.color.labels,
122
+ 'font-size': css.fontSize.normal,
123
+ 'font-weight': css.fontWeight.semibold
124
+ });
125
+ utilities.verifyCSS(fillInTheGapsTextPage.responseAccordionPointsScore(), {
126
+ 'color': css.color.text,
127
+ 'font-size': css.fontSize.default,
128
+ 'font-weight': css.fontWeight.regular
129
+ });
130
+ });
131
+ });
132
+
133
+ describe('Auto scored: Partial - different weights scoring - Scoring section', () => {
134
+ abortEarlySetup();
135
+ before(() => {
136
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
137
+ cy.barsPreLoaderWait();
138
+ });
139
+
140
+ it('User should be able to select \'Partial - different weights\' scoring', () => {
141
+ fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
142
+ });
143
+
144
+ it('When the user has switched to \'Partial - different weights\' scoring, then \'Penalty scoring\', \'Minimum scoring\' and \'Rounding\' labels and dropdowns, \'Round negative scores to zero\' label and checkbox should not be displayed in the \'Scoring\' section', () => {
145
+ fillInTheGapsTextPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
146
+ fillInTheGapsTextPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
147
+ fillInTheGapsTextPage.steps.verifyRoundingLabelAndDropdownDefaultState();
148
+ utilities.verifyElementVisibilityState(fillInTheGapsTextPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
149
+ });
150
+ });
151
+
152
+ describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
153
+ abortEarlySetup();
154
+ before(() => {
155
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
156
+ cy.barsPreLoaderWait();
157
+ fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
158
+ });
159
+
160
+ fillInTheGapsTextPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
161
+
162
+ it('When the user has switched to \'Partial - different weights\' scoring, then the correct answer tab points input field should not be displayed and individual empty points input field should be displayed in each response accordion', () => {
163
+ utilities.verifyElementCount(fillInTheGapsTextPage.pointsInputField(), 2);
164
+ fillInTheGapsTextPage.steps.verifyPointsLabelAndInputFieldInResponseAccordion(0, '');
165
+ fillInTheGapsTextPage.steps.verifyPointsLabelAndInputFieldInResponseAccordion(1, '');
166
+ });
167
+
168
+ it('User should be able to set points in the \'Points\' input fields', () => {
169
+ fillInTheGapsTextPage.steps.allotPointsInResponseAccordion(0, 1);
170
+ fillInTheGapsTextPage.steps.allotPointsInResponseAccordion(1, 3);
171
+ fillInTheGapsTextPage.steps.verifyPointsLabelAndInputFieldInResponseAccordion(0, 1);
172
+ fillInTheGapsTextPage.steps.verifyPointsLabelAndInputFieldInResponseAccordion(1, 3);
173
+ });
174
+
175
+ it('CSS of \'Points\' label and \'Points\' input field in response accordion', { tags: 'css' }, () => {
176
+ utilities.verifyCSS(utilities.getNthElement(fillInTheGapsTextPage.pointsLabel(), 0), {
177
+ 'color': css.color.labels,
178
+ 'font-size': css.fontSize.normal,
179
+ 'font-weight': css.fontWeight.semibold
180
+ });
181
+ utilities.verifyCSS(utilities.getNthElement(fillInTheGapsTextPage.pointsInputField(), 0), {
182
+ 'color': css.color.text,
183
+ 'font-size': css.fontSize.default,
184
+ 'font-weight': css.fontWeight.regular
185
+ });
186
+ });
187
+
188
+ it('When the user switches to \'All or nothing\' scoring, the points added for individual responses in Partial - different weights scoring should get summed up in the \'All or nothing scoring\' points input field', () => {
189
+ fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('All or nothing');
190
+ fillInTheGapsTextPage.steps.verifyPointsFieldValue(4);
191
+ });
192
+
193
+ it('When the user updates the entered points in \'All or nothing\' scoring type and switches to \'Partial different weights\' scoring type, then the points should be equally divided and displayed besides each correct option', () => {
194
+ fillInTheGapsTextPage.steps.allotPoints(9);
195
+ fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
196
+ fillInTheGapsTextPage.steps.verifyPointsLabelAndInputFieldInResponseAccordion(0, 4.5);
197
+ fillInTheGapsTextPage.steps.verifyPointsLabelAndInputFieldInResponseAccordion(1, 4.5);
198
+ });
199
+ });
200
+
201
+ describe('Manually scored scoring - Scoring section', () => {
202
+ abortEarlySetup();
203
+ before(() => {
204
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
205
+ cy.barsPreLoaderWait();
206
+ });
207
+
208
+ it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
209
+ fillInTheGapsTextPage.steps.expandScoringTypeDropdown();
210
+ fillInTheGapsTextPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
211
+ });
212
+
213
+ it('When the user has selected \'Manually scored\' scoring type, then the specify correct answer section should not be displayed', () => {
214
+ utilities.verifyElementVisibilityState(fillInTheGapsTextPage.specifyCorrectAnswerLabel(), 'notExist');
215
+ utilities.verifyElementVisibilityState(fillInTheGapsTextPage.specifyCorrectAnswerSectionWrapper(), 'notExist');
216
+ });
217
+
218
+ fillInTheGapsTextPage.tests.verifyScoringSectionContentsForManuallyScoredScoringType();
219
+
220
+ fillInTheGapsTextPage.tests.verifyPointsFieldErrorState();
221
+
222
+ it('When user has selected \'Manually scored\' scoring type, then in scoring section \'Minimum scoring\' label and dropdown should be visible', () => {
223
+ fillInTheGapsTextPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
224
+ });
225
+ });
226
+
227
+ describe('Non scored scoring - Scoring section', () => {
228
+ abortEarlySetup();
229
+ before(() => {
230
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
231
+ cy.barsPreLoaderWait();
232
+ });
233
+
234
+ it('User should be able to select \'Non scored\' scoring type from scoring type dropdown', () => {
235
+ fillInTheGapsTextPage.steps.expandScoringTypeDropdown();
236
+ fillInTheGapsTextPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
237
+ });
238
+
239
+ fillInTheGapsTextPage.tests.verifyScoringSectionContentsForNonScoredScoringType();
240
+ });
241
+
242
+ describe('Non scored scoring - Specify correct answer section', () => {
243
+ abortEarlySetup();
244
+ before(() => {
245
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
246
+ cy.barsPreLoaderWait();
247
+ fillInTheGapsTextPage.steps.expandScoringTypeDropdown();
248
+ fillInTheGapsTextPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
249
+ });
250
+
251
+ fillInTheGapsTextPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
252
+
253
+ fillInTheGapsTextPage.tests.verifyPointsLabelAndInputFieldForNonScoredScoringType();
254
+ });
255
+
256
+ describe('Conditional checkboxes - Content', () => {
257
+ abortEarlySetup();
258
+ before(() => {
259
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
260
+ cy.barsPreLoaderWait();
261
+ });
262
+
263
+ fillInTheGapsTextPage.tests.verifyConditionalCheckboxesSectionContents();
264
+ });
265
+ });
@@ -0,0 +1,75 @@
1
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
2
+ import { dialogBoxBase, fillInTheGapsTextPage } from "../../../pages";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const options = ['Flower', 'Leaves'];
5
+
6
+ describe('Create item page - Fill in the gaps with text: Header section and saving question', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Header section contents', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
15
+ cy.barsPreLoaderWait();
16
+ });
17
+
18
+ fillInTheGapsTextPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Fill in the gaps with text');
19
+ });
20
+
21
+ describe('Tabs section', () => {
22
+ abortEarlySetup();
23
+ before(() => {
24
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
25
+ cy.barsPreLoaderWait();
26
+ });
27
+
28
+ fillInTheGapsTextPage.tests.verifyTabsSection();
29
+ });
30
+
31
+ describe('Cancel button', () => {
32
+ abortEarlySetup();
33
+ before(() => {
34
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
35
+ cy.barsPreLoaderWait();
36
+ });
37
+
38
+ fillInTheGapsTextPage.tests.verifyCancelButton('fill in the gaps with text')
39
+ });
40
+
41
+ describe('Save Question button', () => {
42
+ abortEarlySetup();
43
+ before(() => {
44
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
45
+ cy.barsPreLoaderWait();
46
+ });
47
+
48
+ describe('Validation error messages', () => {
49
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
50
+
51
+ it('Validation error messages should be displayed below required input fields', () => {
52
+ fillInTheGapsTextPage.steps.verifyQuestionInstructionsErrorMessage();
53
+ fillInTheGapsTextPage.steps.verifyPointsFieldErrorMessage();
54
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsTextPage.errorMessage(), 2), 'Error: Answer is required.');
55
+ });
56
+
57
+ it('Validation error messages should disappear when required input fields are filled', () => {
58
+ fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('Question instruction');
59
+ fillInTheGapsTextPage.steps.allotPoints(10);
60
+ fillInTheGapsTextPage.steps.verifyErrorMessageIsNotDisplayed();
61
+ fillInTheGapsTextPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
62
+ });
63
+
64
+ fillInTheGapsTextPage.tests.verifyCreateItemWrapperContentsA11y();
65
+ });
66
+
67
+ describe('Saving a question', () => {
68
+ it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
69
+ fillInTheGapsTextPage.steps.saveAQuestionAndVerifySnackbar();
70
+ });
71
+
72
+ fillInTheGapsTextPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
73
+ });
74
+ });
75
+ });
@@ -0,0 +1,194 @@
1
+ import { fillInTheGapsTextPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+ const penaltyScoringTypeArray = ['No penalty points', 'Penalty points for the entire question', 'Penalty points for each incorrect text container'];
6
+
7
+ describe('Create item page - Fill in the gaps with text: Minimum scoring, Penalty scoring, Rounding - Edit tab', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Scoring section: Minimum scoring - Edit tab', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
16
+ cy.barsPreLoaderWait();
17
+ fillInTheGapsTextPage.steps.allotPoints(10);
18
+ });
19
+
20
+ fillInTheGapsTextPage.tests.verifyMinimumScoringDropdown();
21
+
22
+ fillInTheGapsTextPage.tests.verifyMinimumPointsLabelAndInputField();
23
+
24
+ fillInTheGapsTextPage.tests.verifyMinimumPointsFieldErrorState();
25
+ });
26
+
27
+ describe('Scoring section: Penalty scoring - Edit tab', () => {
28
+ abortEarlySetup();
29
+ before(() => {
30
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
31
+ cy.barsPreLoaderWait();
32
+ fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
33
+ fillInTheGapsTextPage.steps.allotPoints(10);
34
+ });
35
+
36
+ fillInTheGapsTextPage.tests.verifyPenaltyScoringDropdown(penaltyScoringTypeArray);
37
+
38
+ fillInTheGapsTextPage.tests.verifyPenaltyPointsLabelAndInputField();
39
+
40
+ fillInTheGapsTextPage.tests.verifyPenaltyPointsErrorState();
41
+
42
+ it('When the user selects \'Penalty points for each incorrect text container\' from the penalty scoring dropdown, \'Automatically set penalty for each incorrect text container to total points / no. of incorrect text container\' label and checkbox should be displayed, by default the checkbox should be unchecked. Two radio buttons with labels - \'Specify total penalty points\' and \'Specify points for each incorrect text container\' should be displayed. By default, \'Specify total penalty points\' radio button should be checked', () => {
43
+ fillInTheGapsTextPage.steps.expandPenaltyScoringDropdown();
44
+ fillInTheGapsTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect text container');
45
+ utilities.verifyInnerText(fillInTheGapsTextPage.automaticallySetPenaltyPointsCheckboxLabel(), 'Automatically set penalty for each incorrect text container to total points / no. of incorrect text container');
46
+ utilities.verifyInnerText(fillInTheGapsTextPage.specifyTotalPenaltyPointsRadioButtonLabel(), 'Specify total penalty points');
47
+ utilities.verifyInnerText(fillInTheGapsTextPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), 'Specify points for each incorrect text container');
48
+ fillInTheGapsTextPage.steps.verifyAutomaticallySetPenaltyPointsCheckboxUncheckedState();
49
+ fillInTheGapsTextPage.steps.verifySpecifyTotalPenaltyPointsRadioButtonCheckedState();
50
+ fillInTheGapsTextPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonUncheckedState();
51
+ });
52
+
53
+ it('When \'Specify total penalty points\' is selected, a penalty points detail section with \'Total penalty points\' label and empty input field, \'Penalty points for each incorrect text container: -\' label should be displayed', () => {
54
+ utilities.verifyInnerText(fillInTheGapsTextPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Total penalty points');
55
+ fillInTheGapsTextPage.steps.verifyTotalPenaltyPointsValue('');
56
+ utilities.verifyInnerText(fillInTheGapsTextPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect text container: -');
57
+ });
58
+
59
+ it('When the user allots total penalty points, then \'points for each incorrect text container\' should get updated as per the count of incorrect options available', () => {
60
+ fillInTheGapsTextPage.steps.allotTotalPenaltyPoints(5);
61
+ fillInTheGapsTextPage.steps.verifyPenaltyPointsForEachIncorrectTextContainer(2.5);
62
+ });
63
+
64
+ it('When the user adds a new option, then \'points for each incorrect text container\' should get updated accordingly', () => {
65
+ fillInTheGapsTextPage.steps.addResponseArea();
66
+ fillInTheGapsTextPage.steps.verifyPenaltyPointsForEachIncorrectTextContainer(1.67);
67
+ });
68
+
69
+ it('When the user deletes an option, then \'points for each incorrect text container\' should get updated accordingly', () => {
70
+ fillInTheGapsTextPage.steps.deleteAResponseArea(0);
71
+ fillInTheGapsTextPage.steps.verifyPenaltyPointsForEachIncorrectTextContainer(2.5);
72
+ });
73
+
74
+ it('CSS of the penalty points section - Total penalty points', { tags: 'css' }, () => {
75
+ utilities.verifyCSS(fillInTheGapsTextPage.automaticallySetPenaltyPointsCheckboxLabel(), {
76
+ 'color': css.color.labelText,
77
+ 'font-size': css.fontSize.normal,
78
+ 'font-weight': css.fontWeight.regular
79
+ });
80
+ utilities.verifyCSS(fillInTheGapsTextPage.automaticallySetPenaltyPointsCheckbox().parent().find('svg'), {
81
+ 'fill': css.color.uncheckedCheckbox
82
+ });
83
+ utilities.verifyCSS(fillInTheGapsTextPage.specifyTotalPenaltyPointsRadioButton().parent().find('svg'), {
84
+ 'fill': css.color.activeButtons
85
+ });
86
+ utilities.verifyCSS(fillInTheGapsTextPage.specifyPointsForEachIncorrectOptionRadioButton().parent().find('svg path'), {
87
+ 'fill': css.color.uncheckedCheckbox
88
+ });
89
+ utilities.verifyCSS(fillInTheGapsTextPage.specifyTotalPenaltyPointsRadioButtonLabel(), {
90
+ 'color': css.color.labelText,
91
+ 'font-size': css.fontSize.normal,
92
+ 'font-weight': css.fontWeight.regular
93
+ });
94
+ utilities.verifyCSS(fillInTheGapsTextPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), {
95
+ 'color': css.color.labelText,
96
+ 'font-size': css.fontSize.normal,
97
+ 'font-weight': css.fontWeight.regular
98
+ });
99
+ utilities.verifyCSS(fillInTheGapsTextPage.penaltyPointsDetailsSectionInputFieldLabel(), {
100
+ 'color': css.color.labels,
101
+ 'font-size': css.fontSize.normal,
102
+ 'font-weight': css.fontWeight.regular
103
+ });
104
+ utilities.verifyCSS(fillInTheGapsTextPage.totalPenaltyPointsInputField(), {
105
+ 'color': css.color.text,
106
+ 'font-size': css.fontSize.default,
107
+ 'font-weight': css.fontWeight.regular
108
+ });
109
+ utilities.verifyCSS(fillInTheGapsTextPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
110
+ 'color': css.color.labels,
111
+ 'font-size': css.fontSize.normal,
112
+ 'font-weight': css.fontWeight.regular
113
+ });
114
+ });
115
+
116
+ it('Accessibility of the penalty points section - Total penalty points', { tags: 'a11y' }, () => {
117
+ cy.checkAccessibility(fillInTheGapsTextPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
118
+ });
119
+
120
+ it('When the user selects \'Specify points for each incorrect answer\', a penalty points detail section with \'Penalty points for each incorrect text container:\' label and empty input field, \'Total penalty points: -\' label should be displayed', () => {
121
+ cy.log('Pre-step: Clearing the total penalty points input field')
122
+ fillInTheGapsTextPage.steps.clearTotalPenaltyPointsInputField();
123
+ fillInTheGapsTextPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify points for each incorrect option');
124
+ utilities.verifyInnerText(fillInTheGapsTextPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Penalty points for each incorrect text container');
125
+ fillInTheGapsTextPage.steps.verifyPenaltyPointsForEachIncorrectTextContainerValue('');
126
+ utilities.verifyInnerText(fillInTheGapsTextPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Total penalty points: -');
127
+ });
128
+
129
+ it('When the user allots Penalty points for each incorrect text container, then \'Total penalty points\' should get updated as per the count of incorrect options available', () => {
130
+ fillInTheGapsTextPage.steps.allotPenaltyPointsForEachIncorrectTextContainer(1);
131
+ fillInTheGapsTextPage.steps.verifyTotalPenaltyPoints(2);
132
+ });
133
+
134
+ it('When the user adds a new option, then \'Total penalty points\' should get updated accordingly', () => {
135
+ fillInTheGapsTextPage.steps.addResponseArea();
136
+ fillInTheGapsTextPage.steps.verifyTotalPenaltyPoints(3);
137
+ });
138
+
139
+ it('When the user deletes an option, then \'points for each incorrect text container\' should get updated accordingly', () => {
140
+ fillInTheGapsTextPage.steps.deleteAResponseArea(0);
141
+ fillInTheGapsTextPage.steps.verifyTotalPenaltyPoints(2);
142
+ });
143
+
144
+ it('CSS of the penalty points section - Penalty points for each incorrect text container', { tags: 'css' }, () => {
145
+ utilities.verifyCSS(fillInTheGapsTextPage.penaltyPointsDetailsSectionInputFieldLabel(), {
146
+ 'color': css.color.labels,
147
+ 'font-size': css.fontSize.normal,
148
+ 'font-weight': css.fontWeight.regular
149
+ });
150
+ utilities.verifyCSS(fillInTheGapsTextPage.penaltyPointsForEachIncorrectTextContainerInputField(), {
151
+ 'color': css.color.text,
152
+ 'font-size': css.fontSize.default,
153
+ 'font-weight': css.fontWeight.regular
154
+ });
155
+ utilities.verifyCSS(fillInTheGapsTextPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
156
+ 'color': css.color.labels,
157
+ 'font-size': css.fontSize.normal,
158
+ 'font-weight': css.fontWeight.regular
159
+ });
160
+ });
161
+
162
+ it('Accessibility of the penalty points section - Penalty points for each incorrect text container', { tags: 'a11y' }, () => {
163
+ cy.checkAccessibility(fillInTheGapsTextPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
164
+ });
165
+
166
+ it('When the user switches to the \'Specify total penalty points\' option, the total penalty points input field should be filled as per the total penalty points in \'Specify points for each incorrect text container\'', () => {
167
+ fillInTheGapsTextPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify total penalty points');
168
+ fillInTheGapsTextPage.steps.verifyTotalPenaltyPointsValue(2);
169
+ utilities.verifyInnerText(fillInTheGapsTextPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect text container: 1');
170
+ });
171
+
172
+ it('When the user checks the \'Automatically set penalty for each incorrect text container to total points / no. of incorrect text containers\' checkbox, both radio buttons should get disabled, \'Specify points for each incorrect text container\' should get checked, in the penalty points details section, \'Penalty points for each incorrect text container: #\' and \'Total penalty points: #\' should be displayed as per the alloted points and available incorrect options', () => {
173
+ fillInTheGapsTextPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
174
+ fillInTheGapsTextPage.steps.verifySpecifyTotalPenaltyPointsDisabledState();
175
+ fillInTheGapsTextPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonSelectedAndDisabledState();
176
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsTextPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 0), 'Penalty points for each incorrect text container: 5');
177
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsTextPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 1), 'Total penalty points: 10');
178
+ });
179
+ });
180
+
181
+ describe('Scoring section: Rounding - Edit tab', () => {
182
+ abortEarlySetup();
183
+ before(() => {
184
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
185
+ cy.barsPreLoaderWait();
186
+ fillInTheGapsTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
187
+ fillInTheGapsTextPage.steps.allotPoints(10);
188
+ });
189
+
190
+ fillInTheGapsTextPage.tests.verifyRoundingDropdown();
191
+
192
+ fillInTheGapsTextPage.tests.verifyRoundNegativeScoreToZeroLabelAndCheckbox();
193
+ });
194
+ });
@@ -0,0 +1,56 @@
1
+ import { fillInTheGapsTextPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ const css = Cypress.env('css');
4
+
5
+ describe('Create Item page - Fill in the gaps with text: ', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Answer input field verification: Edit tab functionality', () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
14
+ cy.barsPreLoaderWait();
15
+ fillInTheGapsTextPage.steps.deleteAResponseArea(1);
16
+ });
17
+
18
+ fillInTheGapsTextPage.tests.verifyAnswerInputFieldEditTab();
19
+ });
20
+
21
+ describe('Accepted student input - Edit tab functionality', () => {
22
+ abortEarlySetup();
23
+ before(() => {
24
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
25
+ cy.barsPreLoaderWait();
26
+ });
27
+
28
+ fillInTheGapsTextPage.tests.verifyAcceptedStudentInputEditTabFunctionality();
29
+
30
+ it('When user adds multiple text container and set different accepted student input then it should be applied appropriately', () => {
31
+ fillInTheGapsTextPage.steps.addResponseArea();
32
+ fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 2, responseText: 'Answer12' }]);
33
+ fillInTheGapsTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 2, responseText: 'Answer12' }]);
34
+ });
35
+ });
36
+
37
+ describe('Accepted student input - Preview tab functionality', () => {
38
+ abortEarlySetup();
39
+ before(() => {
40
+ fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
41
+ cy.barsPreLoaderWait();
42
+ });
43
+
44
+ fillInTheGapsTextPage.tests.verifyAcceptedStudentInputPreviewTabFunctionality();
45
+
46
+ it('When user adds multiple text container and sets different accepted student input in edit tab then it should be applied appropriately in preview tab', () => {
47
+ fillInTheGapsTextPage.steps.switchToEditTab();
48
+ fillInTheGapsTextPage.steps.addResponseArea();
49
+ fillInTheGapsTextPage.steps.switchToPreviewTab();
50
+ fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower232&*' }]);
51
+ fillInTheGapsTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '232' }]);
52
+ fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Flower232&*' }]);
53
+ fillInTheGapsTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Flower232&*' }]);
54
+ });
55
+ });
56
+ });
@@ -15,6 +15,10 @@ describe('Create item page - Fill in the gaps with text: Set limit section', ()
15
15
  });
16
16
 
17
17
  fillInTheGapsTextPage.tests.verifySetLimitSectionContents();
18
+
19
+ fillInTheGapsTextPage.tests.verifySetLimitSectionErrorConditionsForMinAndMaxCharacterInputFields();
20
+
21
+ fillInTheGapsTextPage.tests.verifySetLimitSectionForNoneOption();
18
22
  });
19
23
 
20
24
  describe('Fill in the gaps with text: Set limit section : Edit tab functionality', () => {
@@ -24,7 +28,23 @@ describe('Create item page - Fill in the gaps with text: Set limit section', ()
24
28
  cy.barsPreLoaderWait();
25
29
  });
26
30
 
27
- fillInTheGapsTextPage.tests.verifySetLimitSectionEditTabFunctionality();
31
+ it('When maximum character limit input field value is 50 then maximum character limit should be 50 in the specify correct answer section', () => {
32
+ fillInTheGapsTextPage.steps.verifyMaximumCharacterLimitInputField(50);
33
+ fillInTheGapsTextPage.steps.verifyMaximumCharacterLimit(0, 50);
34
+ });
35
+
36
+ it('When the user updates the maximum character limit input field value then maximum character limit should update in the specify correct answer section', () => {
37
+ fillInTheGapsTextPage.steps.setMaximumLimit(10);
38
+ fillInTheGapsTextPage.steps.verifyMaximumCharacterLimit(0, 10);
39
+ });
40
+
41
+ it('User should able to enter characters in the answer input field', () => {
42
+ fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }]);
43
+ });
44
+
45
+ fillInTheGapsTextPage.tests.verifyMaximumCharacterLimitWarningConditionsSpecifyCorrectAnswerSection();
46
+
47
+ fillInTheGapsTextPage.tests.verifyMinimumCharacterLimitWarningConditionsSpecifyCorrectAnswerSection();
28
48
  });
29
49
 
30
50
  describe('Fill in the gaps with text: Set limit section : Preview tab functionality', () => {
@@ -32,8 +52,26 @@ describe('Create item page - Fill in the gaps with text: Set limit section', ()
32
52
  before(() => {
33
53
  fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
34
54
  cy.barsPreLoaderWait();
55
+ fillInTheGapsTextPage.steps.switchToPreviewTab();
56
+ });
57
+
58
+ it('When maximum character limit input field value is 50 then maximum character limit should be 50 in the preview tab', () => {
59
+ fillInTheGapsTextPage.steps.verifyMaximumCharacterLimitInPreviewTab(0, 50);
60
+ });
61
+
62
+ it('When the user updates the maximum character limit input field value then maximum character limit should update in the preview tab', () => {
63
+ fillInTheGapsTextPage.steps.switchToEditTab();
64
+ fillInTheGapsTextPage.steps.setMaximumLimit(10);
65
+ fillInTheGapsTextPage.steps.switchToPreviewTab();
66
+ fillInTheGapsTextPage.steps.verifyMaximumCharacterLimitInPreviewTab(0, 10);
67
+ });
68
+
69
+ it('User should able to enter characters in the response field', () => {
70
+ fillInTheGapsTextPage.steps.addTextInAnswerInputFieldsPreviewTab(0, 'Flower');
35
71
  });
36
72
 
37
- fillInTheGapsTextPage.tests.verifySetLimitSectionPreviewTabFunctionality();
73
+ fillInTheGapsTextPage.tests.verifyMaximumCharacterLimitWarningConditionsPreviewTab();
74
+
75
+ fillInTheGapsTextPage.tests.verifyMinimumCharacterLimitWarningConditionsPreviewTab();
38
76
  });
39
77
  });