itemengine-cypress-automation 1.0.120 → 1.0.122-updateILCRepo28Feb-2c3e0e3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +13 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -0
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -0
  4. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +2 -0
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +1 -4
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +273 -0
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAnswerFunctionalityForAllViews.smoke.js +116 -0
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +136 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +224 -0
  12. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +120 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViews.smoke.js +158 -0
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +1 -1
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -4
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +246 -0
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +332 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +409 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +80 -0
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +213 -0
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +2 -2
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +1 -1
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -2
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +68 -68
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +6 -6
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +3 -289
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -1
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +2 -2
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -23
  32. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +191 -0
  33. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +190 -0
  34. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +284 -0
  35. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  36. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +113 -0
  37. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +217 -0
  38. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +234 -0
  39. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +217 -0
  40. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +217 -0
  41. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsBasic.js +136 -0
  42. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +197 -0
  43. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +169 -0
  44. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +197 -0
  45. package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +219 -0
  46. package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAnswerFunctionalityForAllViews.smoke.js +115 -0
  47. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +142 -0
  48. package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViews.smoke.js +152 -0
  49. package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +39 -0
  50. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +2 -12
  51. package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +497 -0
  52. package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +503 -0
  53. package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +233 -0
  54. package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +291 -0
  55. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +332 -0
  56. package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +2 -12
  57. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +9 -8
  58. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +4 -4
  59. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -2
  60. package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +5 -2
  61. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +334 -0
  62. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +419 -0
  63. package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +166 -0
  64. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +166 -0
  65. package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +51 -0
  66. package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +99 -0
  67. package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +71 -0
  68. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +155 -0
  69. package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +66 -0
  70. package/cypress/fixtures/theme/ilc.json +3 -1
  71. package/cypress/pages/audioResponsePage.js +2 -1
  72. package/cypress/pages/components/additionalSettingsPanel.js +27 -0
  73. package/cypress/pages/components/autoScoredPreviewBase.js +1 -1
  74. package/cypress/pages/components/autoScoredScoringSection.js +1 -1
  75. package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +1 -1
  76. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
  77. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +2 -2
  78. package/cypress/pages/components/autoScoredStudentViewSettings.js +8 -1
  79. package/cypress/pages/components/backgroundImageUploadComponent.js +5 -5
  80. package/cypress/pages/components/createQuestionBasePage.js +8 -2
  81. package/cypress/pages/components/essayResponseCommonComponents.js +6 -0
  82. package/cypress/pages/components/fillInTheGapsCommonComponents.js +13 -0
  83. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +40 -0
  84. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +422 -314
  85. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +438 -710
  86. package/cypress/pages/components/{figOverImageCanvasComponent.js → imageCanvasComponent.js} +274 -272
  87. package/cypress/pages/components/index.js +3 -3
  88. package/cypress/pages/components/maximumRecorderLengthComponent.js +55 -11
  89. package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +1 -1
  90. package/cypress/pages/components/questionInputFieldComponent.js +49 -23
  91. package/cypress/pages/components/scoringSectionBase.js +1 -1
  92. package/cypress/pages/createItemPage.js +67 -2
  93. package/cypress/pages/fillInTheGapsDragAndDropPage.js +172 -711
  94. package/cypress/pages/fillInTheGapsDropdownPage.js +75 -72
  95. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +4 -4
  96. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +109 -273
  97. package/cypress/pages/fillInTheGapsOverImageTextPage.js +49 -291
  98. package/cypress/pages/fillInTheGapsTextPage.js +52 -199
  99. package/cypress/pages/index.js +5 -5
  100. package/cypress/pages/multipleSelectionPage.js +1 -0
  101. package/cypress/pages/shortTextResponsePage.js +575 -33
  102. package/cypress/pages/singleSelectionGridPage.js +1 -2
  103. package/cypress/pages/singleSelectionPage.js +5 -6
  104. package/cypress/pages/textEntryMathPage.js +46 -22
  105. package/cypress/pages/textEntryMathWithImagePage.js +212 -0
  106. package/cypress/pages/uploadResponsePage.js +74 -21
  107. package/package.json +2 -2
  108. package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +0 -482
  109. package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +0 -412
  110. package/cypress/pages/components/figOverImageCommonComponent.js +0 -1113
  111. package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +0 -1155
  112. package/cypress/pages/dragAndDropIntoCategoriesCellsScoring.js +0 -1561
  113. package/cypress/pages/dragAndDropIntoCategoriesResponseScoring.js +0 -1396
  114. package/cypress/pages/fillInTheGapsScoring.js +0 -5872
  115. package/cypress/pages/fillInTheGapsSetCorrectAnswerSection.js +0 -260
