itemengine-cypress-automation 1.0.145-equationAndCheckAnswerSeelctorUpdate-b61f46e.0 → 1.0.145

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +2 -2
  2. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +1 -1
  3. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingPenaltyScoring.js +0 -1
  4. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -1
  5. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +0 -1
  6. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
  7. package/cypress/e2e/ILC/Graphing/Scoring/manuallyAndNonScoredScoring.js +0 -2
  8. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -12
  9. package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
  10. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +0 -2
  11. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +1 -0
  12. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
  13. package/cypress/e2e/ILC/Graphing/specifyCorrectAnswerSection.js +0 -1
  14. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +0 -1
  15. package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +8 -8
  16. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  17. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +256 -0
  18. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +252 -0
  19. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +335 -0
  20. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingPenaltyScoring.js +60 -0
  21. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +157 -0
  22. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +2 -2
  23. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +497 -0
  24. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
  25. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +200 -0
  26. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +280 -0
  27. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +281 -0
  28. package/cypress/e2e/ILC/Matching/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
  29. package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +146 -0
  30. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingPenaltyScoring.js +55 -0
  31. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsBasic.js +116 -0
  32. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +307 -0
  33. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +163 -0
  34. package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -3
  35. package/cypress/e2e/ILC/MultipleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  36. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -0
  37. package/cypress/e2e/ILC/SingleSelectionGridNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  38. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -5
  39. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +11 -10
  40. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +6 -9
  41. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +12 -5
  42. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +1 -2
  43. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -0
  44. package/cypress/pages/components/desmosToolComponent.js +1 -1
  45. package/cypress/pages/components/gridQuestionCommonComponent.js +28 -4
  46. package/cypress/pages/components/index.js +1 -0
  47. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +132 -0
  48. package/cypress/pages/dragAndDropIntoCategoriesPage.js +3 -113
  49. package/cypress/pages/geoGebraToolsPage.js +1 -1
  50. package/cypress/pages/graphingPage.js +6 -0
  51. package/cypress/pages/gridFillPage.js +67 -12
  52. package/cypress/pages/index.js +2 -1
  53. package/cypress/pages/matchingPage.js +433 -0
  54. package/cypress/pages/multipleSelectionGridPage.js +11 -3
  55. package/cypress/pages/singleSelectionGridPage.js +2 -1
  56. package/cypress/pages/textEntryMathPage.js +5 -0
  57. package/cypress/pages/textEntryMathWithImagePage.js +6 -1
  58. package/package.json +2 -2
