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
@@ -36,6 +36,33 @@ const steps = {
36
36
  .click();
37
37
  },
38
38
 
39
+ enterTextInTeacherGuidelinesInputField: (teacherGuidelinesText) => {
40
+ additionalSettingsPanel.additionalSettingsTeacherGuidelinesInputField()
41
+ .click()
42
+ .type(teacherGuidelinesText)
43
+ .blur();
44
+ additionalSettingsPanel.additionalSettingsTeacherGuidelinesInputField()
45
+ .should('have.text', teacherGuidelinesText);
46
+ },
47
+
48
+ enterTextInSampleAnswerInputField: (sampleAnswer) => {
49
+ additionalSettingsPanel.additionalSettingsSampleAnswerInputField()
50
+ .click()
51
+ .type(sampleAnswer)
52
+ .blur();
53
+ additionalSettingsPanel.additionalSettingsSampleAnswerInputField()
54
+ .should('have.text', sampleAnswer);
55
+ },
56
+
57
+ enterTextInAcknowledgementsInputField: (acknowledgements) => {
58
+ additionalSettingsPanel.additionalSettingsAcknowledgementsInputField()
59
+ .click()
60
+ .type(acknowledgements)
61
+ .blur();
62
+ additionalSettingsPanel.additionalSettingsAcknowledgementsInputField()
63
+ .should('have.text', acknowledgements);
64
+ },
65
+
39
66
  expandAdditionalSettings: () => {
40
67
  additionalSettingsPanel.additionalSettingsPanel()
41
68
  .click()
@@ -1,5 +1,5 @@
1
1
  import { previewScoringAndShowCorrectAnswerComponent } from "./previewScoringAndShowCorrectAnswerComponent";
2
-
2
+ //Note: deprecated file
3
3
  const css = Cypress.env('css');
4
4
  const selectors = {
5
5
  correctIcon: () => cy.get('.icon-correct'),
@@ -5,7 +5,7 @@ import { scoringSectionBase } from "./scoringSectionBase";
5
5
  import { commonComponents } from "./commonComponents";
6
6
  import { previewScoringAndShowCorrectAnswerComponent } from "./previewScoringAndShowCorrectAnswerComponent";
7
7
  const css = Cypress.env('css');
8
- //Enhancement: This file should be deprecated, new file: autoScoredScoringPreviewTab.js
8
+ //Note: deprecated file
9
9
  const steps = {
10
10
  correctIncorrectLabelAndBorderExists: (questionType) => {
11
11
  switch (questionType) {
@@ -2,7 +2,7 @@ import utilities from "../../support/helpers/utilities";
2
2
  import { commonComponents } from "./commonComponents";
3
3
  import { scoringSectionBase } from "./scoringSectionBase";
4
4
  const css = Cypress.env('css');
5
- //Enhancement: This file will get deprecated: New file - autoScoredScoringSectionMultiResponseType
5
+ //Note: deprecated file
6
6
  const selectors = {
7
7
  allOrNothingCheckboxLabel: () => cy.get('label[for*="defaultScoring"]'),
8
8
  allOrNothingCheckbox: () => cy.get('input[type*="radio"][aria-label="All or Nothing"]'),
@@ -2,7 +2,7 @@ import { dialogBoxBase } from "../dialogBoxBase";
2
2
  import { scoringSectionBase } from "./scoringSectionBase";
3
3
  import { commonComponents } from "./commonComponents";
4
4
  const css = Cypress.env('css');
5
- //Enhancement: This file should be deprecated, new file: autoScoredSpecifyCorrectAnswerSection.js
5
+ //Note: deprecated file
6
6
  const selectors = {
7
7
  setCorrectAnswerLabel: () => cy.get('.set-correct-answer-label'),
8
8
  setCorrectAnswerHelpText: () => cy.get('.edit-set-correct-answer-help-text'),
@@ -345,13 +345,13 @@ const tests = {
345
345
  });
346
346
  utilities.verifyInnerText(utilities.getNthElement(scoringSectionBase.pleaseEnterPointsErrorMessage(), 0), 'Error: Please enter points.');
347
347
  utilities.verifyElementVisibilityState(scoringSectionBase.pleaseEnterPointsErrorMessage(), 'visible');
348
- if (questionType != 'list ordering' && questionType != 'short text response') {
348
+ if (questionType != 'list ordering' && questionType != 'short text response' && questionType != 'text entry math') {
349
349
  steps.verifySpecifyCorrectAnswerErrorMessage();
350
350
  }
351
351
  else if (questionType === 'short text response') {
352
352
  utilities.verifyInnerText(utilities.getNthElement(commonComponents.errorMessage(), -1), 'Error: Answer is required.');
353
353
  }
354
- if (questionType === 'fill in the gaps over image text' || questionType === 'text entry math') {
354
+ else if (questionType === 'fill in the gaps over image text' || questionType === 'text entry math') {
355
355
  utilities.verifyInnerText(commonComponents.errorMessage().last(), 'Error: Please enter points.');
356
356
  utilities.verifyElementVisibilityState(commonComponents.errorMessage().last(), 'visible');
357
357
  }
@@ -46,7 +46,7 @@ const steps = {
46
46
  setMaximumCheckAnswerAttempts: (maxCheckAnswerAttempts) => {
47
47
  autoScoredStudentViewSettings.steps.checkAllowStudentToCheckAnswerCheckbox();
48
48
  autoScoredStudentViewSettings.steps.expandMaxCheckAnswerAttemptsDropdown();
49
- autoScoredStudentViewSettings.steps.addInputToMaximumCheckAnswerAttemptsInputField(maxCheckAnswerAttempts)
49
+ autoScoredStudentViewSettings.steps.selectMaxCheckAnswerAttemptsDropdownListOption(maxCheckAnswerAttempts)
50
50
  },
51
51
 
52
52
  expandMaxCheckAnswerAttemptsDropdown: () => {
@@ -89,6 +89,13 @@ const tests = {
89
89
  });
90
90
  },
91
91
 
92
+ verifyMaximumAttemptsDropdownDisplayedWhenAllowStudentsToCheckAnswerIsChecked: () => {
93
+ it('When the user checks the \'Allow student to check answer\' checkbox, then \'Maximum check answer attempts\' dropdown should be displayed', () => {
94
+ autoScoredStudentViewSettings.steps.checkAllowStudentsToCheckAnswerCheckbox();
95
+ utilities.verifyElementVisibilityState(autoScoredStudentViewSettings.maximumCheckAnswerAttemptsDropdown(), 'visible');
96
+ });
97
+ },
98
+
92
99
  verifyMaxCheckAnswerAttemptsDropdown: () => {
93
100
  it('\'Maximum check answer attempts\' should have \'No limit\' selected by default and on expanding the dropdown options 1 to 10 should also be displayed', () => {
94
101
  utilities.verifyInnerText(autoScoredStudentViewSettings.maximumCheckAnswerAttemptsDropdownLabel(), 'Maximum check answer attempts');
@@ -1,7 +1,7 @@
1
1
  import utilities from "../../support/helpers/utilities";
2
2
  import { dialogBoxBase } from "../dialogBoxBase";
3
3
  import { commonComponents } from "./commonComponents";
4
- import { figOverImageCanvasComponent } from "./figOverImageCanvasComponent";
4
+ import { imageCanvasComponent } from "./imageCanvasComponent";
5
5
  const css = Cypress.env('css');
6
6
 
7
7
  const selectors = {
@@ -110,9 +110,9 @@ const tests = {
110
110
  backgroundImageUploadComponent.steps.uploadFile('highlightImage.jpg');
111
111
  utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadImageProgressBar(), 'visible');
112
112
  backgroundImageUploadComponent.steps.verifyFileNameLabel('highlightImage.jpg');
113
- utilities.verifyElementVisibilityState( figOverImageCanvasComponent.canvasImage(), 'visible');
113
+ utilities.verifyElementVisibilityState( imageCanvasComponent.canvasImage(), 'visible');
114
114
  utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadImageProgressBar(), 'notExist');
115
- figOverImageCanvasComponent.steps.verifyImageIsUploaded();
115
+ imageCanvasComponent.steps.verifyImageIsUploaded();
116
116
  });
117
117
 
118
118
  it('Delete button should appear beside uploaded file\'s name', () => {
@@ -184,7 +184,7 @@ const tests = {
184
184
  backgroundImageUploadComponent.steps.clickOnCancelButtonInDeleteImagePopup();
185
185
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
186
186
  utilities.verifyInnerText(backgroundImageUploadComponent.uploadedFileNameLabel(), 'sample1.jpg');
187
- utilities.verifyElementVisibilityState(figOverImageCanvasComponent.canvasImage(), 'visible');
187
+ utilities.verifyElementVisibilityState(imageCanvasComponent.canvasImage(), 'visible');
188
188
  });
189
189
 
190
190
  it('When user clicks on \'Delete image\' button, then popup should close and image inside the canvas should be deleted', () => {
@@ -192,7 +192,7 @@ const tests = {
192
192
  backgroundImageUploadComponent.steps.clickOnDeleteButtonInDeleteImagePopup();
193
193
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
194
194
  utilities.verifyInnerText(backgroundImageUploadComponent.noFileChosenLabel(), 'No file chosen');
195
- figOverImageCanvasComponent.steps.verifyCanvasImageNotExist();
195
+ imageCanvasComponent.steps.verifyCanvasImageNotExist();
196
196
  });
197
197
  }
198
198
  }
@@ -86,10 +86,16 @@ const steps = {
86
86
  createQuestionBasePage.previewTab()
87
87
  .should('have.attr', 'aria-selected', 'false');
88
88
  },
89
-
89
+
90
+ verifySavedSuccessfullySnackbar: () => {
91
+ commonComponents.snackbar()
92
+ .should('have.text', 'Saved successfully!')
93
+ .should('be.visible');
94
+ },
95
+
90
96
  clickOnCancelButton: () => {
91
97
  createQuestionBasePage.cancelButton()
92
- .click();
98
+ .click();
93
99
  }
94
100
  }
95
101
 
@@ -287,6 +287,12 @@ const steps = {
287
287
  .type('{backspace}');
288
288
  },
289
289
 
290
+ enterTextInPredefinedTextInputField: (predefinedText) => {
291
+ essayResponseCommonComponents.predefinedTextInputField()
292
+ .type(predefinedText)
293
+ .should('have.text', predefinedText);
294
+ },
295
+
290
296
  verifyGradingViewResponseFieldIsNonEditable: () => {
291
297
  essayResponseCommonComponents.responseField()
292
298
  .should('have.attr', 'contenteditable', 'false');
@@ -143,6 +143,19 @@ const steps = {
143
143
  fillInTheGapsCommonComponents.previewTabCorrectAnswerResponseWrapper()
144
144
  .should('have.length', correctAnswerArray.length);
145
145
  },
146
+
147
+ setPlaceholderText: (placeholder) => {
148
+ fillInTheGapsCommonComponents.placeholderTextInputField()
149
+ .type(placeholder)
150
+ .should('have.value', placeholder);
151
+ },
152
+
153
+ setResponseContainerHeight: (height) => {
154
+ fillInTheGapsCommonComponents.heightInputField()
155
+ .type(height)
156
+ .should('have.value', height)
157
+ .blur();
158
+ }
146
159
  }
147
160
 
148
161
  const tests = {
@@ -0,0 +1,40 @@
1
+ import utilities from "../../support/helpers/utilities";
2
+
3
+ const selectors = {
4
+ correctAnswersNumeration: () => cy.get('[class*="__AnswerCell"] .answer-numeration-number-box'),
5
+ correctAnswersOptions: () => cy.get('[class*="__AnswerWrapper"] .question-text-wrapper'),
6
+ correctAnswersLabel: () => cy.get('.correct-answers-label'),
7
+ tickIconWrapper: () => cy.get('.tick-icon-wrapper'),
8
+ correctAnswerContainer: () => cy.get('.dnd-correct-answer-wrapper'),
9
+ correctIncorrectAnswerLabel: () => cy.get('[class*="CorrectIncorrectLabel"]'),
10
+ }
11
+
12
+ const steps = {
13
+ /**
14
+ *@description Verifies the correctness of answer responses in the correct answer section, including the count.
15
+ * @param {string[][]} correctAnswerArray An array of arrays, each containing the expected answer options for a specific correct answer section.
16
+ */
17
+ verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount: (correctAnswerArray) => {
18
+ utilities.verifyElementCount(fillInTheGapsDragAndDropCommonComponents.correctAnswersOptions(), correctAnswerArray.length);
19
+ correctAnswerArray.forEach((correctAnswer, index) => {
20
+ utilities.verifyTextContent(utilities.getNthElement(fillInTheGapsDragAndDropCommonComponents.correctAnswersNumeration(), index), index + 1);
21
+ correctAnswer.forEach((answerOption) => {
22
+ utilities.verifyTextContent(utilities.getNthElement(fillInTheGapsDragAndDropCommonComponents.correctAnswersOptions(), index), answerOption);
23
+ });
24
+ });
25
+ },
26
+
27
+ verifyCorrectAnswerSectionNotExists: () => {
28
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropCommonComponents.correctAnswerContainer(), 'notExist');
29
+ },
30
+ }
31
+
32
+ const tests = {
33
+
34
+ }
35
+
36
+ export const fillInTheGapsDragAndDropCommonComponents = {
37
+ ...selectors,
38
+ steps,
39
+ tests
40
+ }