@@ -1,11 +1,11 @@
1
1
  import utilities from "../support/helpers/utilities";
2
- import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, commonComponents, autoScoredScoringPreviewTab, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, backgroundImageUploadComponent, optionsWrapperComponent, figOverImageCanvasComponent, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, acceptedStudentInputComponent, customizeSpecialCharacterComponent } from "./components";
2
+ import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, commonComponents, autoScoredScoringPreviewTab, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, backgroundImageUploadComponent, optionsWrapperComponent, imageCanvasComponent, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, acceptedStudentInputComponent, customizeSpecialCharacterComponent, fillInTheGapsTextCommonComponent, additionalSettingsPanel } from "./components";
3
3
  import { dialogBoxBase } from "./dialogBoxBase";
4
4
  const css = Cypress.env('css');
5
5
 
6
6
  const selectors = {
7
7
  ...questionInstructionsComponent,
8
- ...figOverImageCanvasComponent,
8
+ ...imageCanvasComponent,
9
9
  ...commonComponents,
10
10
  ...correctIncorrectAnswerLabelComponent,
11
11
  ...customizeSpecialCharacterComponent,
@@ -14,50 +14,17 @@ const selectors = {
14
14
  ...autoScoredStudentViewSettings,
15
15
  ...autoScoredScoringPreviewTab,
16
16
  ...backgroundImageUploadComponent,
17
+ ...fillInTheGapsTextCommonComponent,
17
18
 
18
19
  //TODO: Update below selectors after https://redmine.zeuslearning.com/issues/557945 is resolved
19
- //response accordion
20
- responseAccordion: () => cy.get('.response-text-accordion'),
21
- responseAccordionLabel: () => cy.get('[class*="ResponseComponentstyles__Label"]'),
22
- responseAccordionAnswersLabel: () => cy.get('.correct-response-answer-wrapper-cls .points-label'),
23
- responseAccordionAnswerInputFieldWrapper: () => cy.get('.label-image-text-answer-label'),
24
- responseAccordionAnswerNumeration: () => cy.get('.additional-option-placeholder-input .start-adornment'),
25
- responseAccordionAnswerDeleteButton: () => cy.get('.delete-button'),
26
- responseAccordionPointsWrapper: () => cy.get('[class*="ResponseComponentstyles__PointsDiv"]'),
27
- responseAccordionPointsLabel: () => cy.get('[class*="ResponseComponentstyles__PointsLabel"]'),
28
- responseAccordionPointsScore: () => cy.get('[class*="ResponseComponentstyles__Points-"]'),
29
- responseAccordionPointsInputFieldWrapper: () => cy.get('[class*="ResponseComponentstyles__PointsWrapper"]'),
30
- responseAccordionAddAlternateButton: () => cy.get('.add-alternate-btn'),
31
- responseAccordionAddAlternateButtonLabel: () => cy.get('.add-alternate-btn p'),
32
- responseAreaNumeration: () => cy.get('.response-input-adornment'),
33
-
34
- answerInputFieldSpecifyCorrectAnswerSection: () => cy.get('.label-image-text-inline-text-field input'),
35
- answerInputFieldPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .response-input-field input'),
20
+
36
21
  responseContainerInPreviewTab: () => cy.get('[class*="AddTextResponseOnImagestyles__DraggableInput"]'),
37
22
  canvasInPreviewTab: () => cy.get('[class*="PreviewTabstyles__ContentWrapper"] .image-container'),
38
- correctAnswerSectionWrapper: () => cy.get('.cloze-with-text-correct-answer-wrapper'),
39
- correctAnswersLabel: () => cy.get('.label-image-with-text-correct-answer-label'),
40
- responseStatusWrapper: () => cy.get('.cloze-with-text-answer-status-response-preview-wrapper:visible'),
41
- tickIconWrapper: () => cy.get('.tick-icon-wrapper [data-name*="Rectangle"]'),
42
- responseAreaNumeration: () => cy.get('.response-input-adornment'),
43
- correctAnswerResponseNumeration: () => cy.get('.answer-numeration-number-box'),
44
- correctAnswerResponseWrapper: () => cy.get('[class*="ClozeWithTextResponsestyles__AnswerCell"]'),
45
- correctAnswerResponse: () => cy.get('[class*="AnswerWrapperForLabel"]'),
46
-
47
- setLimitLabel: () => cy.get('[class*="SetLimitWrapper"] .text-label'),
48
- minimumCharacterLimitLabel: () => cy.get('.label-image-min-max-container .additional-settings-label').eq(0),
49
- maximumCharacterLimitLabel: () => cy.get('.label-image-min-max-container .additional-settings-label').eq(1),
50
- minMaxLabelAndInputFieldWrapper: () => cy.get('.label-image-min-max-container'),
51
- minimumCharacterLimitInputField: () => cy.get('.label-image-min-max-container input').eq(0),
52
- maximumCharacterLimitInputField: () => cy.get('.label-image-min-max-container input').eq(1),
53
- characterRadioButton: () => cy.get('input[aria-label="Character"]'),
54
- characterLabel: () => cy.get('[aria-label="Character"].ngie-radio-label'),
55
- noneRadioButton: () => cy.get('input[aria-label="None"]'),
56
- noneLabel: () => cy.get('[aria-label="None"].ngie-radio-label'),
57
- limitReachedWarningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]'),
23
+
58
24
  limitReachedWarningMessageContainer: () => cy.get('.disabled-wrapper-cls'),
59
25
  correctAnswerResponseWrapper: () => cy.get('.label-image-with-text-correct-response-wrapper [class*="ClozeWithTextResponsestyles__AnswerCell"]'),
60
26
  specialCharactersButtonPreviewTab: () => cy.get('.cloze-with-text-special-character-button'),
27
+ tickIconWrapper: () => cy.get('.tick-icon-wrapper [data-name*="Rectangle"]'),
61
28
 
62
29
  //Special characters section
63
30
  specialCharactersLabel: () => cy.get('[class*="LabelImageWithTextstyles__CustomizedSpecialCharacterWrapper"]'),
@@ -101,89 +68,20 @@ const steps = {
101
68
  ...autoScoredSpecifyCorrectAnswerSection.steps,
102
69
  ...autoScoredScoringSectionMultiResponseType.steps,
103
70
  ...optionsWrapperComponent.steps,
104
- ...figOverImageCanvasComponent.steps,
71
+ ...imageCanvasComponent.steps,
105
72
  ...correctIncorrectAnswerLabelComponent.steps,
106
73
  ...autoScoredStudentViewSettings.steps,
107
74
  ...acceptedStudentInputComponent.steps,
108
75
  ...customizeSpecialCharacterComponent.steps,
109
76
  ...autoScoredStudentViewSettings.steps,
110
-
111
- /**
112
- * Enter text in the answer input fields of the specify correct answer section.
113
- * @param {Object[]} responses - An array of objects containing the responseIndex and responseText.
114
- * @param {number} responses[].responseIndex - The index of the answer input field for each response.
115
- * @param {string} responses[].responseText - The text to be entered in the respective answer input field.
116
- * @example - enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([
117
- * { responseIndex: 0, responseText: "Answer 1" },
118
- * { responseIndex: 1, responseText: "Answer 2" },
119
- * ]);
120
- */
121
- enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection: (responses) => {
122
- responses.forEach(({ responseIndex, responseText }) => {
123
- utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), responseIndex)
124
- .clear()
125
- .type(responseText)
126
- .blur();
127
- });
128
- },
129
-
130
- /**
131
- * Enter text in the answer input fields of the preview tab.
132
- * @param {Object[]} responses - An array of objects containing the responseIndex and responseText.
133
- * @param {number} responses[].responseIndex - The index of the answer input field for each response.
134
- * @param {string} responses[].responseText - The text to be entered in the respective answer input field.
135
- */
136
- enterTextInAnswerInputFieldsPreviewTab: (responses) => {
137
- responses.forEach(({ responseIndex, responseText }) => {
138
- utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab(), responseIndex)
139
- .clear()
140
- .type(responseText)
141
- .blur();
142
- });
143
- },
144
-
145
- //Used in setLimitSection.js only.
146
- /**
147
- * @param {number} responseIndex index number of text container
148
- * @param {string} responseText text to be added in text container
149
- * @description function enters text in the answer input fields of the preview tab
150
- */
151
- addTextInAnswerInputFieldsPreviewTab: (responseIndex, responseText) => {
152
- utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab(), responseIndex)
153
- .type(responseText);
154
- },
155
-
156
- /**
157
- * Verify text in the answer input fields of the preview tab.
158
- * @param {Object[]} responses - An array of objects containing the responseIndex and responseText.
159
- * @param {number} responses[].responseIndex - The index of the answer input field for each response.
160
- * @param {string} responses[].responseText - The text to be verified in the respective answer input field.
161
- */
162
- verifyTextInAnswerInputFieldsPreviewTab: (responses) => {
163
- responses.forEach(({ responseIndex, responseText }) => {
164
- utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab(), responseIndex)
165
- .should('have.value', responseText)
166
- });
167
- },
168
-
169
- /**
170
- * Verify that a specific answer input field is disabled on the preview tab.
171
- * @param {number} inputFieldIndex - The index of the disabled answer input field.
172
- */
173
- verifyAnswerInputFieldDisabled: (inputFieldIndex) => {
174
- utilities.verifyElementDisabled(utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab(), inputFieldIndex));
175
- },
176
-
177
- verifyCorrectAnswerSectionNotExists: () => {
178
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.correctAnswerSectionWrapper(), 'notExist');
179
- },
180
-
77
+ ...fillInTheGapsTextCommonComponent.steps,
78
+ ...additionalSettingsPanel.steps,
181
79
  /**
182
80
  * Verify that the incorrect option icon is displayed for a specific answer input field.
183
81
  * @param {number} inputFieldIndex - The index of the answer input field to verify.
184
82
  */
