itemengine-cypress-automation 1.0.246 → 1.0.247

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  2. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
  3. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +349 -0
  4. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +348 -0
  5. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +415 -0
  6. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingPenaltyScoring.js +54 -0
  7. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightBasic.js +254 -0
  8. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightBasic.js +255 -0
  9. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +4 -0
  10. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +2 -0
  11. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +3 -0
  12. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +4 -0
  13. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
  14. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +2 -0
  15. package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +2 -0
  16. package/cypress/e2e/ILC/ImageHighlight/toolsFunctionalityEditTab.js +2 -2
  17. package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +270 -0
  18. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsBasic.js +95 -0
  19. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +236 -0
  20. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialEqualWeightsBasic.js +150 -0
  21. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/setPointsPopup.js +88 -0
  22. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +97 -0
  23. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/studentViewSettings.js +134 -0
  24. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/additionalSettings.js +131 -0
  25. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabBasicSection.js +167 -0
  26. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +202 -0
  27. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/headerSection.js +76 -0
  28. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/manuallyAndNonScoredEditTab.js +72 -0
  29. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/minimumScoringPenaltyPointsAndRoundingDropdown.js +197 -0
  30. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/optionsOrientationSection.js +180 -0
  31. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +95 -0
  32. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/studentViewSettings.js +130 -0
  33. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
  34. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionsPanel.js +121 -0
  35. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneConnectorStyle.js +68 -0
  36. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionAlignment.js +71 -0
  37. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionPlacement.js +64 -0
  38. package/cypress/e2e/ILC/MatchingDropdown/styleAndLayoutCustomization.js +270 -0
  39. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
  40. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
  41. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +7 -7
  42. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
  43. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
  44. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
  45. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -4
  46. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
  47. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
  48. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
  49. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +4 -4
  50. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
  51. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +272 -0
  52. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +6 -6
  53. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  54. package/cypress/pages/audioPlayerPage.js +4 -4
  55. package/cypress/pages/audioResponsePage.js +9 -1
  56. package/cypress/pages/chartsBarPage.js +3 -3
  57. package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +51 -0
  58. package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
  59. package/cypress/pages/components/index.js +1 -10
  60. package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +604 -0
  61. package/cypress/pages/components/optionsWrapperComponent.js +1 -1
  62. package/cypress/pages/components/setPointsPopupBase.js +6 -6
  63. package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
  64. package/cypress/pages/essayResponseBasicPage.js +4 -4
  65. package/cypress/pages/essayResponseMathPage.js +4 -4
  66. package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -2
  67. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
  68. package/cypress/pages/index.js +0 -1
  69. package/cypress/pages/itemPreviewPage.js +1 -2
  70. package/cypress/pages/itemPreviewSettingsPage.js +3 -3
  71. package/cypress/pages/listOrderingPage.js +384 -10
  72. package/cypress/pages/matchingPage.js +512 -13
  73. package/cypress/pages/multipleSelectionPage.js +2 -2
  74. package/cypress/pages/numberLineLabelPage.js +3 -3
  75. package/cypress/pages/shortTextResponsePage.js +0 -37
  76. package/cypress/pages/singleSelectionPage.js +2 -2
  77. package/cypress/pages/textEntryMathPage.js +41 -9
  78. package/cypress/pages/textSelectionPage.js +2 -2
  79. package/cypress/pages/uploadResponsePage.js +2 -3
  80. package/cypress/pages/videoResponsePage.js +9 -2
  81. package/package.json +1 -1
  82. package/cypress/fixtures/specialAndMathCharacters.js +0 -120
  83. package/cypress/pages/components/autoScoredAdditionalSettings.js +0 -183
  84. package/cypress/pages/components/autoScoredPreviewBase.js +0 -92
  85. package/cypress/pages/components/autoScoredScoringSection.js +0 -199
  86. package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +0 -377
  87. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +0 -297
  88. package/cypress/pages/components/autoScoredStudentViewSettingsForPredefinedOptions.js +0 -84
  89. package/cypress/pages/components/listSortingAndOrderingBase.js +0 -401
  90. package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +0 -91
  91. package/cypress/pages/components/scoringSectionBase.js +0 -354
  92. package/cypress/pages/components/specialAndCustomSpecialCharactersComponent.js +0 -80
  93. package/cypress/pages/components/specialCharactersFlyoutComponent.js +0 -59
  94. package/cypress/pages/listSortingPage.js +0 -1198
