itemengine-cypress-automation 1.0.166-migrationScripts-b8c79a0.0 → 1.0.166

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +83 -0
  2. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +200 -0
  3. package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +56 -0
  4. package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +95 -0
  5. package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +71 -0
  6. package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +72 -0
  7. package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +71 -0
  8. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  9. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +22 -11
  10. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  12. package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +161 -0
  13. package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +308 -0
  14. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +216 -0
  15. package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +336 -0
  16. package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +570 -0
  17. package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +214 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +356 -0
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +299 -0
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +18 -7
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +11 -6
  22. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +355 -0
  23. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
  24. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +2 -36
  25. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +22 -34
  26. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +8 -24
  27. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +5 -25
  28. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +68 -114
  29. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +67 -111
  30. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +71 -123
  31. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +41 -63
  32. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +21 -25
  33. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +50 -85
  34. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +68 -115
  35. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +54 -98
  36. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +72 -120
  37. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
  38. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +309 -0
  39. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
  40. package/cypress/e2e/ILC/Matching/toolSettings.js +72 -0
  41. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1033 -0
  42. package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +28 -0
  43. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +236 -0
  44. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +239 -0
  45. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +278 -0
  46. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +178 -0
  47. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +407 -0
  48. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +273 -0
  49. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +278 -0
  50. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +228 -0
  51. package/cypress/e2e/ILC/NumberLine/additionalSettings.js +120 -0
  52. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +659 -0
  53. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +149 -0
  54. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +151 -0
  55. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +171 -0
  56. package/cypress/e2e/ILC/NumberLine/headerSection.js +76 -0
  57. package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +54 -0
  58. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +200 -0
  59. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +67 -0
  60. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +135 -0
  61. package/cypress/e2e/ILC/NumberLine/toolSettings.js +73 -0
  62. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +372 -0
  63. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1014 -0
  64. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +235 -0
  65. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +235 -0
  66. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +235 -0
  67. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +457 -0
  68. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +342 -0
  69. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +342 -0
  70. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +342 -0
  71. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +155 -0
  72. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +314 -0
  73. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +275 -0
  74. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +314 -0
  75. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +290 -0
  76. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
  77. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +137 -0
  78. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
  79. package/cypress/fixtures/theme/ilc.json +14 -26
  80. package/cypress/pages/brainingCampManipulativePage.js +122 -0
  81. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
  82. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
  83. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  84. package/cypress/pages/components/colorPopupComponent.js +2 -2
  85. package/cypress/pages/components/defaultToolDropdown.js +77 -0
  86. package/cypress/pages/components/gridQuestionCommonComponent.js +629 -2
  87. package/cypress/pages/components/index.js +3 -0
  88. package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
  89. package/cypress/pages/components/measuringToolComponent.js +2 -2
  90. package/cypress/pages/components/resetPopupComponent.js +74 -0
  91. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  92. package/cypress/pages/components/setPointsPopupBase.js +6 -4
  93. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +60 -3
  94. package/cypress/pages/components/toolSettingsComponent.js +80 -12
  95. package/cypress/pages/components/toolsAndControlsComponent.js +69 -0
  96. package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -8
  97. package/cypress/pages/feedbackScalePage copy.js +716 -0
  98. package/cypress/pages/feedbackScalePage.js +591 -449
  99. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
  100. package/cypress/pages/graphingPage.js +9 -145
  101. package/cypress/pages/gridFillPage.js +135 -120
  102. package/cypress/pages/highlightPage.js +0 -394
  103. package/cypress/pages/index.js +5 -2
  104. package/cypress/pages/matchingPage.js +78 -20
  105. package/cypress/pages/multipleSelectionGridPage.js +88 -1
  106. package/cypress/pages/numberLinePage.js +723 -0
  107. package/cypress/pages/singleSelectionGridPage.js +86 -0
  108. package/cypress/pages/textSelectionPage.js +582 -0
  109. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +3 -12
  110. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +0 -1
  111. package/cypress/support/migrationHelpers/migrationScript.js +0 -10
  112. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +0 -8
  113. package/package.json +2 -2