185
83
  verifyIncorrectOptionIcon: (inputFieldIndex) => {
186
- utilities.getNthElement(fillInTheGapsOverImageTextPage.responseStatusWrapper(), inputFieldIndex)
84
+ utilities.getNthElement(fillInTheGapsTextCommonComponent.responseStatusWrapper(), inputFieldIndex)
187
85
  .within(() => {
188
86
  utilities.verifyCSS(fillInTheGapsOverImageTextPage.tickIconWrapper(), {
189
87
  'fill': css.color.incorrectAnswer
@@ -196,7 +94,7 @@ const steps = {
196
94
  * @param {number} inputFieldIndex - The index of the answer input field to verify.
197
95
  */
198
96
  verifyCorrectOptionIcon: (inputFieldIndex) => {
199
- utilities.getNthElement(fillInTheGapsOverImageTextPage.responseStatusWrapper(), inputFieldIndex)
97
+ utilities.getNthElement(fillInTheGapsTextCommonComponent.responseStatusWrapper(), inputFieldIndex)
200
98
  .within(() => {
201
99
  utilities.verifyCSS(fillInTheGapsOverImageTextPage.tickIconWrapper(), {
202
100
  'fill': css.color.correctAnswer
@@ -209,38 +107,28 @@ const steps = {
209
107
  * @param {number} inputFieldIndex - The index of the answer input field to verify.
210
108
  */
211
109
  verifyCorrectIncorrectIconNotExist: (inputFieldIndex) => {
212
- utilities.getNthElement(fillInTheGapsOverImageTextPage.responseStatusWrapper(), inputFieldIndex)
110
+ utilities.getNthElement(fillInTheGapsTextCommonComponent.responseStatusWrapper(), inputFieldIndex)
213
111
  .within(() => {
214
112
  utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.tickIconWrapper(), 'notExist');
215
113
  });
216
114
  },
217
115
 
218
- verifyResponseAreaNumeration: () => {
219
- fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab()
220
- .each(($element, index) => {
221
- cy.wrap($element)
222
- .parents('.cloze-with-text-response-field-wrapper')
223
- .within(() => {
224
- utilities.verifyTextContent(fillInTheGapsOverImageTextPage.responseAreaNumeration(), `${index + 1}`);
225
- });
226
- });
227
- },
228
-
229
116
  /**
230
- * Verify correct answer responses in the correct answer section and count.
231
- * @param {string[]} correctAnswerArray - An array containing the expected correct answer responses.
232
- * @example verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Petals', 'Stem']);
117
+ * Enter text in the answer input fields of the specify correct answer section.
118
+ * @param {Object[]} responses - An array of objects containing the responseIndex and responseText.
119
+ * @param {number} responses[].responseIndex - The index of the answer input field for each response.
120
+ * @param {string} responses[].responseText - The text to be entered in the respective answer input field.
121
+ * @example - enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([
122
+ * { responseIndex: 0, responseText: "Answer 1" },
123
+ * { responseIndex: 1, responseText: "Answer 2" },
124
+ * ]);
233
125
  */
234
- verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount: (correctAnswerArray) => {
235
- utilities.verifyElementCount(fillInTheGapsOverImageTextPage.correctAnswerResponseWrapper(), correctAnswerArray.length);
236
- correctAnswerArray.forEach((correctAnswer, index) => {
237
- fillInTheGapsOverImageTextPage.correctAnswerResponseWrapper()
238
- .eq(index)
239
- .within(() => {
240
- utilities.verifyInnerText(fillInTheGapsOverImageTextPage.correctAnswerResponseNumeration(), `${index + 1}`);
241
- fillInTheGapsOverImageTextPage.correctAnswerResponse()
242
- .should('have.text', correctAnswer);
243
- });
126
+ enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection: (responses) => {
127
+ responses.forEach(({ responseIndex, responseText }) => {
128
+ utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), responseIndex)
129
+ .clear()
130
+ .type(responseText)
131
+ .blur();
244
132
  });
245
133
  },
246
134
 
@@ -386,9 +274,9 @@ const steps = {
386
274
  },
387
275
 
388
276
  /**
389
- * click on custom special character symbol in special characters popup in preview tab
390
- * @param {string} customSpecialCharacterSymbol custom special character symbol
391
- */
277
+ * Click on custom special character symbol in special characters popup in preview tab
278
+ * @param {string} customSpecialCharacterSymbol custom special character symbol
279
+ */
392
280
  clickOnCustomSpecialCharacterSymbolInSpecialCharactersPopupPreviewTab: (customSpecialCharacterSymbol) => {
393
281
  dialogBoxBase.dialogBox()
394
282
  .within(() => {
@@ -399,10 +287,10 @@ const steps = {
399
287
  },
400
288
 
401
289
  /**
402
- * Verify the points input field and label displayed in response accordions
403
- * @param {number} responseAccordionIndex index of response accordion
404
- * @param {number} pointsInputFieldValue Points input field value
405
- */
290
+ * Verify the points input field and label displayed in response accordions
291
+ * @param {number} responseAccordionIndex index of response accordion
292
+ * @param {number} pointsInputFieldValue Points input field value
293
+ */
406
294
  verifyPointsLabelAndInputFieldInResponseAccordion: (responseAccordionIndex, pointsInputFieldValue) => {
407
295
  utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionPointsInputFieldWrapper(), responseAccordionIndex)
408
296
  .within(() => {
@@ -414,10 +302,10 @@ const steps = {
414
302
  },
415
303
 
416
304
  /**
417
- * allot points inside response accordion points input field
418
- * @param {number} responseAccordionIndex index of response accordion
419
- * @param {number} pointsInputFieldValue Points input field value to be allotted
420
- */
305
+ * Allot points inside response accordion points input field
306
+ * @param {number} responseAccordionIndex index of response accordion
307
+ * @param {number} pointsInputFieldValue Points input field value to be allotted
308
+ */
421
309
  allotPointsInResponseAccordion: (responseAccordionIndex, pointsInputFieldValue) => {
422
310
  utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionPointsInputFieldWrapper(), responseAccordionIndex)
423
311
  .within(() => {
@@ -425,27 +313,6 @@ const steps = {
425
313
  });
426
314
  },
427
315
 
428
- verifyCharacterRadioButtonSelected: () => {
429
- fillInTheGapsOverImageTextPage.characterRadioButton()
430
- .should('be.checked');
431
- },
432
-
433
- verifyNoneRadioButtonNotSelected: () => {
434
- fillInTheGapsOverImageTextPage.noneRadioButton()
435
- .should('not.be.checked');
436
- },
437
-
438
- selectCharacterRadioButton: () => {
439
- fillInTheGapsOverImageTextPage.characterRadioButton()
440
- .click()
441
- .should('be.checked');
442
- },
443
-
444
- selectNoneRadioButton: () => {
445
- fillInTheGapsOverImageTextPage.noneRadioButton()
446
- .click()
447
- },
448
-
449
316
  /**
450
317
  *@description Verify text in the answer input fields of the specify correct answer section.
451
318
  * @param {Object[]} responses - An array of objects containing the responseIndex and responseText.
@@ -520,116 +387,6 @@ const steps = {
520
387
  .should('be.checked');
521
388
  },
522
389
 
523
- /**
524
- * @param {number} minLimit value of minimum input field
525
- * @description this function verifies the value in minimum limit input field
526
- */
527
- verifyMinimumCharacterLimitInputField: (minLimit) => {
528
- fillInTheGapsOverImageTextPage.minimumCharacterLimitInputField()
529
- .should('have.value', minLimit);
530
- },
531
-
532
- /**
533
- * @param {number} maxLimit value of maximum input field
534
- * @description this function verifies the value in maximum limit input field
535
- */
536
- verifyMaximumCharacterLimitInputField: (maxLimit) => {
537
- fillInTheGapsOverImageTextPage.maximumCharacterLimitInputField()
538
- .should('have.value', maxLimit);
539
- },
540
-
541
- /**
542
- * @param {number} maxLimit value to be entered in maximum limit input field
543
- * @description this function enters the value in maximum limit input field
544
- */
545
- setMaximumLimit: (maxLimit) => {
546
- fillInTheGapsOverImageTextPage.maximumCharacterLimitInputField()
547
- .clear()
548
- .type(maxLimit)
549
- .blur();
550
- },
551
-
552
- /**
553
- * @param {number} maxLimit value to be entered in maximum limit input field
554
- * @description this function verifies the value in maximum limit input field
555
- */
556
- verifyMaximumLimit: (maxLimit) => {
557
- fillInTheGapsOverImageTextPage.maximumCharacterLimitInputField()
558
- .should('have.value', maxLimit);
559
-
560
- },
561
-
562
- /**
563
- * @param {number} minLimit value to be entered in minimum limit input field
564
- * @description this function enters and verifies the value in minimum limit input field
565
- */
566
- setMinimumLimit: (minLimit) => {
567
- fillInTheGapsOverImageTextPage.minimumCharacterLimitInputField()
568
- .clear()
569
- .type(minLimit)
570
- .blur();
571
- },
572
-
573
- /**
574
- * @param {number} minLimit value to be entered in minimum limit input field
575
- * @description this function verifies the value in minimum limit input field
576
- */
577
- verifyMinimumLimit: (minLimit) => {
578
- fillInTheGapsOverImageTextPage.minimumCharacterLimitInputField()
579
- .should('have.value', minLimit)
580
- },
581
-
582
- clearAndFocusOutOfMaximumCharacterLimitInputField: () => {
583
- fillInTheGapsOverImageTextPage.maximumCharacterLimitInputField()
584
- .clear()
585
- .blur();
586
- },
587
-
588
- clearAndFocusOutOfMinimumCharacterLimitInputField: () => {
589
- fillInTheGapsOverImageTextPage.minimumCharacterLimitInputField()
590
- .clear()
591
- .blur();
592
- },
593
-
594
- verifyMaximumLimitErrorMessage: () => {
595
- utilities.verifyInnerText(utilities.getNthElement(commonComponents.errorMessage(), 1), 'Error: Maximum limit must be greater than or equal to Minimum limit.');
596
- utilities.verifyElementVisibilityState(utilities.getNthElement(commonComponents.errorMessage(), 1), 'visible');
597
- },
598
-
599
- verifyMinimumLimitErrorMessage: () => {
600
- utilities.verifyInnerText(utilities.getNthElement(commonComponents.errorMessage(), 0), 'Error: Minimum limit must be less than or equal to Maximum limit.');
601
- utilities.verifyElementVisibilityState(utilities.getNthElement(commonComponents.errorMessage(), 0), 'visible');
602
- },
603
-
604
- /**
605
- * @param {number} responseIndex index of response container
606
- * @param {number} maxlen value of maxlength attribute
607
- * @description function verifies maxlength attribute of response container in preview tab
608
- */
609
- verifyMaximumCharacterLimitInPreviewTab: (responseIndex, maxlen) => {
610
- utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab(), responseIndex)
611
- .should('have.attr', 'maxlength', maxlen);
612
- },
613
-
614
- /**
615
- * @param {number} responseIndex index of input field in specify correct answer
616
- * @param {number} maxlen value of maxlength attribute
617
- * @description function verifies maxlength attribute of input field in specify correct answer
618
- */
619
- verifyMaximumCharacterLimit: (responseIndex, maxlen) => {
620
- utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), responseIndex)
621
- .should('have.attr', 'maxlength', maxlen);
622
- },
623
-
624
- /**
625
- * @param {number} responseIndex index of response container in preview tab
626
- * @description function verifies maxlength attribute of input field in preview tab
627
- */
628
- verifyMaximumCharacterLimitNotExistInPreviewTab: (responseIndex) => {
629
- utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab(), responseIndex)
630
- .should('not.have.attr', 'maxlength');
631
- },
632
-
633
390
  verifyLimitReachedWarningMessageNotExist: () => {
634
391
  utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.limitReachedWarningMessage(), 'notExist');
635
392
  },
@@ -691,7 +448,7 @@ const steps = {
691
448
  * @param {string} style pointer style
692
449
  * @param {number} responseContainerIndex text container index
693
450
  */
694
- verifyTextContainerPointerStyleInPreviewTab: (style, responseContainerIndex) => {
451
+ verifyTextContainerPointerStyleInPreviewTab: (style, responseContainerIndex) => {
695
452
  const getPosition = (option) => {
696
453
  switch (option) {
697
454
  case 'bottom':
@@ -715,7 +472,7 @@ const steps = {
715
472
  const expectedPosition = getPosition(style);
716
473
  if (style == 'top right' || style == 'bottom right') {
717
474
  fillInTheGapsOverImageTextPage.responseContainerInPreviewTab()
718
- .eq( responseContainerIndex)
475
+ .eq(responseContainerIndex)
719
476
  .should('have.css', 'top', expectedPosition.top)
720
477
  .and('have.css', 'right', expectedPosition.right);
721
478
  }
@@ -723,11 +480,11 @@ const steps = {
723
480
  fillInTheGapsOverImageTextPage.responseContainerInPreviewTab()
724
481
  .should('not.exist')
725
482
  }
726
- else if(style == 'bottom'){
483
+ else if (style == 'bottom') {
727
484
  fillInTheGapsOverImageTextPage.responseContainerInPreviewTab()
728
- .eq(responseContainerIndex)
729
- .should('have.css', 'bottom', expectedPosition.bottom)
730
- .and('have.css', 'left', expectedPosition.left);
485
+ .eq(responseContainerIndex)
486
+ .should('have.css', 'bottom', expectedPosition.bottom)
487
+ .and('have.css', 'left', expectedPosition.left);
731
488
  }
732
489
  else {
733
490
  fillInTheGapsOverImageTextPage.responseContainerInPreviewTab()
@@ -738,7 +495,7 @@ const steps = {
738
495
  },
739
496
 
740
497
  verifyTextContainerNotExistInPreviewTab: () => {
741
- utilities.verifyElementVisibilityState( fillInTheGapsOverImageTextPage.responseContainerInPreviewTab(), 'notExist');
498
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseContainerInPreviewTab(), 'notExist');
742
499
  },
743
500
 
744
501
  /**
@@ -746,7 +503,7 @@ const steps = {
746
503
  * @description this function verifies width of canvas
747
504
  */
748
505
  verifyCanvasWidthInPreviewTab: (width) => {
749
- fillInTheGapsOverImageTextPage.canvasInPreviewTab()
506
+ fillInTheGapsOverImageTextPage.canvasInPreviewTab()
750
507
  .should('have.attr', 'width', width);
751
508
  },
752
509
 
@@ -755,7 +512,7 @@ const steps = {
755
512
  * @description this function verifies height of canvas
756
513
  */
757
514
  verifyCanvasHeightInPreviewTab: (height) => {
758
- fillInTheGapsOverImageTextPage.canvasInPreviewTab()
515
+ fillInTheGapsOverImageTextPage.canvasInPreviewTab()
759
516
  .should('have.css', 'height', `${height}px`);
760
517
  },
761
518
 
@@ -831,7 +588,7 @@ const steps = {
831
588
  throw new Error('invalid state string');
832
589
  }
833
590
  },
834
-
591
+
835
592
  /**
836
593
  * Verify answer input field placeholder text
837
594
  * @param {number} answerFieldIndex index of answer input field
@@ -867,8 +624,9 @@ const tests = {
867
624
  ...commonComponents.tests,
868
625
  ...autoScoredStudentViewSettings.tests,
869
626
  ...backgroundImageUploadComponent.tests,
870
- ...figOverImageCanvasComponent.tests,
627
+ ...imageCanvasComponent.tests,
871
628
  ...questionInstructionsComponent.tests,
629
+ ...fillInTheGapsTextCommonComponent.tests,
872
630
 
873
631
  /**
874
632
  * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.