itemengine-cypress-automation 1.0.167-repoUpdate10April-1465c8c.0 → 1.0.169-uploadResponseMigration-83ab996.0

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/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +11 -22
  3. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +7 -18
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +6 -11
  5. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -0
  6. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +36 -2
  7. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +34 -22
  8. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +24 -8
  9. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +25 -5
  10. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +114 -68
  11. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +111 -67
  12. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +123 -71
  13. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +63 -41
  14. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +25 -21
  15. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +85 -50
  16. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -68
  17. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +98 -54
  18. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +120 -72
  19. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
  20. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
  21. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
  22. package/cypress/fixtures/theme/ilc.json +26 -14
  23. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
  24. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +0 -3
  25. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  26. package/cypress/pages/components/colorPopupComponent.js +2 -2
  27. package/cypress/pages/components/gridQuestionCommonComponent.js +2 -629
  28. package/cypress/pages/components/index.js +0 -3
  29. package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
  30. package/cypress/pages/components/measuringToolComponent.js +2 -2
  31. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  32. package/cypress/pages/components/setPointsPopupBase.js +4 -6
  33. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +3 -60
  34. package/cypress/pages/components/toolSettingsComponent.js +12 -80
  35. package/cypress/pages/dragAndDropIntoCategoriesPage.js +8 -0
  36. package/cypress/pages/feedbackScalePage.js +449 -591
  37. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -3
  38. package/cypress/pages/graphingPage.js +145 -9
  39. package/cypress/pages/gridFillPage.js +120 -135
  40. package/cypress/pages/highlightPage.js +394 -0
  41. package/cypress/pages/index.js +2 -5
  42. package/cypress/pages/matchingPage.js +20 -78
  43. package/cypress/pages/multipleSelectionGridPage.js +1 -88
  44. package/cypress/pages/singleSelectionGridPage.js +0 -86
  45. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +38 -1
  46. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
  47. package/cypress/support/migrationHelpers/migrationScript.js +4 -0
  48. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +34 -2
  49. package/package.json +1 -1
  50. package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +0 -83
  51. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +0 -200
  52. package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +0 -56
  53. package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -95
  54. package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +0 -71
  55. package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +0 -72
  56. package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +0 -71
  57. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
  58. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
  59. package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
  60. package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +0 -308
  61. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +0 -216
  62. package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +0 -336
  63. package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +0 -570
  64. package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +0 -214
  65. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
  66. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
  67. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -355
  68. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +0 -309
  69. package/cypress/e2e/ILC/Matching/toolSettings.js +0 -72
  70. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +0 -1033
  71. package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
  72. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +0 -236
  73. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -239
  74. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -278
  75. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +0 -178
  76. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +0 -407
  77. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +0 -273
  78. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +0 -278
  79. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +0 -228
  80. package/cypress/e2e/ILC/NumberLine/additionalSettings.js +0 -120
  81. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +0 -659
  82. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +0 -149
  83. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +0 -151
  84. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -171
  85. package/cypress/e2e/ILC/NumberLine/headerSection.js +0 -76
  86. package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -54
  87. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +0 -200
  88. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +0 -67
  89. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +0 -135
  90. package/cypress/e2e/ILC/NumberLine/toolSettings.js +0 -73
  91. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +0 -372
  92. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +0 -1014
  93. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -235
  94. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -235
  95. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -235
  96. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -457
  97. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -342
  98. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -342
  99. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -342
  100. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -155
  101. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -314
  102. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -275
  103. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -314
  104. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -290
  105. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -142
  106. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +0 -137
  107. package/cypress/pages/brainingCampManipulativePage.js +0 -122
  108. package/cypress/pages/components/defaultToolDropdown.js +0 -77
  109. package/cypress/pages/components/resetPopupComponent.js +0 -74
  110. package/cypress/pages/components/toolsAndControlsComponent.js +0 -69
  111. package/cypress/pages/feedbackScalePage copy.js +0 -716
  112. package/cypress/pages/numberLinePage.js +0 -723
  113. package/cypress/pages/textSelectionPage.js +0 -582
@@ -1,299 +0,0 @@
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
- });