@@ -0,0 +1,299 @@
1
+ import { fillInTheGapsDragAndDropPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+
4
+ describe('Fill In the Gaps Additional settings and Responses accordion', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Additional Settings: Advanced settings for all Response Areas', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
13
+ cy.barsPreLoaderWait();
14
+ fillInTheGapsDragAndDropPage.steps.expandAdditionalSettings();
15
+ });
16
+
17
+ fillInTheGapsDragAndDropPage.tests.verifyAdvanceSettingsForAllResponsesLabelAndCSS();
18
+ });
19
+
20
+ describe('Response Accordions: ARIA label', () => {
21
+ abortEarlySetup();
22
+ before(() => {
23
+ fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
24
+ cy.barsPreLoaderWait();
25
+ fillInTheGapsDragAndDropPage.steps.expandAdditionalSettings();
26
+ fillInTheGapsDragAndDropPage.steps.expandResponseAccordion(0);
27
+ fillInTheGapsDragAndDropPage.steps.expandResponseAccordion(1);
28
+ });
29
+
30
+ fillInTheGapsDragAndDropPage.tests.verifyDefaultStateOfAriaLabelInputFieldInResponseAccordionAndCSS();
31
+
32
+ //Note: a11y covered in Additional Settings: Response accordion
33
+
34
+ //ARIA label test cases for set correct answer section
35
+ it('When the user has not set \'ARIA label\' input field then the default \'ARIA label\' should be present for the \'Set correct answer\' section response field', () => {
36
+ for (let index = 0; index < 2; index++) {
37
+ fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea()
38
+ .eq(index)
39
+ .should('have.attr', 'aria-label', 'Response Area');
40
+ };
41
+ });
42
+
43
+ fillInTheGapsDragAndDropPage.tests.verifyCustomLabelNotVisibleOnResponseAccordion('ARIA label');
44
+
45
+ it('When the user has set \'ARIA label\' in the response accordion then it should be present for the \'Set correct answer\' section response field and for the other response field, value of the aria-label should remain the same', () => {
46
+ fillInTheGapsDragAndDropPage.steps.setAriaLabelInResponseAccordion(0, 'Custom Aria Label');
47
+ fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea()
48
+ .eq(0)
49
+ .should('have.attr', 'aria-label', 'Custom Aria Label');
50
+ fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea()
51
+ .eq(1)
52
+ .should('have.attr', 'aria-label', 'Response Area');
53
+ });
54
+
55
+ fillInTheGapsDragAndDropPage.tests.verifyCustomLabelVisibleOnResponseAccordion('ARIA label');
56
+
57
+ fillInTheGapsDragAndDropPage.tests.verifyCustomLabelOnResponseAccordionCSS();
58
+
59
+ it('Accessibility of input field in \'Set correct answer\' section when custom \'ARIA label\' is set and Custom label', { tags: 'a11y' }, () => {
60
+ cy.checkAccessibility(fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea())
61
+ cy.checkAccessibility(fillInTheGapsDragAndDropPage.responseAccordionCustomLabel())
62
+ });
63
+
64
+ it('When the user clears the set value in the \'ARIA label\' input field, then the default \'ARIA label\' should be present for the response fields in the \'Set correct answer\' section', () => {
65
+ fillInTheGapsDragAndDropPage.responseAccordionWrapper()
66
+ .eq(0)
67
+ .within(() => {
68
+ fillInTheGapsDragAndDropPage.ariaLabelInputField()
69
+ .clear()
70
+ .should('have.value', '')
71
+ .blur();
72
+ });
73
+ for (let index = 0; index < 2; index++) {
74
+ fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea()
75
+ .eq(index)
76
+ .should('have.attr', 'aria-label', 'Response Area');
77
+ };
78
+ });
79
+
80
+ //ARIA label test cases for preview tab
81
+ it('When the user has not set \'ARIA label\' input field then in the preview tab default \'ARIA label\' should be present for the response field in the preview tab', () => {
82
+ cy.log('Pre step: Switch to Preview tab')
83
+ fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
84
+ for (let index = 0; index < 2; index++) {
85
+ fillInTheGapsDragAndDropPage.previewTabResponseArea()
86
+ .eq(index)
87
+ .should('have.attr', 'aria-label', 'Response Area');
88
+ };
89
+ });
90
+
91
+ it('When the user has set \'ARIA label\' in the response accordion then it should be present for the response field in the preview tab', () => {
92
+ cy.log('Pre step: Switch to Edit tab')
93
+ fillInTheGapsDragAndDropPage.steps.switchToEditTab();
94
+ fillInTheGapsDragAndDropPage.steps.setAriaLabelInResponseAccordion(0, 'Custom Aria Label');
95
+ fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
96
+ fillInTheGapsDragAndDropPage.previewTabResponseArea()
97
+ .eq(0)
98
+ .should('have.attr', 'aria-label', 'Custom Aria Label');
99
+ fillInTheGapsDragAndDropPage.previewTabResponseArea()
100
+ .eq(1)
101
+ .should('have.attr', 'aria-label', 'Response Area');
102
+ });
103
+
104
+ it('Accessibility of input field in preview tab when custom \'ARIA label\' is set', { tags: 'a11y' }, () => {
105
+ cy.checkAccessibility(fillInTheGapsDragAndDropPage.previewTabResponseArea())
106
+ });
107
+
108
+ it('When the user clears the set value in the \'ARIA label\' input field, then the default \'ARIA label\' should be present for the response field in the preview tab', () => {
109
+ cy.log('Pre step: Switch to Edit tab')
110
+ fillInTheGapsDragAndDropPage.steps.switchToEditTab();
111
+ fillInTheGapsDragAndDropPage.responseAccordionWrapper()
112
+ .eq(0)
113
+ .within(() => {
114
+ fillInTheGapsDragAndDropPage.ariaLabelInputField()
115
+ .clear()
116
+ .should('have.value', '');
117
+ });
118
+ fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
119
+ for (let index = 0; index < 2; index++) {
120
+ fillInTheGapsDragAndDropPage.previewTabResponseArea()
121
+ .eq(index)
122
+ .should('have.attr', 'aria-label', 'Response Area');
123
+ };
124
+ });
125
+ });
126
+
127
+ describe('Response Accordions: Height and Width', () => {
128
+ abortEarlySetup();
129
+ before(() => {
130
+ fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
131
+ cy.barsPreLoaderWait();
132
+ fillInTheGapsDragAndDropPage.steps.expandAdditionalSettings();
133
+ fillInTheGapsDragAndDropPage.steps.expandResponseAccordion(0);
134
+ fillInTheGapsDragAndDropPage.steps.expandResponseAccordion(1);
135
+ });
136
+
137
+ fillInTheGapsDragAndDropPage.tests.verifyDefaultStateOfHeightAndWidthInputFieldInResponseAccordionAndCSS();
138
+
139
+ //Note: a11y covered in Additional Settings: Response accordion
140
+
141
+ //TODO: We will need to revisit below case as it will fail for mobile view
142
+ it('When the user has not set \'Height\' and \'Width\' for response fields then the default dimension of the response field in the \'Set correct answer\' section response fields should be (197x46)px', () => {
143
+ for (let index = 0; index < 2; index++) {
144
+ fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea()
145
+ .eq(index)
146
+ .should('have.attr', 'height', '46.000')
147
+ .and('have.attr', 'width', '197.000px');
148
+ };
149
+ });
150
+
151
+ fillInTheGapsDragAndDropPage.tests.verifyCustomLabelNotVisibleOnResponseAccordion('Height and Width');
152
+
153
+ it('When the user has set \'Height\' for the response field then the Height of the response field should get updated accordingly in the \'Set correct answer\' section', () => {
154
+ fillInTheGapsDragAndDropPage.steps.setHeightInResponseAccordion(0, '100');
155
+ fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea()
156
+ .eq(0)
157
+ .should('have.attr', 'height', '100.000');
158
+ });
159
+
160
+ fillInTheGapsDragAndDropPage.tests.verifyCustomLabelVisibleOnResponseAccordion('Height and Width');
161
+
162
+ it('When the user has set \'Width\' for the response field then the Width of the response field should get updated accordingly in the \'Set correct answer\' section', () => {
163
+ fillInTheGapsDragAndDropPage.steps.setWidthInResponseAccordion(0, '100');
164
+ fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea()
165
+ .eq(0)
166
+ .should('have.attr', 'width', '100.000px');
167
+ });
168
+
169
+ it('When the user has set width below 80px then the width should remain 80px in the \'Set correct answer\' section', () => {
170
+ fillInTheGapsDragAndDropPage.steps.setWidthInResponseAccordion(0, '20');
171
+ fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea()
172
+ .eq(0)
173
+ .should('have.attr', 'width', '80.000px');
174
+ });
175
+
176
+ it('When the user has set width above 400px then the width should remain 400px in the \'Set correct answer\' section', () => {
177
+ fillInTheGapsDragAndDropPage.steps.setWidthInResponseAccordion(0, '800');
178
+ fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea()
179
+ .eq(0)
180
+ .should('have.attr', 'width', '400.000px');
181
+ });
182
+
183
+ it('When the user has set \'Height\' and \'Width\' in the individual responses accordion then it should override the \'Height\' and \'Width\'set in the \'Advanced settings for all response areas\' in the \'Set correct answer\' section', () => {
184
+ fillInTheGapsDragAndDropPage.widthInputField()
185
+ .clear()
186
+ .type('250')
187
+ .should('have.value', '250');
188
+ fillInTheGapsDragAndDropPage.heightInputField()
189
+ .clear()
190
+ .type('180')
191
+ .should('have.value', '180');
192
+ fillInTheGapsDragAndDropPage.steps.setWidthInResponseAccordion(0, '175');
193
+ fillInTheGapsDragAndDropPage.steps.setHeightInResponseAccordion(0, '120');
194
+ fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea()
195
+ .eq(0)
196
+ .should('have.attr', 'width', '175.000px')
197
+ .and('have.attr', 'height', '120.000');
198
+ fillInTheGapsDragAndDropPage.setCorrectAnswerResponseArea()
199
+ .eq(1)
200
+ .should('have.attr', 'width', '250.000px')
201
+ .and('have.attr', 'height', '180.000');
202
+ });
203
+
204
+ //Height and width test cases for preview tab
205
+ //TODO: We will need to revisit below case as it will fail for mobile view
206
+ it('When the user has not set \'Height\' and \'Width\' for the response accordion then the default dimension of the response field in the preview tab response field should be (197x46)px', () => {
207
+ cy.log('Pre step: clearing the set values of height and width to bring back the dimensions of the response field to default dimensions')
208
+ fillInTheGapsDragAndDropPage.widthInputField()
209
+ .clear()
210
+ .should('have.value', '');
211
+ fillInTheGapsDragAndDropPage.heightInputField()
212
+ .clear()
213
+ .should('have.value', '');
214
+ for (let index = 0; index < 2; index++) {
215
+ fillInTheGapsDragAndDropPage.responseAccordionWrapper()
216
+ .eq(index)
217
+ .within(() => {
218
+ fillInTheGapsDragAndDropPage.heightInputField()
219
+ .clear()
220
+ .should('have.value', '');
221
+ fillInTheGapsDragAndDropPage.widthInputField()
222
+ .clear()
223
+ .should('have.value', '');
224
+ });
225
+ };
226
+ fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
227
+ for (let index = 0; index < 2; index++) {
228
+ fillInTheGapsDragAndDropPage.previewTabResponseArea()
229
+ .eq(index)
230
+ .should('have.attr', 'height', '46.000')
231
+ .and('have.attr', 'width', '197.000px');
232
+ };
233
+ });
234
+
235
+ it('When the user has set \'Height\' for the response field then the height of the preview tab response field should get updated accordingly in the preview tab', () => {
236
+ cy.log('Pre step: Switch to Edit tab')
237
+ fillInTheGapsDragAndDropPage.steps.switchToEditTab();
238
+ fillInTheGapsDragAndDropPage.steps.setHeightInResponseAccordion(0, '100');
239
+ fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
240
+ fillInTheGapsDragAndDropPage.previewTabResponseArea()
241
+ .eq(0)
242
+ .should('have.attr', 'height', '100.000');
243
+ });
244
+
245
+ it('When the user has set \'Width\' for the response field then the width of the preview tab response field should get updated accordingly in the preview tab', () => {
246
+ cy.log('Pre step: Switch to Edit tab')
247
+ fillInTheGapsDragAndDropPage.steps.switchToEditTab();
248
+ fillInTheGapsDragAndDropPage.steps.setWidthInResponseAccordion(0, '100');
249
+ fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
250
+ fillInTheGapsDragAndDropPage.previewTabResponseArea()
251
+ .eq(0)
252
+ .should('have.attr', 'width', '100.000px');
253
+ });
254
+
255
+ it('When the user has set width below 80px then the width should remain 80px in the preview tab', () => {
256
+ cy.log('Pre step: Switch to Edit tab')
257
+ fillInTheGapsDragAndDropPage.steps.switchToEditTab();
258
+ fillInTheGapsDragAndDropPage.steps.setWidthInResponseAccordion(0, '20');
259
+ fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
260
+ fillInTheGapsDragAndDropPage.previewTabResponseArea()
261
+ .eq(0)
262
+ .should('have.attr', 'width', '80.000px');
263
+ });
264
+
265
+ it('When the user has set width above 400px then the width should remain 400px in the preview tab', () => {
266
+ cy.log('Pre step: Switch to Edit tab')
267
+ fillInTheGapsDragAndDropPage.steps.switchToEditTab();
268
+ fillInTheGapsDragAndDropPage.steps.setWidthInResponseAccordion(0, '800');
269
+ fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
270
+ fillInTheGapsDragAndDropPage.previewTabResponseArea()
271
+ .eq(0)
272
+ .should('have.attr', 'width', '400.000px');
273
+ });
274
+
275
+ it('When the user has set \'Height\' and \'Width\' in the individual responses accordion then it should override the \'Height\' and \'Width\'set in the \'Advanced settings for all response areas\' in the preview tab', () => {
276
+ cy.log('Pre step: Switch to Edit tab')
277
+ fillInTheGapsDragAndDropPage.steps.switchToEditTab();
278
+ fillInTheGapsDragAndDropPage.widthInputField()
279
+ .clear()
280
+ .type('250')
281
+ .should('have.value', '250');
282
+ fillInTheGapsDragAndDropPage.heightInputField()
283
+ .clear()
284
+ .type('180')
285
+ .should('have.value', '180');
286
+ fillInTheGapsDragAndDropPage.steps.setWidthInResponseAccordion(0, '175');
287
+ fillInTheGapsDragAndDropPage.steps.setHeightInResponseAccordion(0, '120');
288
+ fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
289
+ fillInTheGapsDragAndDropPage.previewTabResponseArea()
290
+ .eq(0)
291
+ .should('have.attr', 'width', '175.000px')
292
+ .and('have.attr', 'height', '120.000');
293
+ fillInTheGapsDragAndDropPage.previewTabResponseArea()
294
+ .eq(1)
295
+ .should('have.attr', 'width', '250.000px')
296
+ .and('have.attr', 'height', '180.000')
297
+ });
298
+ });
299
+ });
@@ -83,7 +83,7 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
83
83
  fillInTheGapsDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