@@ -1,6 +1,7 @@
1
1
  import constants from "../fixtures/constants";
2
2
  import utilities from "../support/helpers/utilities";
3
- import { autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, optionsWrapperComponent, questionInstructionsComponent, randomizeOptionsComponent, scoringSectionBaseEditTab, studentViewSettingsLabelComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, enableOuterBorderComponent } from "./components"
3
+ import { autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, optionsWrapperComponent, questionInstructionsComponent, randomizeOptionsComponent, scoringSectionBaseEditTab, studentViewSettingsLabelComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, enableOuterBorderComponent, styleAndLayoutCustomizationAccordionComponent } from "./components"
4
+ import { listOrderingCommonStyleAndLayoutComponent } from "./components/listOrderingCommonStyleAndLayoutComponent";
4
5
  const options = ['sprout', 'plant', 'flower', 'seed'];
5
6
  const css = Cypress.env('css');
6
7
 
@@ -15,6 +16,8 @@ const selectors = {
15
16
  ...correctIncorrectAnswerLabelComponent,
16
17
  ...autoScoredSpecifyCorrectAnswerSection,
17
18
  ...enableOuterBorderComponent,
19
+ ...styleAndLayoutCustomizationAccordionComponent,
20
+ ...listOrderingCommonStyleAndLayoutComponent,
18
21
  //Specify correct answer section
19
22
  optionSpecifyCorrectAnswerSection: () => cy.get('.list-ordering-set-correct-answer [class*="AnswerWrapper"][role="button"]'),
20
23
  optionTextSpecifyCorrectAnswerSection: () => cy.get('.draggable-item-wrapper[overflow] .question-text-wrapper'),
@@ -96,6 +99,32 @@ const selectors = {
96
99
  optionsSeperateList: () => cy.get('[class*="DraggableItemstyle__ItemWrapper"]'),
97
100
  droppedOptionSeperateList: () => cy.get('[class*="MultipleDroppedItemstyles__FlexWrapper"]'),
98
101
  correctAnswersWrapper: () => cy.get('.correct-answers-wrapper'),
102
+ partialDifferentWeightsPointsLabelSeparateList: () => cy.get('[class*="ListOrderingResponsestyles__PartialPointsPerResponseLabel"]'),
103
+ optionOrientationSeparateList: () => cy.get('[class*="ClozeWithDragAndDropstyles__DraggableItemsGrid"]'),
104
+ specifyCorrectAnswerSectionMyListLabel: () => cy.get('[class*="ReorderAsSeparatestyles__TitleContainer"]'),
105
+ outerBorderPreviewSeparateList: () => cy.get('[class*="ReorderAsSeparatestyles__ReorderSeparateWrapper"]'),
106
+
107
+ //Style and layout
108
+ optionsLabel: () => cy.get('.draggable-options-label'),
109
+ dragHandleIconLabel: () => cy.get('[class*="__SubSectionLabel"]').eq(0),
110
+ dragHandleOptions: () => cy.get('.drag-handle-icon-block'),
111
+ dragHandle: () => cy.get('.draggable-item-wrapper [class*="drag"]'),
112
+ dragHandleSeperateList: () => cy.get('.draggable-selected-option [class*="drag"]'),
113
+ withBorderOptionStyleButton: () => cy.get('[data-ngie-testid="with-border-toggle-button"]'),
114
+ withoutBorderOptionStyleButton: () => cy.get('[data-ngie-testid="without-border-toggle-button"]'),
115
+ specifyCorrectanswerSectionOption: () => cy.get('[class*="ListOrderingResponsestyles__ItemWrapper"]'),
116
+ noConnectorsButton: () => cy.get('[data-ngie-testid="no-connectors-toggle-button"]'),
117
+ connectorsButton: () => cy.get('[data-ngie-testid="connectors-toggle-button"]'),
118
+ connectorIcon: () => cy.get('[class*="ListOrderingResponsestyles__ShowIconWrapper"]'),
119
+ connectorType: () => cy.get('[class*="StyleAndLayoutCustomizationstyles__DropzoneConnectorOptionsWrapper"] [type="button"]'),
120
+ fillAndBorderColorWrapper: () => cy.get('[class*="DraggableOptionsstyles__ColorOptionWrapper"]'),
121
+ listContainerLabel: () => cy.get('.dropzone-label'),
122
+ specifyCorrectanswerSectionOptionSeperateList: () => cy.get('[class*="DraggableItemstyle__ItemWrapper"]'),
123
+ draggableOptionPanelLabel: () => cy.get('.draggable-option-panel-label'),
124
+ panelPlacementLabel: () => cy.get('.panel-placement-style .options-label'),
125
+ leftToggleButton: () => cy.get('[data-ngie-testid="left-toggle-button"]'),
126
+ rightToggleButton: () => cy.get('[data-ngie-testid="right-toggle-button"]'),
127
+ pannelPlacementRightToggle: () => cy.get('.panel-placement-reversed-cls'),
99
128
  }
100
129
 
101
130
  const steps = {
@@ -112,6 +141,209 @@ const steps = {
112
141
  ...commonComponents.steps,
113
142
  ...additionalSettingsPanel.steps,
114
143
  ...enableOuterBorderComponent.steps,
144
+ ...styleAndLayoutCustomizationAccordionComponent.steps,
145
+ ...listOrderingCommonStyleAndLayoutComponent.steps,
146
+
147
+ /**
148
+ * Verifies the border value of specify correct answer section options
149
+ * @param {string} borderValue - The expected border value.
150
+ */
151
+ verifyBorderStyleInSpecifyCorrectAnswer: (borderValue) => {
152
+ utilities.verifyCSS(listOrderingPage.specifyCorrectanswerSectionOption(), {
153
+ 'border': borderValue
154
+ });
155
+ },
156
+
157
+ /**
158
+ * Verifies the border value of specify correct answer section options for seperate list
159
+ * @param {string} borderValue - The expected border value.
160
+ */
161
+ verifyBorderStyleInSpecifyCorrectAnswerForSeperateList: (borderValue) => {
162
+ utilities.verifyCSS(listOrderingPage.specifyCorrectanswerSectionOptionSeperateList(), {
163
+ 'border': borderValue
164
+ });
165
+ },
166
+
167
+ /**
168
+ * Verifies that left toogle button is selected.
169
+ */
170
+ verifyLeftToggleButtonSelected: () => {
171
+ listOrderingPage.leftToggleButton()
172
+ .should('have.attr', 'aria-pressed', 'true')
173
+ },
174
+
175
+ /**
176
+ * Verifies that right toogle button is selected.
177
+ */
178
+ verifyRightToggleButtonSelected: () => {
179
+ listOrderingPage.rightToggleButton()
180
+ .should('have.attr', 'aria-pressed', 'true')
181
+ },
182
+
183
+ /**
184
+ * Verifies that the with border option style button is selected.
185
+ */
186
+ verifyWithBorderOptionStyleButtonSelected: () => {
187
+ listOrderingPage.withBorderOptionStyleButton()
188
+ .should('have.attr', 'aria-pressed', 'true')
189
+ },
190
+
191
+ /**
192
+ * Verifies that the without border option style button is selected.
193
+ */
194
+ verifyWithoutBorderOptionStyleButtonSelected: () => {
195
+ listOrderingPage.withoutBorderOptionStyleButton()
196
+ .should('have.attr', 'aria-pressed', 'true')
197
+ },
198
+
199
+ /**
200
+ * Verifies that the no connectors button is selected.
201
+ */
202
+ verifyNoConnectorsButtonSelected: () => {
203
+ listOrderingPage.noConnectorsButton()
204
+ .should('have.attr', 'aria-pressed', 'true')
205
+ },
206
+
207
+ /**
208
+ * Verifies that the connectors button is selected.
209
+ */
210
+ verifyConnectorsButtonSelected: () => {
211
+ listOrderingPage.connectorsButton()
212
+ .should('have.attr', 'aria-pressed', 'true')
213
+ },
214
+
215
+ /**
216
+ * Verifies that the specified drag handle option is selected.
217
+ * @param {number} index - The index of the drag handle option to verify.
218
+ */
219
+ verifyDragHandleOptionSelected: (index) => {
220
+ listOrderingPage.dragHandleOptions()
221
+ .eq(index)
222
+ .should('have.attr', 'aria-pressed', 'true')
223
+ .within(() => {
224
+ listOrderingPage.colorBlockSelectedIcon()
225
+ .should('exist');
226
+ });
227
+ },
228
+
229
+ verifyDragHandleIconSpecifyCorrectAnswer: (dragHandleOption, listType) => {
230
+ let dragIcon;
231
+ if (listType === "SameList") {
232
+ dragIcon = listOrderingPage.dragHandle();
233
+ } else if (listType === "SeperateList") {
234
+ dragIcon = listOrderingPage.dragHandleSeperateList();
235
+ }
236
+ switch (dragHandleOption) {
237
+ case 'drag icon':
238
+ dragIcon
239
+ .should('have.class', 'drag-icon-button');
240
+ break;
241
+ case 'arrow icon':
242
+ dragIcon
243
+ .should('have.class', 'drag-arrows-icon');
244
+ break;
245
+ case 'none':
246
+ dragIcon
247
+ .should('not.exist');
248
+ break;
249
+ default:
250
+ throw new Error('Invalid drag handle option');
251
+ }
252
+ },
253
+
254
+ /**
255
+ * Selects a drag handle option.
256
+ * @param {number} index - The index of the drag handle option to select.
257
+ */
258
+ selectDragHandleOption: (index) => {
259
+ listOrderingPage.dragHandleOptions()
260
+ .eq(index)
261
+ .click();
262
+ },
263
+
264
+ /**
265
+ * Selects a right toggle button.
266
+ */
267
+ selectRightToggleButton: () => {
268
+ listOrderingPage.rightToggleButton()
269
+ .click();
270
+ },
271
+
272
+ /**
273
+ * Selects a without border option style button.
274
+ */
275
+ selectWithoutBorderOptionStyleButton: () => {
276
+ listOrderingPage.withoutBorderOptionStyleButton()
277
+ .click();
278
+ },
279
+
280
+ /**
281
+ * Selects connectors button.
282
+ */
283
+ selectConnectorsButton: () => {
284
+ listOrderingPage.connectorsButton()
285
+ .click();
286
+ },
287
+
288
+ /**
289
+ * verify connectors are visible or not
290
+ * @param {number} totalNumberOfConnectors - total number of connectors present in specify correct answer section
291
+ */
292
+ verifyTotalNumberOfConnectors: (totalNumberOfConnectors) => {
293
+ for (let connector = 0; connector < totalNumberOfConnectors; connector++) {
294
+ utilities.verifyElementVisibilityState(listOrderingPage.connectorIcon().eq(connector), 'visible');
295
+ }
296
+ },
297
+
298
+ /**
299
+ * Verifies the connector.
300
+ * @param {string} connectorName - name of the connector
301
+ */
302
+ verifyConnectorType: (connectorName) => {
303
+ switch (connectorName) {
304
+ case 'Left Arrow':
305
+ listOrderingPage.connectorType().eq(0)
306
+ .should('have.attr', 'aria-label', 'leftArrow connector end point shape');
307
+ break;
308
+ case 'Right Arrow':
309
+ listOrderingPage.connectorType().eq(1)
310
+ .should('have.attr', 'aria-label', 'rightArrow connector end point shape');
311
+ break;
312
+ case 'Double Arrow':
313
+ listOrderingPage.connectorType().eq(2)
314
+ .should('have.attr', 'aria-label', 'doubleArrow connector end point shape');
315
+ break;
316
+ case 'Line':
317
+ listOrderingPage.connectorType().eq(3)
318
+ .should('have.attr', 'aria-label', 'line connector end point shape');
319
+ break;
320
+ case 'Dash':
321
+ listOrderingPage.connectorType().eq(4)
322
+ .should('have.attr', 'aria-label', 'dashed connector end point shape');
323
+ break;
324
+ }
325
+ },
326
+
327
+ /**
328
+ * Verifies that the connector is selected.
329
+ * @param {number} index - The index of the connector to verify.
330
+ */
331
+ verifyConnectorTypeSelected: (index) => {
332
+ listOrderingPage.connectorType()
333
+ .eq(index)
334
+ .should('have.attr', 'aria-pressed', 'true');
335
+ },
336
+
337
+ /**
338
+ * Selects a connector type.
339
+ * @param {number} index - The index of the connector type to select.
340
+ */
341
+ selectConnectorType: (index) => {
342
+ listOrderingPage.connectorType()
343
+ .eq(index)
344
+ .click();
345
+ },
346
+
115
347
  /**
116
348
  * @param {string} optionsText text content of the option
117
349
  * @param {number} targetIndex the position at which the options is being dropped
@@ -173,7 +405,7 @@ const steps = {
173
405
  .eq(optionIndex)
174
406
  .find('[role="math"]')
175
407
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
176
- .contains(constants.CKEditorInputFieldEnteredEquationText);
408
+ // .contains(constants.CKEditorInputFieldEnteredEquationText); ;
177
409
  },
178
410
 
179
411
  /**
@@ -268,7 +500,7 @@ const steps = {
268
500
  .eq(optionIndex)
269
501
  .find('[role="math"]')
270
502
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
271
- .contains(constants.CKEditorInputFieldEnteredEquationText);
503
+ // .contains(constants.CKEditorInputFieldEnteredEquationText); ;
272
504
  },
273
505
 
274
506
  /**
@@ -333,6 +565,18 @@ const steps = {
333
565
  });
334
566
  return optionsArray;
335
567
  },
568
+ getOptionsArraySeparateList: () => {
569
+ const optionsArray = []
570
+ listOrderingPage.optionsSeperateList()
571
+ .each(($el) => {
572
+ cy.wrap($el)
573
+ .invoke('text')
574
+ .then((text) => {
575
+ optionsArray.push(text);
576
+ });
577
+ });
578
+ return optionsArray;
579
+ },
336
580
 
337
581
  /**
338
582
  * @param {string[]} optionsArray array of options set in the options section
@@ -361,6 +605,33 @@ const steps = {
361
605
  .should('not.have.text', '')
362
606
  .and('not.have.text', previousOrderOfOptionsArray.join(''));
363
607
  },
608
+ /**
609
+ * @param {string[]} optionsArray array of options set in the options section
610
+ * @description this function verifies if the options are Randomized in the preview tab
611
+ */
612
+ verifyRandomizeOptionOrderSeparateList: (optionsArray) => {
613
+ let currentOptionsArray = [...optionsArray]
614
+ cy.log(currentOptionsArray)
615
+ for (let index = 0; index < currentOptionsArray.length; index++) {
616
+ listOrderingPage.optionsSeperateList()
617
+ .eq(index)
618
+ .then(($element) => {
619
+ expect($element.text()).to.be.oneOf(currentOptionsArray);
620
+ currentOptionsArray = currentOptionsArray.filter((value) => value !== $element.text())
621
+ });
622
+ };
623
+ listOrderingPage.steps.verifyOptionsAreReRandomizedSeparateList(optionsArray)
624
+ },
625
+
626
+ /**
627
+ * @param {string[]} previousOrderOfOptionsArray array of previous order of options
628
+ * @description this function verifies that the order of the options is different from the previous order
629
+ */
630
+ verifyOptionsAreReRandomizedSeparateList: (previousOrderOfOptionsArray) => {
631
+ listOrderingPage.optionsSeperateList()
632
+ .should('not.have.text', '')
633
+ .and('not.have.text', previousOrderOfOptionsArray.join(''));
634
+ },
364
635
 
365
636
  verifyOuterBorderOfQuestionPreview: () => {
366
637
  utilities.verifyCSS(listOrderingPage.questionBorderPreviewTab(), {
@@ -380,6 +651,12 @@ const steps = {
380
651
  .and('match', /0px none/);
381
652
  },
382
653
 
654
+ verifyOuterBorderOfQuestionPreviewNotExistsSeparateList: () => {
655
+ listOrderingPage.outerBorderPreviewSeparateList()
656
+ .should('have.css', 'border')
657
+ .and('match', /0px none/);
658
+ },
659
+
383
660
  /**
384
661
  * @description Verifies that the image in the Specify Correct Answer section has the correct source and alt text.
385
662
  * @param {number} index - The index of the option in the Specify Correct Answer section.
@@ -409,7 +686,7 @@ const steps = {
409
686
  utilities.getNthElement(listOrderingPage.optionSpecifyCorrectAnswerSection(), index)
410
687
  .find('[role="math"]')
411
688
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
412
- .contains(constants.CKEditorInputFieldEnteredEquationText);
689
+ // .contains(constants.CKEditorInputFieldEnteredEquationText); ;
413
690
  },
414
691
 
415
692
  /**
@@ -594,7 +871,7 @@ const steps = {
594
871
  .eq(optionIndex)
595
872
  .find('[role="math"]')
596
873
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
597
- .contains(constants.CKEditorInputFieldEnteredEquationText);
874
+ // .contains(constants.CKEditorInputFieldEnteredEquationText); ;
598
875
  },
599
876
 
600
877
  /**
@@ -961,7 +1238,7 @@ const steps = {
961
1238
  .eq(optionIndex)
962
1239
  .find('[role="math"]')
963
1240
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
964
- .contains(constants.CKEditorInputFieldEnteredEquationText);
1241
+ // .contains(constants.CKEditorInputFieldEnteredEquationText); ;
965
1242
  },
966
1243
 
967
1244
  /**
@@ -1005,7 +1282,7 @@ const steps = {
1005
1282
  .eq(optionIndex)
1006
1283
  .find('[role="math"]')
1007
1284
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
1008
- .contains(constants.CKEditorInputFieldEnteredEquationText);
1285
+ // .contains(constants.CKEditorInputFieldEnteredEquationText); ;
1009
1286
  },
1010
1287
 
1011
1288
  /**
@@ -1060,6 +1337,23 @@ const steps = {
1060
1337
  }
1061
1338
  },
1062
1339
 
1340
+ /** Verifies the orientation option on the list ordering page in specify correct answer.
1341
+ * @param {'Vertical' | 'Horizontal'} orientationOption - The orientation option to verify.
1342
+ */
1343
+ verifyOptionOrientationSeparateList: (orientationOption) => {
1344
+ switch (orientationOption) {
1345
+ case 'Vertical':
1346
+ listOrderingPage.optionOrientationSeparateList()
1347
+ .should('have.css', 'display', 'flex')
1348
+ .should('have.css', 'flex-wrap', 'wrap');
1349
+ break;
1350
+ case 'Horizontal':
1351
+ listOrderingPage.optionOrientationSeparateList()
1352
+ .should('have.css', 'display', 'flex');
1353
+ break;
1354
+ }
1355
+ },
1356
+
1063
1357
  /** Verifies the orientation option on the list ordering page in specify correct answer.
1064
1358
  * @param {'enabled' | 'disabled'} wrappingState - The orientation option to verify.
1065
1359
  */
@@ -1076,6 +1370,22 @@ const steps = {
1076
1370
  }
1077
1371
  },
1078
1372
 
1373
+ /** Verifies the orientation option on the list ordering page in specify correct answer.
1374
+ * @param {'enabled' | 'disabled'} wrappingState - The orientation option to verify.
1375
+ */
1376
+ verifyHorizontalWrappingSeparateList: (wrappingState) => {
1377
+ switch (wrappingState) {
1378
+ case 'enabled':
1379
+ listOrderingPage.optionOrientationSeparateList()
1380
+ .should('have.css', 'flex-wrap', 'wrap');
1381
+ break;
1382
+ case 'disabled':
1383
+ listOrderingPage.optionOrientationSeparateList()
1384
+ .should('not.have.css', 'flex-wrap', 'wrap');
1385
+ break;
1386
+ }
1387
+ },
1388
+
1079
1389
  /** Verifies the orientation option on the list ordering page in preview tab.
1080
1390
  * @param {'Vertical' | 'Horizontal'} orientationOption - The orientation option to verify.
1081
1391
  */
@@ -1155,6 +1465,16 @@ const steps = {
1155
1465
  });
1156
1466
  },
1157
1467
 
1468
+ /**
1469
+ * Verifies the order of options in seperate list.
1470
+ * @param {string[]} optionsTextArray - An array containing the text of options in the expected order.
1471
+ */
1472
+ verifyOptionsOrderAsSeperateList: (optionsTextArray) => {
1473
+ optionsTextArray.forEach((option, index) => {
1474
+ utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.optionsSeperateList(), index), option);
1475
+ });
1476
+ },
1477
+
1158
1478
  /**
1159
1479
  * @param {string} optionsText option to be checked for the correct icon
1160
1480
  * @description This function verifies the correct icon in the preview tab
@@ -1188,6 +1508,26 @@ const steps = {
1188
1508
  .click();
1189
1509
  },
1190
1510
 
1511
+ clickAndUnDropOptionSeperateList: (optionsText) => {
1512
+ listOrderingPage.dropzoneSeperateList()
1513
+ .contains(optionsText)
1514
+ .realClick();
1515
+ listOrderingPage.optionOrientationSeparateList()
1516
+ .realClick();
1517
+ },
1518
+
1519
+ /**
1520
+ * @param {string} optionsText text content of the equation option
1521
+ * @description click and drop a equation option into the dropzone in the specify correct answer section
1522
+ */
1523
+ clickAndDropEquationOptionSeperateList: (optionsText) => {
1524
+ listOrderingPage.optionsSeperateList()
1525
+ .contains(optionsText)
1526
+ .realClick();
1527
+ listOrderingPage.dropzoneSeperateList()
1528
+ .realClick();
1529
+ },
1530
+
1191
1531
  /**
1192
1532
  * Verifies the order of Horizontal options in the "Specify Correct Answer" section.
1193
1533
  * @param {string[]} optionsTextArray - An array containing the text of options in the expected order.
@@ -1217,7 +1557,7 @@ const steps = {
1217
1557
  .eq(optionIndex)
1218
1558
  .find('[role="math"]')
1219
1559
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
1220
- .contains(constants.CKEditorInputFieldEnteredEquationText);
1560
+ // .contains(constants.CKEditorInputFieldEnteredEquationText); ;
1221
1561
  },
1222
1562
 
1223
1563
  /**
@@ -1229,7 +1569,19 @@ const steps = {
1229
1569
  .eq(optionIndex)
1230
1570
  .find('[role="math"]')
1231
1571
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
1232
- .contains(constants.CKEditorInputFieldEnteredEquationText);
1572
+ // .contains(constants.CKEditorInputFieldEnteredEquationText); ;
1573
+ },
1574
+
1575
+ /**
1576
+ * @description Verifies that the equation text in the correct answer section is correct.
1577
+ * @param {number} optionIndex - The index of the option in the Preview tab.
1578
+ */
1579
+ verifyOptionWithEquationTextInDropzoneCorrectAnswerSectionSeperateListEditTab: (optionIndex) => {
1580
+ listOrderingPage.droppedOptionSeperateList()
1581
+ .eq(optionIndex)
1582
+ .find('[role="math"]')
1583
+ .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
1584
+ // .contains(constants.CKEditorInputFieldEnteredEquationText); ;
1233
1585
  },
1234
1586
 
1235
1587
  /**
@@ -1241,7 +1593,7 @@ const steps = {
1241
1593
  .eq(optionIndex)
1242
1594
  .find('[role="math"]')
1243
1595
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
1244
- .contains(constants.CKEditorInputFieldEnteredEquationText);
1596
+ // .contains(constants.CKEditorInputFieldEnteredEquationText); ;
1245
1597
  },
1246
1598
 
1247
1599
  /**
@@ -1289,6 +1641,17 @@ const steps = {
1289
1641
  .should('have.text', 'This is a bold option');
1290
1642
  },
1291
1643
 
1644
+ /**
1645
+ * @description Verifies that the bold text in the correct answer section is correct for seperate list.
1646
+ * @param {number} optionIndex - The index of the option in the Preview tab.
1647
+ */
1648
+ verifyOptionWithBoldTextInDropzoneCorrectAnswerSectionSeperateListEditTab: (optionIndex) => {
1649
+ listOrderingPage.droppedOptionSeperateList()
1650
+ .eq(optionIndex)
1651
+ .find('strong')
1652
+ .should('have.text', 'This is a bold option');
1653
+ },
1654
+
1292
1655
  /**
1293
1656
  * @description Verifies that the bold text in the Preview tab is correct for seperate list.
1294
1657
  * @param {number} optionIndex - The index of the option in the Preview tab.
@@ -1377,6 +1740,8 @@ const tests = {
1377
1740
  ...additionalSettingsAccessibilitySectionComponent.tests,
1378
1741
  ...createQuestionBasePage.tests,
1379
1742
  ...enableOuterBorderComponent.tests,
1743
+ ...styleAndLayoutCustomizationAccordionComponent.tests,
1744
+ ...listOrderingCommonStyleAndLayoutComponent.tests,
1380
1745
  verifyContentsOfSpecifyCorrectAnswerSection: () => {
1381
1746
  it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
1382
1747
  utilities.verifyElementCount(listOrderingPage.optionSpecifyCorrectAnswerSection(), 4);
@@ -1386,6 +1751,15 @@ const tests = {
1386
1751
  });
1387
1752
  });
1388
1753
  },
1754
+ verifyContentsOfSpecifyCorrectAnswerSectionSeperateList: () => {
1755
+ it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
1756
+ utilities.verifyElementCount(listOrderingPage.optionsSeperateList(), 4);
1757
+ listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
1758
+ options.forEach((optionText, index) => {
1759
+ utilities.verifyElementVisibilityState(utilities.getNthElement(listOrderingPage.draggableOptionDragIcon(), index), 'visible');
1760
+ });
1761
+ });
1762
+ },
1389
1763
 
1390
1764
  verifyContentsOfSpecifyCorrectAnswerSectionDropdownLayout: () => {
1391
1765
  it('By default, 4 options should be displayed with dropdowns in the specify correct answer section', () => {