@@ -0,0 +1,433 @@
1
+ import constants from "../fixtures/constants";
2
+ import utilities from "../support/helpers/utilities";
3
+ import { createQuestionBasePage, questionInstructionsComponent, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, draggableOptionContainer, draggableOptionsSectionComponent, correctIncorrectAnswerLabelComponent, maximumCapacityPerDropzoneComponent, optionsWrapperComponent, ckEditorToolbar, equationEditorFlyout, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents } from "./components";
4
+ import { dialogBoxBase } from "./dialogBoxBase";
5
+ const css = Cypress.env('css');
6
+
7
+ const selectors = {
8
+ ...correctIncorrectAnswerLabelComponent,
9
+ ...questionInstructionsComponent,
10
+ ...commonComponents,
11
+ ...autoScoredScoringPreviewTab,
12
+ //Edit tab
13
+ promptInputField: () => cy.get('.edit-mcq-stems-wrapper [role="textbox"]'),
14
+ optionInputField: () => cy.get('.edit-mcq-options-wrapper').eq(1).find('[data-rbd-draggable-id*="option-draggable"] [role="textbox"]'),
15
+ //Specify correct answer section
16
+ dropzoneSpecifyCorrectAnswerSection: () => cy.get('.authoring-droppable-hotspot-wrapper'),
17
+
18
+ //Preview tab
19
+ promptContainerPreviewTab: () => cy.get('.stem-container'),
20
+ dropzonePreviewTab: () => cy.get('[class*="MultipleDroppableHotspotstyle__DroppableHotspotWrapper"]'),
21
+ dropzoneOptionPreviewTab: () => cy.get('[class*="MultipleDroppedItemstyles__FlexWrapper"]'),
22
+ dropzoneNumeration: () => cy.get('[class*="NumerationDiv"]'),
23
+ correctAnswersNumeration: () => cy.get('.answer-numeration-number-box'),
24
+ correctAnswersOptions: () => cy.get('.match-list-drag-and-drop .question-text-wrapper'),
25
+ correctAnswersOptionContainer: () => cy.get('.draggable-selected-option'),
26
+ correctIncorrectAnswerLabel: () => cy.get('[class*="AnswerStatusText"]')
27
+ }
28
+
29
+ const steps = {
30
+ ...createQuestionBasePage.steps,
31
+ ...scoringSectionBaseEditTab.steps,
32
+ ...autoScoredScoringPreviewTab.steps,
33
+ ...questionInstructionsComponent.steps,
34
+ ...maximumCapacityPerDropzoneComponent.steps,
35
+ ...optionsWrapperComponent.steps,
36
+ ...correctIncorrectAnswerLabelComponent.steps,
37
+ ...ckEditorToolbar.steps,
38
+ ...equationEditorFlyout.steps,
39
+ ...autoScoredStudentViewSettings.steps,
40
+ ...autoScoredSpecifyCorrectAnswerSection.steps,
41
+ //Edit tab
42
+ /**
43
+ * Enters text into multiple prompt input fields.
44
+ * @param {string[]} promptTextArray - Array of text to enter into the prompt input fields.
45
+ */
46
+ enterTextInPromptInputField: (promptTextArray) => {
47
+ promptTextArray.forEach((promptText, index) => {
48
+ matchingPage.promptInputField()
49
+ .eq(index)
50
+ .clear()
51
+ .type(promptText)
52
+ .should('have.text', promptText);
53
+ });
54
+ },
55
+
56
+ /**
57
+ * This function enters text in an option
58
+ * @param {number} index of prompt
59
+ * @param {text} options to be entered in prompt field
60
+ */
61
+ enterTextInOnePromptInputField: (index, promptText) => {
62
+ matchingPage.promptInputField()
63
+ .eq(index)
64
+ .type(promptText);
65
+ },
66
+
67
+ /**
68
+ * @param {number} index of the option input field
69
+ * @description this function focuses in and out of prompt input fields
70
+ */
71
+ focusInPromptInputField: (index) => {
72
+ matchingPage.promptInputField()
73
+ .eq(index)
74
+ .click();
75
+ },
76
+
77
+ /**
78
+ * @param {number} index of the option input field
79
+ * @param {string} option input text
80
+ * @description this function add input to prompt input fields
81
+ */
82
+ addBoldTextInputToPromptInputField: (index) => {
83
+ matchingPage.promptInputField()
84
+ .eq(index)
85
+ .type('This is a bold option')
86
+ .should('have.text', '​​​​​​​This is a bold option');
87
+ },
88
+
89
+ /**
90
+ * @param {number} index of option
91
+ * @description this function verifies bold text in prompt input fields
92
+ */
93
+ verifyBoldPrompt: (index) => {
94
+ matchingPage.promptInputField()
95
+ .eq(index)
96
+ .find('strong')
97
+ .should('exist')
98
+ .should('have.text', '​​​​​​​This is a bold option');
99
+ },
100
+
101
+
102
+ /**
103
+ * Enters text into multiple options input fields.
104
+ * @param {string[]} promptTextArray - Array of text to enter into the option input fields.
105
+ */
106
+ enterTextInOptionInputField: (optionsArray) => {
107
+ optionsArray.forEach((options, index) => {
108
+ matchingPage.optionInputField()
109
+ .eq(index)
110
+ .clear()
111
+ .type(options)
112
+ .should('have.text', options);
113
+ });
114
+ },
115
+
116
+ /**
117
+ * This function enters text in an option
118
+ * @param {number} index of option
119
+ * @param {text} options to be entered in option field
120
+ */
121
+ enterTextInOneOptionInputField: (index, options) => {
122
+ matchingPage.optionInputField()
123
+ .eq(index)
124
+ .type(options);
125
+ },
126
+
127
+ /**
128
+ * @param {number} index of the option input field
129
+ * @description this function focuses in and out of options input fields
130
+ */
131
+ focusInOptionsInputField: (index) => {
132
+ matchingPage.optionInputField()
133
+ .eq(index)
134
+ .click();
135
+ },
136
+
137
+ /**
138
+ * @param {number} index of the option input field
139
+ * @param {string} option input text
140
+ * @description this function add input to options input fields
141
+ */
142
+ addBoldTextInputToOptionsInputField: (index) => {
143
+ matchingPage.optionInputField()
144
+ .eq(index)
145
+ .type('This is a bold option')
146
+ .should('have.text', '​​​​​​​This is a bold option');
147
+ },
148
+
149
+ /**
150
+ * @param {number} index of option
151
+ * @description this function verifies bold text in options input fields
152
+ */
153
+ verifyBoldOption: (index) => {
154
+ matchingPage.optionInputField()
155
+ .eq(index)
156
+ .find('strong')
157
+ .should('exist')
158
+ .should('have.text', '​​​​​​​This is a bold option');
159
+ },
160
+
161
+ //Specify correct answer section
162
+ /**
163
+ * Enter text in the answer input fields of the specify correct answer section.
164
+ * @param {Object[]} options - An array of objects containing the optionText and dropzoneIndex.
165
+ * @param {string} options[].optionText - The text of the draggable option.
166
+ * @param {number} options[].dropzoneIndex - The index of the dropzone.
167
+ */
168
+ clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection: (options) => {
169
+ options.forEach(({ optionText, dropzoneIndex }) => {
170
+ draggableOptionContainer.draggableOption()
171
+ .contains(optionText)
172
+ .click();
173
+ matchingPage.dropzoneSpecifyCorrectAnswerSection()
174
+ .eq(dropzoneIndex)
175
+ .click({ force: true });
176
+ });
177
+ },
178
+
179
+ //Preview tab
180
+ /**
181
+ * Enter text in the answer input fields of the specify correct answer section.
182
+ * @param {Object[]} options - An array of objects containing the optionText and dropzoneIndex.
183
+ * @param {string} options[].optionText - The text of the draggable option.
184
+ * @param {number} options[].dropzoneIndex - The index of the dropzone.
185
+ */
186
+ clickAndDropOptionInDropzonePreviewTab: (options) => {
187
+ options.forEach(({ optionText, dropzoneIndex }) => {
188
+ draggableOptionContainer.optionsContainerPreviewTab()
189
+ .eq(0)
190
+ .within(() => {
191
+ draggableOptionContainer.draggableOption()
192
+ .contains(optionText)
193
+ .click();
194
+ });
195
+ matchingPage.dropzonePreviewTab()
196
+ .eq(dropzoneIndex)
197
+ .click({ force: true });
198
+ });
199
+ },
200
+
201
+ /**
202
+ * Verifies the text content of a dropzone in the Preview Tab.
203
+ * @param {number} dropzoneIndex - Index of the dropzone to verify.
204
+ * @param {string} dropzoneText - Expected text content of the dropzone.
205
+ */
206
+ verifyDropzoneTextContentPreviewTab: (dropzoneIndex, dropzoneText) => {
207
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropzonePreviewTab(), dropzoneIndex), dropzoneText);
208
+ },
209
+
210
+ /**
211
+ * @description Verifies the text content of a specific preview tab dropzone element.
212
+ * @param {number} count - The index of the preview tab dropzone element to verify (zero-based).
213
+ * @param {string} text - The expected text content to match against the inner text of the specified dropzone element.
214
+ */
215
+ verifyDropzoneContainsTextPreviewTab: (count, text) => {
216
+ matchingPage.dropzonePreviewTab()
217
+ .eq(count)
218
+ .contains(text);
219
+ },
220
+
221
+ /**
222
+ * @description Verifies that the equation text in the Preview tab is correct.
223
+ * @param {number} optionIndex - The index of the option in the Preview tab.
224
+ */
225
+ verifyDraggableOptionWithEquationTextInPreviewTab: (optionIndex) => {
226
+ matchingPage.dropzonePreviewTab()
227
+ .find('[role="math"]')
228
+ .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
229
+ .contains(constants.CKEditorInputFieldEnteredEquationText);
230
+ utilities.verifyElementVisibilityState(utilities.getNthElement(draggableOptionContainer.draggableOptionDragIcon(), optionIndex), 'exist');
231
+ },
232
+
233
+ /**
234
+ * @description Verifies that the image in the Preview tab has the correct source and alt text.
235
+ * @param {number} optionIndex - The index of the option in the Preview tab.
236
+ */
237
+ verifyDropzoneWithImageInPreviewTab: (optionIndex) => {
238
+ matchingPage.dropzonePreviewTab()
239
+ .eq(optionIndex)
240
+ .find('img')
241
+ .should('have.attr', 'src', constants.foxImageLink)
242
+ .and('have.attr', 'alt', constants.foxImageAltText);
243
+ },
244
+
245
+ /**
246
+ * @description Verifies that the equation text in the Preview tab is correct.
247
+ * @param {number} optionIndex - The index of the option in the Preview tab.
248
+ */
249
+ verifyDropzoneWithEquationTextInPreviewTab: (optionIndex) => {
250
+ matchingPage.dropzonePreviewTab()
251
+ .eq(optionIndex)
252
+ .find('[role="math"]')
253
+ .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
254
+ .contains(constants.CKEditorInputFieldEnteredEquationText);
255
+ },
256
+
257
+ /**
258
+ * @description Verifies that the image in the Preview tab has the correct source and alt text.
259
+ * @param {number} optionIndex - The index of the option in the Preview tab.
260
+ */
261
+ verifyDraggableOptionWithImageInPreviewTab: (optionIndex) => {
262
+ matchingPage.correctAnswersOptionContainer()
263
+ .eq(optionIndex)
264
+ .find('img')
265
+ .should('have.attr', 'src', constants.foxImageLink)
266
+ .and('have.attr', 'alt', constants.foxImageAltText);
267
+ utilities.verifyElementVisibilityState(utilities.getNthElement(draggableOptionContainer.draggableOptionDragIcon(), optionIndex), 'exist');
268
+ },
269
+
270
+ /**
271
+ * @description Verifies that the bold text in the Preview tab is correct.
272
+ * @param {number} optionIndex - The index of the option in the Preview tab.
273
+ */
274
+ verifyDraggableOptionWithBoldTextInPreviewTab: (optionIndex) => {
275
+ matchingPage.correctAnswersOptionContainer()
276
+ .eq(optionIndex)
277
+ .find('strong')
278
+ .should('have.text', 'This is a bold option');
279
+ utilities.verifyElementVisibilityState(utilities.getNthElement(draggableOptionContainer.draggableOptionDragIcon(), optionIndex), 'exist');
280
+ },
281
+
282
+ /**
283
+ * @description Verifies that the equation text in the Preview tab is correct.
284
+ * @param {number} optionIndex - The index of the option in the Preview tab.
285
+ */
286
+ verifyDraggableOptionWithEquationTextInPreviewTab: (optionIndex) => {
287
+ matchingPage.correctAnswersOptionContainer()
288
+ .find('[role="math"]')
289
+ .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
290
+ .contains(constants.CKEditorInputFieldEnteredEquationText);
291
+ utilities.verifyElementVisibilityState(utilities.getNthElement(draggableOptionContainer.draggableOptionDragIcon(), optionIndex), 'exist');
292
+ },
293
+
294
+ /**
295
+ * @description Verifies that the image in the Preview tab has the correct source and alt text.
296
+ * @param {number} optionIndex - The index of the option in the Preview tab.
297
+ */
298
+ verifyPromptWithImageInPreviewTab: (optionIndex) => {
299
+ matchingPage.promptContainerPreviewTab()
300
+ .eq(optionIndex)
301
+ .find('img')
302
+ .should('have.attr', 'src', constants.foxImageLink)
303
+ .and('have.attr', 'alt', constants.foxImageAltText);
304
+ },
305
+
306
+ /**
307
+ * @description Verifies that the bold text in the Preview tab is correct.
308
+ * @param {number} optionIndex - The index of the option in the Preview tab.
309
+ */
310
+ verifyPromptWithBoldTextInPreviewTab: (optionIndex) => {
311
+ matchingPage.promptContainerPreviewTab()
312
+ .eq(optionIndex)
313
+ .find('strong')
314
+ .should('have.text', 'This is a bold option');
315
+ },
316
+
317
+ /**
318
+ * @description Verifies that the equation text in the Preview tab is correct.
319
+ * @param {number} optionIndex - The index of the option in the Preview tab.
320
+ */
321
+ verifyPromptWithEquationTextInPreviewTab: (optionIndex) => {
322
+ matchingPage.promptContainerPreviewTab()
323
+ .find('[role="math"]')
324
+ .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
325
+ .contains(constants.CKEditorInputFieldEnteredEquationText);
326
+ },
327
+
328
+ verifyDropzoneNumeration: () => {
329
+ matchingPage.dropzonePreviewTab()
330
+ .each(($element, index) => {
331
+ cy.wrap($element)
332
+ .within(() => {
333
+ matchingPage.dropzoneNumeration()
334
+ .should('have.text', `${index + 1}`)
335
+ });
336
+ });
337
+ },
338
+
339
+ /**
340
+ * Verifies the correct option icon for a specified dropzone in the Preview Tab.
341
+ * @param {number} dropzoneIndex - The index of the dropzone to verify.
342
+ * @param {number} optionIndex - The index of the option to verify.
343
+ */
344
+ verifyCorrectOptionIcon: (dropzoneIndex, optionIndex = 0) => {
345
+ matchingPage.dropzonePreviewTab()
346
+ .eq(dropzoneIndex)
347
+ .within(() => {
348
+ matchingPage.dropzoneOptionPreviewTab()
349
+ .eq(optionIndex)
350
+ .within(() => {
351
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'exist');
352
+ });
353
+ });
354
+ },
355
+
356
+ /**
357
+ * @description Verifies the incorrect option icon for a specified dropzone in the Preview Tab.
358
+ * @param {number} dropzoneIndex - The index of the dropzone to verify.
359
+ * @param {number} optionIndex - The index of the option to verify.
360
+ */
361
+ verifyIncorrectOptionIcon: (dropzoneIndex, optionIndex = 0) => {
362
+ matchingPage.dropzonePreviewTab()
363
+ .eq(dropzoneIndex)
364
+ .within(() => {
365
+ matchingPage.dropzoneOptionPreviewTab()
366
+ .eq(optionIndex)
367
+ .within(() => {
368
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'exist');
369
+ });
370
+ });
371
+ },
372
+
373
+ /**
374
+ * @description Verifies the absence of a correct/incorrect option icon for a specified option in the Preview Tab.
375
+ * @param {number} optionIndex - The index of the option to verify.
376
+ */
377
+ verifyCorrectIncorrectIconNotExist: (optionIndex) => {
378
+ matchingPage.dropzonePreviewTab()
379
+ .eq(optionIndex)
380
+ .within(() => {
381
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'notExist');
382
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'notExist');
383
+ });
384
+ },
385
+
386
+ /**
387
+ *@description Verifies the correctness of answer responses in the correct answer section, including the count.
388
+ * @param {string[][]} correctAnswerArray An array of arrays, each containing the expected answer options for a specific correct answer section.
389
+ */
390
+ verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount: (correctAnswerArray) => {
391
+ utilities.verifyElementCount(matchingPage.correctAnswersOptions(), correctAnswerArray.length);
392
+ correctAnswerArray.forEach((correctAnswer, index) => {
393
+ utilities.verifyTextContent(utilities.getNthElement(matchingPage.correctAnswersNumeration(), index), index + 1);
394
+ correctAnswer.forEach((answerOption) => {
395
+ utilities.verifyTextContent(utilities.getNthElement(matchingPage.correctAnswersOptions(), index), answerOption);
396
+ });
397
+ });
398
+ },
399
+
400
+ /**
401
+ * @param {("correct" | "incorrect")} answerStatus - The status of the answer.
402
+ * @description Verifies the visibility and content of the correct/incorrect answer label block.
403
+ * If the answer is correct, it also verifies the visibility of the correct icon; otherwise, it verifies the visibility of the incorrect icon.
404
+ */
405
+ verifyCorrectIncorrectAnswerLabel: (answerStatus) => {
406
+ utilities.verifyElementVisibilityState(matchingPage.correctIncorrectAnswerLabel(), 'exist');
407
+ utilities.verifyInnerText(matchingPage.correctIncorrectAnswerLabel(), `Your answer is\n${answerStatus}`)
408
+ if (answerStatus === 'correct') {
409
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
410
+ } else {
411
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'visible');
412
+ }
413
+ },
414
+
415
+ verifyCorrectAnswerSectionNotExists: () => {
416
+ utilities.verifyElementVisibilityState(matchingPage.correctAnswersOptions(), 'notExist');
417
+ },
418
+
419
+ verifyGradingViewOptionDisabled: () => {
420
+ matchingPage.correctAnswersOptionContainer()
421
+ .should('have.css', 'pointer-events', 'none');
422
+ }
423
+ }
424
+
425
+ const tests = {
426
+ ...autoScoredScoringPreviewTab.tests,
427
+ }
428
+
429
+ export const matchingPage = {
430
+ ...selectors,
431
+ steps,
432
+ tests
433
+ }
@@ -1,11 +1,13 @@
1
1
  import utilities from "../support/helpers/utilities";