84
84
  });
85
85
 
86
- it('When the user drops an option in one of the dropzone, the option should get removed from the response container, the dropzone should get filled with that option and the other dropzone should remain in inactive state', () => {
86
+ it('When the user drops an option in one of the dropzone, the option should get removed from the options container, the dropzone should get filled with that option and the other dropzone should remain in inactive state', () => {
87
87
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0 });
88
88
  fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(0, ['Petals']);
89
89
  fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(['Flower', 'Stem', 'Seed']);
@@ -148,7 +148,7 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
148
148
  fillInTheGapsDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
149
149
  });
150
150
 
151
- it('When the user selects a filled option and clicks in the response container, the selected option should get back in the response container and \'Error: Please set a correct answer\' error message should be displayed', () => {
151
+ it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container and \'Error: Please set a correct answer\' error message should be displayed', () => {
152
152
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
153
153
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
154
154
  fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(['Petals', 'Flower', 'Stem', 'Seed']);
@@ -251,7 +251,7 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
251
251
  fillInTheGapsDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInPreviewTab();
252
252
  });
253
253
 
254
- it('When the user drops an option in one of the dropzone, the option should get removed from the response container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
254
+ it('When the user drops an option in one of the dropzone, the option should get removed from the options container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
255
255
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0 });
256
256
  fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(0, ['Petals']);
257
257
  fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(['Flower', 'Stem', 'Seed']);
@@ -322,6 +322,11 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
322
322
  fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Flower']);
323
323
  fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(2, ['Petals']);
324
324
  });
325
+
326
+ it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container', () => {
327
+ fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInPreviewTab('Flower');
328
+ fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(['Flower', 'Stem', 'Seed']);
329
+ });
325
330
  });
326
331
 
327
332
  describe('Click and drop cases for \'Grouped\' response options layout in \'Specify correct answer\' section', () => {
@@ -398,7 +403,7 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
398
403
  fillInTheGapsDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
399
404
  });
400
405
 
401
- it('When the user drops an option in one of the dropzone, the option should get removed from the respective group of the response container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
406
+ it('When the user drops an option in one of the dropzone, the option should get removed from the respective group of the options container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
402
407
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0 });
403
408
  fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(0, ['Petals']);
404
409
  fillInTheGapsDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, ['Flower', 'Stem', 'Seed']);
@@ -464,7 +469,7 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
464
469
  fillInTheGapsDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
465
470
  });
466
471
 
467
- it('When the user selects a filled option and clicks in the response container, the selected option should get back in the response container and \'Error: Please set a correct answer\' error message should be displayed', () => {
472
+ it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container and \'Error: Please set a correct answer\' error message should be displayed', () => {
468
473
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
469
474
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
470
475
  fillInTheGapsDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, groupedOptions[0]);
@@ -578,7 +583,7 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
578
583
  fillInTheGapsDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInPreviewTab();
579
584
  });