2
- import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent } from "./components";
2
+ import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, specifyRowsAndColumnsComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType } from "./components";
3
3
  const css = Cypress.env('css');
4
4
 
5
5
  const selectors = {
6
6
  ...questionInstructionsComponent,
7
7
  ...gridQuestionCommonComponent,
8
- ...correctIncorrectAnswerLabelComponent
8
+ ...correctIncorrectAnswerLabelComponent,
9
+ ...autoScoredSpecifyCorrectAnswerSection,
10
+ ...autoScoredScoringSectionMultiResponseType,
9
11
  }
10
12
 
11
13
  const steps = {
@@ -15,6 +17,10 @@ const steps = {
15
17
  ...scoringSectionBaseEditTab.steps,
16
18
  ...autoScoredScoringPreviewTab.steps,
17
19
  ...correctIncorrectAnswerLabelComponent.steps,
20
+ ...autoScoredStudentViewSettings.steps,
21
+ ...specifyRowsAndColumnsComponent.steps,
22
+ ...autoScoredSpecifyCorrectAnswerSection.steps,
23
+ ...autoScoredScoringSectionMultiResponseType.steps,
18
24
  /**
19
25
  * Modifies the property of an option cell in the grid for checkbox settings.
20
26
  * @param {Object} position - The position of the option cell.
@@ -103,7 +109,9 @@ const steps = {
103
109
 
104
110
  const tests = {
105
111
  ...questionInstructionsComponent.tests,
106
- ...autoScoredScoringPreviewTab.tests
112
+ ...autoScoredScoringPreviewTab.tests,
113
+ ...scoringSectionBaseEditTab.tests,
114
+ ...autoScoredScoringSectionMultiResponseType.tests
107
115
  }
108
116
 
109
117
  export const multipleSelectionGridPage = {
@@ -1,5 +1,5 @@
1
1
  import utilities from "../support/helpers/utilities";
2
- import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, ckEditorToolbar, equationEditorFlyout, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent } from "./components";
2
+ import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, ckEditorToolbar, equationEditorFlyout, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings } from "./components";
3
3
  const css = Cypress.env('css');
4
4
 
5
5
  const selectors = {
@@ -19,6 +19,7 @@ const steps = {
19
19
  ...equationEditorFlyout.steps,
20
20
  ...autoScoredScoringPreviewTab.steps,
21
21
  ...correctIncorrectAnswerLabelComponent.steps,
22
+ ...autoScoredStudentViewSettings.steps,
22
23
  /**
23
24
  * Modifies the property of an option cell in the grid for radio button settings.
24
25
  * @param {Object} position - The position of the option cell.
@@ -651,6 +651,11 @@ const steps = {
651
651
  utilities.verifyTextContent(utilities.getNthElement(textEntryMathPage.responseFieldPreviewTab(), index), inputFieldText);
652
652
  },
653
653
 
654
+ verifyResponseAreaContainsTextPreviewTab: (index, inputFieldText) => {
655
+ utilities.getNthElement(textEntryMathPage.responseFieldPreviewTab(), index)
656
+ .contains(inputFieldText);
657
+ },
658
+
654
659
  /**
655
660
  *@description Verifies the correctness of answer responses in the correct answer section, including the count.
656
661
  * @param {string[]} correctAnswerArray An array of arrays, each containing the expected answer options for a specific correct answer section.
@@ -14,7 +14,7 @@ const selectors = {
14
14
  responseFieldPreviewTab: () => cy.get('.cloze-math-background-preview .equation-input-without-andornment'),
15
15
  canvasInPreviewTab: () => cy.get('[class*="PreviewTabstyles__ContentWrapper"] .image-container'),
16
16
  textAreaPreviewTab: () => cy.get('.label-image-with-text-preview [class*="TextBoxContainer"]'),
17
- tickIcon: () => cy.get('.tick-icon-wrapper [data-name*="Rectangle"]'),
17
+ tickIcon: () => cy.get('.add-background-tick-icon-wrapper [data-name*="Rectangle"]'),
18
18
  responseFieldWrapperPreviewTab: () => cy.get('.cloze-response-wrapper'),
19
19
  responseFieldNumerationPreviewTab: () => cy.get('.image-container .response-input-adornment')
20
20
  }
@@ -129,6 +129,11 @@ const steps = {
129
129
  utilities.verifyTextContent(utilities.getNthElement(textEntryMathWithImagePage.responseFieldPreviewTab(), index), inputFieldText);
130
130
  },
131
131
 
132
+ verifyResponseAreaContainsTextPreviewTab: (index, inputFieldText) => {
133
+ utilities.getNthElement(textEntryMathWithImagePage.responseFieldPreviewTab(), index)
134
+ .contains(inputFieldText);
135
+ },
136
+
132
137
  /**
133
138
  * This function verifies the aria label entered in the response field
134
139
  * @param {string} ariaLabel of the equation entered
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.145-equationAndCheckAnswerSeelctorUpdate-b61f46e.0",
3
+ "version": "1.0.145",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -35,4 +35,4 @@
35
35
  "node-fetch": "^3.3.2",
36
36
  "react-uuid": "^2.0.0"
37
37
  }
38
- }
38
+ }