580
585
 
581
- it('When the user drops an option in one of the dropzone, the option should get removed from the respective group of the response container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
586
+ it('When the user drops an option in one of the dropzone, the option should get removed from the respective group of the options container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
582
587
  fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0 });
583
588
  fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(0, ['Petals']);
584
589
  fillInTheGapsDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(0, ['Flower', 'Stem', 'Seed']);
@@ -649,8 +654,14 @@ describe('Create Item Page: Fill in the gaps with drag and drop: Click and drop
649
654
  fillInTheGapsDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Flower']);
650
655
  });
651
656
 
657
+ it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container', () => {
658
+ fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInPreviewTab('Flower');
659
+ fillInTheGapsDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(0, ['Petals', 'Flower', 'Stem', 'Seed']);
660
+ fillInTheGapsDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(1, groupedOptions[1]);
661
+ });
662
+
652
663
  it('When user has dropped all the options from a group in the response areas, then empty group should be displayed in the options container', () => {
653
- fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Stem': 0, 'Seed': 2, 'Petals': 3 });
664
+ fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Stem': 0, 'Seed': 2, 'Petals': 3 , 'Flower':1});
654
665
  fillInTheGapsDragAndDropPage.steps.verifyGroupedOptionsTitlePreviewTab(0, 'Group A')
655
666
  fillInTheGapsDragAndDropPage.steps.verifyEmptyGroupInPreviewTab(0);
656
667
  });
@@ -89,7 +89,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
89
89
  fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
90
90
  });
91
91
 
92
- it('When the user drops an option in one of the dropzone, the option should get removed from the response container, the dropzone should get filled with that option and the other dropzone should remain in inactive state', () => {
92
+ it('When the user drops an option in one of the dropzone, the option should get removed from the options container, the dropzone should get filled with that option and the other dropzone should remain in inactive state', () => {
93
93
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0 });
94
94
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(0, ['Petals']);
95
95
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(['Flower', 'Stem', 'Seed']);
@@ -153,7 +153,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
153
153
  fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
154
154
  });
155
155
 
156
- it('When the user selects a filled option and clicks in the response container, the selected option should get back in the response container and \'Error: Please set a correct answer\' error message should be displayed', () => {
156
+ it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container and \'Error: Please set a correct answer\' error message should be displayed', () => {
157
157
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
158
158
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
159
159
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(['Petals', 'Flower', 'Stem', 'Seed']);
@@ -262,7 +262,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
262
262
  fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInPreviewTab();
263
263
  });
264
264
 
265
- it('When the user drops an option in one of the dropzone, the option should get removed from the response container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
265
+ it('When the user drops an option in one of the dropzone, the option should get removed from the options container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
266
266
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0 });
267
267
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(0, ['Petals']);
268
268
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(['Flower', 'Stem', 'Seed']);
@@ -332,6 +332,11 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
332
332
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(0, ['Flower']);
333
333
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Petals']);
334
334
  });
335
+
336
+ it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container', () => {
337
+ fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInPreviewTab('Flower');
338
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(['Stem', 'Seed', 'Flower']);
339
+ });
335
340
  });
336
341
 
337
342
  describe('Click and drop cases for \'Grouped\' response options layout in \'Specify correct answer\' section', () => {
@@ -413,7 +418,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
413
418
  fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
414
419
  });
415
420
 
416
- it('When the user drops an option in one of the dropzone, the option should get removed from the respective group of the response container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
421
+ it('When the user drops an option in one of the dropzone, the option should get removed from the respective group of the options container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
417
422
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0 });
418
423
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(0, ['Petals']);
419
424
  fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, ['Flower', 'Stem', 'Seed']);
@@ -478,7 +483,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
478
483
  fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
479
484
  });
480
485
 
481
- it('When the user selects a filled option and clicks in the response container, the selected option should get back in the response container and \'Error: Please set a correct answer\' error message should be displayed', () => {
486
+ it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container and \'Error: Please set a correct answer\' error message should be displayed', () => {
482
487
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropGroupedOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
483
488
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropGroupedOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
484
489
  fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, groupedOptions[0]);
@@ -597,7 +602,7 @@ describe('Create Item Page: Fill in the gaps over image - drag and drop: Click a
597
602
  fillInTheGapsOverImageDragAndDropPage.steps.verifyInactiveStateOfAllDropzoneInPreviewTab();
598
603
  });
599
604
 
600
- it('When the user drops an option in one of the dropzone, the option should get removed from the respective group of the response container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
605
+ it('When the user drops an option in one of the dropzone, the option should get removed from the respective group of the options container, the dropzone should get filled with that option and the other dropzone should return to inactive state', () => {
601
606
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0 });
602
607
  fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(0, ['Petals']);
603
608
  fillInTheGapsOverImageDragAndDropPage.steps.verifyGroupedContainerContentsInPreviewTab(0, ['Flower', 'Stem', 'Seed']);