itemengine-cypress-automation 1.0.290 → 1.0.293-e2eUpdates5thFeb-7e9457e.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -0
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editQuestion.smoke.js +74 -0
  3. package/cypress/e2e/ILC/DrawingResponse/editQuestion.smoke.js +46 -0
  4. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +0 -1
  5. package/cypress/e2e/ILC/EssayResponse/editQuestion.smoke.js +46 -0
  6. package/cypress/e2e/ILC/EssayResponseBasic/editQuestion.smoke.js +46 -0
  7. package/cypress/e2e/ILC/EssayResponseMath/editQuestion.smoke.js +46 -0
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editQuestion.smoke.js +76 -0
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  10. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editQuestion.smoke.js +68 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editQuestion.smoke.js +78 -0
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +4 -0
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editQuestion.smoke.js +72 -0
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editQuestion.smoke.js +65 -0
  15. package/cypress/e2e/ILC/FillInTheGapsTextNew/editQuestion.smoke.js +60 -0
  16. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +1 -0
  17. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +1 -1
  18. package/cypress/e2e/ILC/GridFill/editQuestion.smoke.js +66 -0
  19. package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -5
  20. package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +0 -1
  21. package/cypress/e2e/ILC/ListOrderingNew/editQuestion.smoke.js +72 -0
  22. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/previewContentsForAllViews.smoke.js +3 -0
  23. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +2 -0
  24. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/previewContentsForAllViews.smoke.js +1 -0
  25. package/cypress/e2e/ILC/Matching/editQuestion.smoke.js +72 -0
  26. package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +4 -2
  27. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +0 -4
  28. package/cypress/e2e/ILC/MultipleSelection/editQuestion.smoke.js +73 -0
  29. package/cypress/e2e/ILC/MultipleSelection/manuallyAndNonScoredScoring.js +123 -117
  30. package/cypress/e2e/ILC/MultipleSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -1
  31. package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +0 -2
  32. package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +2 -3
  33. package/cypress/e2e/ILC/MultipleSelection/specifyCorrectAnswerSection.js +0 -2
  34. package/cypress/e2e/ILC/MultipleSelectionGridNew/editQuestion.smoke.js +82 -0
  35. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +2 -0
  36. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/allOrNothingForAllViews.smoke.js +2 -0
  37. package/cypress/e2e/ILC/SingleSelection/previewContents.smoke.js +0 -1
  38. package/cypress/e2e/ILC/SingleSelectionGridNew/editQuestion.smoke.js +74 -0
  39. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +0 -1
  40. package/cypress/e2e/ILC/TextEntryMath/{evaluationMethodMatchValue.js → evaluationMethodMatchValue.smoke.js} +1 -1
  41. package/cypress/e2e/ILC/TextEntryMath/{evaluationMethodsWithoutSetResponse.js → evaluationMethodsWithoutSetResponse.smoke.js} +2 -13
  42. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +0 -1
  43. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -2
  44. package/cypress/e2e/ILC/TextSelection/editQuestion.smoke.js +88 -0
  45. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +0 -1
  46. package/cypress/e2e/ILC/VideoResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +4 -3
  47. package/cypress/e2e/ILC/VideoResponseNew/headerSection.js +1 -1
  48. package/cypress/e2e/ILC/VideoResponseNew/studentViewSettingsStandardRecorderStyle.js +2 -3
  49. package/cypress/pages/components/autoScoredScoringPreviewTab.js +6 -1
  50. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +11 -1
  51. package/cypress/pages/components/browseItemsPage.js +27 -2
  52. package/cypress/pages/components/commonComponents.js +2 -1
  53. package/cypress/pages/components/createQuestionBasePage.js +31 -2
  54. package/cypress/pages/components/draggableOptionContainer.js +6 -4
  55. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +12 -1
  56. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +1 -2
  57. package/cypress/pages/components/gridQuestionCommonComponent.js +23 -0
  58. package/cypress/pages/components/imageCanvasComponent.js +0 -1
  59. package/cypress/pages/components/optionsWrapperComponent.js +15 -0
  60. package/cypress/pages/dragAndDropIntoCategoriesPage.js +15 -1
  61. package/cypress/pages/drawingResponsePage.js +2 -1
  62. package/cypress/pages/essayResponseBasicPage.js +3 -1
  63. package/cypress/pages/essayResponsePage.js +2 -0
  64. package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -0
  65. package/cypress/pages/fillInTheGapsDropdownPage.js +4 -2
  66. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -0
  67. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -1
  68. package/cypress/pages/fillInTheGapsOverImageTextPage.js +2 -0
  69. package/cypress/pages/fillInTheGapsTextPage.js +2 -0
  70. package/cypress/pages/gridFillPage.js +2 -1
  71. package/cypress/pages/listOrderingPage.js +13 -0
  72. package/cypress/pages/matchingPage.js +13 -2
  73. package/cypress/pages/multipleSelectionGridPage.js +33 -0
  74. package/cypress/pages/multipleSelectionPage.js +27 -0
  75. package/cypress/pages/singleSelectionGridPage.js +25 -0
  76. package/cypress/pages/singleSelectionPage.js +30 -4
  77. package/cypress/pages/studentViewPage.js +2 -2
  78. package/cypress/pages/textSelectionPage.js +13 -0
  79. package/cypress/pages/videoResponsePage.js +14 -1
  80. package/package.json +1 -1
  81. /package/cypress/e2e/ILC/TextEntryMath/{evaluationMethodEquivalentStructures.js → evaluationMethodEquivalentStructures.smoke.js} +0 -0
  82. /package/cypress/e2e/ILC/TextEntryMath/{evaluationMethodMatchExact.js → evaluationMethodMatchExact.smoke.js} +0 -0
  83. /package/cypress/e2e/ILC/TextEntryMath/{evaluationMethodSymbolsAreEquivalent.js → evaluationMethodSymbolsAreEquivalent.smoke.js} +0 -0
  84. /package/cypress/e2e/ILC/TextEntryMath/{evaluationMethodValueIsEquivalent.js → evaluationMethodValueIsEquivalent.smoke.js} +0 -0
@@ -1,5 +1,6 @@
1
1
  import utilities from "../support/helpers/utilities";
2
2
  import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, commonComponents, autoScoredScoringPreviewTab, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, backgroundImageUploadComponent, optionsWrapperComponent, imageCanvasComponent, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, acceptedStudentInputComponent, customizeSpecialCharacterComponent, fillInTheGapsTextCommonComponent, additionalSettingsPanel, gradingViewEnumerationComponent, additionalSettingsAccessibilitySectionComponent, ariaLabelSectionComponent, placeholderTextSectionComponent, styleAndLayoutCustomizationAccordionComponent, figCommonStyleAndLayoutComponent, connectorStyleStyleAndLayoutCustomizationComponent } from "./components";
3
+ import { createItemPage } from "./createItemPage";
3
4
  import { dialogBoxBase } from "./dialogBoxBase";
4
5
  const css = Cypress.env('css');
5
6
 
@@ -68,6 +69,7 @@ const steps = {
68
69
  ...styleAndLayoutCustomizationAccordionComponent.steps,
69
70
  ...figCommonStyleAndLayoutComponent.steps,
70
71
  ...connectorStyleStyleAndLayoutCustomizationComponent.steps,
72
+ ...createItemPage.steps,
71
73
  /**
72
74
  * Verify that the incorrect option icon is displayed for a specific answer input field.
73
75
  * @param {number} inputFieldIndex - The index of the answer input field to verify.
@@ -1,5 +1,6 @@
1
1
  import utilities from "../support/helpers/utilities";
2
2
  import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, commonComponents, autoScoredScoringPreviewTab, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, acceptedStudentInputComponent, customizeSpecialCharacterComponent, fillInTheGapsTextCommonComponent, questionInputFieldComponent, additionalSettingsPanel, responseAreaSettingsPopupComponent, gradingViewEnumerationComponent, additionalSettingsAccessibilitySectionComponent, ariaLabelSectionComponent, placeholderTextSectionComponent, styleAndLayoutCustomizationAccordionComponent, figCommonStyleAndLayoutComponent } from "./components";
3
+ import { createItemPage } from "./createItemPage";
3
4
 
4
5
  const selectors = {
5
6
  ...questionInstructionsComponent,
@@ -49,6 +50,7 @@ const steps = {
49
50
  ...placeholderTextSectionComponent.steps,
50
51
  ...styleAndLayoutCustomizationAccordionComponent.steps,
51
52
  ...figCommonStyleAndLayoutComponent.steps,
53
+ ...createItemPage.steps,
52
54
  /**
53
55
  * Verify that the incorrect option icon is displayed for a specific answer input field.
54
56
  * @param {number} inputFieldIndex - The index of the answer input field to verify.
@@ -1,5 +1,5 @@
1
1
  import { commonComponents, autoScoredScoringSectionMultiResponseType, questionInputFieldComponent, correctIncorrectAnswerLabelComponent, questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, studentViewSettingsLabelComponent, colorPopupComponent, backgroundImageUploadComponent, imageCanvasComponent, imageActionsComponent } from "./components";
2
- import { dialogBoxBase, studentViewPage } from ".";
2
+ import { createItemPage, dialogBoxBase, studentViewPage } from ".";
3
3
  import utilities from "../support/helpers/utilities";
4
4
  const css = Cypress.env('css');
5
5
 
@@ -192,6 +192,7 @@ const steps = {
192
192
  ...additionalSettingsPanel.steps,
193
193
  ...backgroundImageUploadComponent.steps,
194
194
  ...imageCanvasComponent.steps,
195
+ ...createItemPage.steps,
195
196
 
196
197
  /**
197
198
  * @param {number} value The value to set in the columns input field.
@@ -2,6 +2,7 @@ import constants from "../fixtures/constants";
2
2
  import utilities from "../support/helpers/utilities";
3
3
  import { autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, commonComponents, correctIncorrectAnswerLabelComponent, createQuestionBasePage, optionsWrapperComponent, questionInstructionsComponent, randomizeOptionsComponent, scoringSectionBaseEditTab, studentViewSettingsLabelComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, enableOuterBorderComponent, styleAndLayoutCustomizationAccordionComponent } from "./components"
4
4
  import { listOrderingCommonStyleAndLayoutComponent } from "./components/listOrderingCommonStyleAndLayoutComponent";
5
+ import { createItemPage } from "./createItemPage";
5
6
  const options = ['sprout', 'plant', 'flower', 'seed'];
6
7
  const css = Cypress.env('css');
7
8
 
@@ -129,6 +130,7 @@ const selectors = {
129
130
  pannelPlacementRightToggle: () => cy.get('.panel-placement-reversed-cls'),
130
131
  correctIconNew: () => cy.get('[class*="ClozeWithDragAndDropstyles__TickIconWrapper"].icon-correct'),
131
132
  incorrectIconNew: () => cy.get('[class*="ClozeWithDragAndDropstyles__TickIconWrapper"].icon-incorrect'),
133
+ optionsInputFieldInQuestionPreviewTab: () => cy.get('[class*="ListOrderingResponsestyles__DraggableItemsWrapper"] [data-testid="question-instruction-element"]'),
132
134
  }
133
135
 
134
136
  const steps = {
@@ -147,6 +149,7 @@ const steps = {
147
149
  ...enableOuterBorderComponent.steps,
148
150
  ...styleAndLayoutCustomizationAccordionComponent.steps,
149
151
  ...listOrderingCommonStyleAndLayoutComponent.steps,
152
+ ...createItemPage.steps,
150
153
 
151
154
  /**
152
155
  * Verifies the border value of specify correct answer section options
@@ -1747,6 +1750,16 @@ const steps = {
1747
1750
  utilities.verifyElementVisibilityState(listOrderingPage.correctIconNew(), 'notExist');
1748
1751
  utilities.verifyElementVisibilityState(listOrderingPage.incorrectIconNew(), 'notExist');
1749
1752
  },
1753
+
1754
+ /**
1755
+ * Verifies the contents of option fields within the options section.
1756
+ * @param {Array<string>} optionsTextArray - An array of strings representing the expected text content for each option field.
1757
+ */
1758
+ verifyOptionFieldContentsInOptionsSectionQuestionPreviewTab: (optionsTextArray) => {
1759
+ optionsTextArray.forEach((option, optionIndex) => {
1760
+ utilities.verifyTextContent(utilities.getNthElement(listOrderingPage.optionsInputFieldInQuestionPreviewTab(), optionIndex * 2), option);
1761
+ });
1762
+ }
1750
1763
  }
1751
1764
 
1752
1765
  const tests = {
@@ -1,6 +1,7 @@
1
1
  import constants from "../fixtures/constants";
2
2
  import utilities from "../support/helpers/utilities";
3
3
  import { createQuestionBasePage, questionInstructionsComponent, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, draggableOptionContainer, draggableOptionsSectionComponent, correctIncorrectAnswerLabelComponent, maximumCapacityPerDropzoneComponent, optionsWrapperComponent, ckEditorToolbar, equationEditorFlyout, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, randomizeOptionsComponent, autoScoredScoringSectionMultiResponseType, allowMultipleInstancesOfSameDraggableOptionComponent, studentViewSettingsLabelComponent, ariaLabelSectionComponent, additionalSettingsAccessibilitySectionComponent, gradingViewEnumerationComponent, additionalSettingsPanel, toolSettingsComponent, styleAndLayoutCustomizationAccordionComponent, connectorStyleStyleAndLayoutCustomizationComponent } from "./components";
4
+ import { createItemPage } from "./createItemPage";
4
5
  const css = Cypress.env('css');
5
6
  const options = ['option 1', 'option 2', 'option 3'];
6
7
  const fourOptions = ['option 1', 'option 2', 'option 3', 'option 4'];
@@ -192,6 +193,7 @@ const selectors = {
192
193
  dropzoneConnectorStyleLabel: () => cy.get('.dropzone-connector-style-label'),
193
194
  connectorLineTypeLabel: () => cy.get('[class*="__SubSectionLabel"]').eq(2),
194
195
  connectorLine: () => cy.get('[class*="ClozeWithDragAndDropstyles__ShowIconWrapper"]:visible'),
196
+ optionsInputFieldInQuestionPreviewTab: () => cy.get('.draggable-selected-item'),
195
197
  }
196
198
 
197
199
  const steps = {
@@ -218,6 +220,7 @@ const steps = {
218
220
  ...ariaLabelSectionComponent.steps,
219
221
  ...styleAndLayoutCustomizationAccordionComponent.steps,
220
222
  ...connectorStyleStyleAndLayoutCustomizationComponent.steps,
223
+ ...createItemPage.steps,
221
224
  //Edit tab
222
225
  addPrompt: () => {
223
226
  matchingPage.addPromptButton()
@@ -2635,9 +2638,17 @@ const steps = {
2635
2638
  }
2636
2639
  });
2637
2640
  });
2638
- }
2639
-
2641
+ },
2640
2642
 
2643
+ /**
2644
+ * Verifies the contents of option fields within the options section.
2645
+ * @param {Array<string>} optionsTextArray - An array of strings representing the expected text content for each option field.
2646
+ */
2647
+ verifyOptionFieldContentsInOptionsSectionQuestionPreviewTab: (optionsTextArray) => {
2648
+ optionsTextArray.forEach((option, optionIndex) => {
2649
+ utilities.verifyTextContent(utilities.getNthElement(matchingPage.optionsInputFieldInQuestionPreviewTab(), optionIndex), option);
2650
+ });
2651
+ }
2641
2652
  }
2642
2653
 
2643
2654
  const tests = {
@@ -1,6 +1,7 @@
1
1
  import utilities from "../support/helpers/utilities";
2
2
  import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, specifyRowsAndColumnsComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, studentViewSettingsLabelComponent, randomizeOptionsComponent, commonComponents, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, styleAndLayoutCustomizationAccordionComponent } from "./components";
3
3
  const css = Cypress.env('css');
4
+ import { createItemPage } from "./createItemPage";
4
5
 
5
6
  const selectors = {
6
7
  ...questionInstructionsComponent,
@@ -15,6 +16,9 @@ const selectors = {
15
16
  ...additionalSettingsPanel,
16
17
  sameCheckboxTextInEachColumnCheckbox: () => cy.get('[data-ngie-testid="same-checkbox-text-in-each-column-checkbox"] input'),
17
18
  sameCheckboxTextInEachColumnCheckboxLabel: () => cy.get('[data-ngie-testid="same-checkbox-text-in-each-column-checkbox"] [class*="label"]'),
19
+ answerStatusBanner: () => cy.get('[class*="AnswerStatusWrapper"]'),
20
+ correctAnswerSection: () => cy.get('[class*="CorrectAnswerHeader"]'),
21
+ optionsInputFieldInQuestionPreviewTab: () => cy.get('.cell-content-text'),
18
22
  }
19
23
 
20
24
  const steps = {
@@ -32,6 +36,7 @@ const steps = {
32
36
  ...commonComponents.steps,
33
37
  ...additionalSettingsPanel.steps,
34
38
  ...styleAndLayoutCustomizationAccordionComponent.steps,
39
+ ...createItemPage.steps,
35
40
  /**
36
41
  * Modifies the property of an option cell in the grid for checkbox settings.
37
42
  * @param {Object} position - The position of the option cell.
@@ -161,6 +166,34 @@ const steps = {
161
166
  });
162
167
  });
163
168
  },
169
+
170
+ verifyAnswerStatusBannerNotExist: () => {
171
+ multipleSelectionGridPage.answerStatusBanner()
172
+ .should('not.exist');
173
+ },
174
+
175
+ verifyAnswerStatusBannerExist: () => {
176
+ multipleSelectionGridPage.answerStatusBanner()
177
+ .should('be.visible');
178
+ },
179
+
180
+ verifyCorrectAnswerSectionExist: () => {
181
+ multipleSelectionGridPage.correctAnswerSection()
182
+ .should('be.visible');
183
+ },
184
+
185
+ verifyCorrectAnswerSectionNotExist: () => {
186
+ multipleSelectionGridPage.correctAnswerSection()
187
+ .should('not.exist');},
188
+ /**
189
+ * Verifies the contents of option fields within the options section.
190
+ * @param {Array<string>} optionsTextArray - An array of strings representing the expected text content for each option field.
191
+ */
192
+ verifyOptionFieldContentsInOptionsSection: (optionsTextArray) => {
193
+ optionsTextArray.forEach((option, optionIndex) => {
194
+ utilities.verifyTextContent(utilities.getNthElement(multipleSelectionGridPage.optionsInputFieldInQuestionPreviewTab(), optionIndex), option);
195
+ });
196
+ }
164
197
  }
165
198
 
166
199
  const tests = {
@@ -78,7 +78,9 @@ const selectors = {
78
78
  correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="CorrectAnswerLabel"]'),
79
79
  correctAnswerSectionWrapper: () => cy.get('[class*="question-preview-wrapper"] .mcq-checkbox-control.mcq-answer-checked').eq(1),
80
80
  optionWrapperCorrectAnswerSection: () => cy.get('.mcq-option-wrapper'),
81
+ answerStatusBanner: () => cy.get('[class*="StatusContainer"]'),
81
82
  cancelButton: () => cy.get('.save-action-btn-wrapper .MuiButtonBase-root').eq(1),
83
+ optionsInputFieldInQuestionPreviewTab: () => cy.get('.mcq-option-wrapper [data-testid="question-instruction-element"]'),
82
84
  }
83
85
 
84
86
  const steps = {
@@ -851,6 +853,21 @@ const steps = {
851
853
  .should('not.exist');
852
854
  },
853
855
 
856
+ verifyCorrectAnswerSectionExist: () => {
857
+ multipleSelectionPage.correctAnswerSectionWrapper()
858
+ .should('not.exist');
859
+ },
860
+
861
+ verifyAnswerBannerNotExist: () => {
862
+ multipleSelectionPage.answerStatusBanner()
863
+ .should('not.exist');
864
+ },
865
+
866
+ verifyAnswerBannerExist: () => {
867
+ multipleSelectionPage.answerStatusBanner()
868
+ .should('be.visible');
869
+ },
870
+
854
871
  /**
855
872
  * Verifies the input field text value of an option in the feedback scale options accordion.
856
873
  * @param {number} optionAccordionIndex - The index of the option accordion.
@@ -864,6 +881,16 @@ const steps = {
864
881
  clickOnCancelButton: () => {
865
882
  multipleSelectionPage.cancelButton()
866
883
  .click();
884
+ },
885
+
886
+ /**
887
+ * Verifies the contents of option fields within the options section.
888
+ * @param {Array<string>} optionsTextArray - An array of strings representing the expected text content for each option field.
889
+ */
890
+ verifyOptionFieldContentsInOptionsSection: (optionsTextArray) => {
891
+ optionsTextArray.forEach((option, optionIndex) => {
892
+ utilities.verifyTextContent(utilities.getNthElement(multipleSelectionPage.optionsInputFieldInQuestionPreviewTab(), optionIndex), option);
893
+ });
867
894
  }
868
895
  }
869
896
 
@@ -1,6 +1,7 @@
1
1
  import utilities from "../support/helpers/utilities";
2
2
  import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, ckEditorToolbar, equationEditorFlyout, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, autoScoredStudentViewSettings, specifyRowsAndColumnsComponent, autoScoredSpecifyCorrectAnswerSection, randomizeOptionsComponent, studentViewSettingsLabelComponent, commonComponents, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, styleAndLayoutCustomizationAccordionComponent } from "./components";
3
3
  const css = Cypress.env('css');
4
+ import { createItemPage } from "./createItemPage";
4
5
 
5
6
  const selectors = {
6
7
  ...questionInstructionsComponent,
@@ -17,6 +18,8 @@ const selectors = {
17
18
  ...additionalSettingsPanel,
18
19
  sameRadioButtonTextInEachColumnCheckbox: () => cy.get('[data-ngie-testid="same-radio-button-text-in-each-column-checkbox"] input'),
19
20
  sameRadioButtonTextInEachColumnCheckboxLabel: () => cy.get('[data-ngie-testid="same-radio-button-text-in-each-column-checkbox"] [class*="label"]'),
21
+ answerStatusBanner: () => cy.get('[class*="AnswerStatusWrapper"]'),
22
+ correctAnswerSection: () => cy.get('[class*="CorrectAnswerHeader"]')
20
23
  }
21
24
 
22
25
  const steps = {
@@ -36,6 +39,7 @@ const steps = {
36
39
  ...commonComponents.steps,
37
40
  ...additionalSettingsPanel.steps,
38
41
  ...styleAndLayoutCustomizationAccordionComponent.steps,
42
+ ...createItemPage.steps,
39
43
  /**
40
44
  * Modifies the property of an option cell in the grid for radio button settings.
41
45
  * @param {Object} position - The position of the option cell.
@@ -142,6 +146,27 @@ const steps = {
142
146
  .click()
143
147
  .should('be.checked');
144
148
  },
149
+
150
+
151
+ verifyAnswerStatusBannerNotExist: () => {
152
+ singleSelectionGridPage.answerStatusBanner()
153
+ .should('not.exist');
154
+ },
155
+
156
+ verifyAnswerStatusBannerExist: () => {
157
+ singleSelectionGridPage.answerStatusBanner()
158
+ .should('be.visible');
159
+ },
160
+
161
+ verifyCorrectAnswerSectionExist: () => {
162
+ singleSelectionGridPage.correctAnswerSection()
163
+ .should('be.visible');
164
+ },
165
+
166
+ verifyCorrectAnswerSectionNotExist: () => {
167
+ singleSelectionGridPage.correctAnswerSection()
168
+ .should('not.exist');
169
+ }
145
170
  }
146
171
 
147
172
  const tests = {
@@ -37,9 +37,11 @@ const selectors = {
37
37
  noneOptionNumeration: () => cy.get('.no-numeration-div'),
38
38
  //correct answer section
39
39
  correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="CorrectAnswerLabel"]'),
40
- correctAnswerSectionWrapper: () => cy.get('[class*="question-preview-wrapper"] .mcq-radio-control.mcq-answer-checked').eq(1),
40
+ correctAnswerSectionWrapper: () => cy.get('[class*="question-preview-wrapper"] .mcq-radio-control.mcq-answer-checked').eq(0),
41
41
  optionWrapperCorrectAnswerSection: () => cy.get('.radio-option-wrapper'),
42
- correctIncorrectAnswerLabel: () => cy.get('[class*="style"][class*="__Status"]')
42
+ correctIncorrectAnswerLabel: () => cy.get('[class*="style"][class*="__Status"]'),
43
+ answerStatusBanner: () => cy.get('[class*="StatusContainer"]'),
44
+ optionsInputFieldInQuestionPreviewTab: () => cy.get('.mcq-radio-control [data-testid="question-instruction-element"]'),
43
45
  };
44
46
 
45
47
  const steps = {
@@ -242,6 +244,20 @@ const steps = {
242
244
  .should('not.exist');
243
245
  },
244
246
 
247
+ verifyCorrectAnswerSectionExist: () => {
248
+ singleSelectionPage.correctAnswerSectionWrapper()
249
+ .should('be.visible');
250
+ },
251
+
252
+ verifyAnswerBannerNotExist: () => {
253
+ singleSelectionPage.answerStatusBanner()
254
+ .should('not.exist');
255
+ },
256
+
257
+ verifyAnswerBannerExist: () => {
258
+ singleSelectionPage.answerStatusBanner()
259
+ .should('be.visible');
260
+ },
245
261
  /**
246
262
  * Verifies the presence of the correct option icon in the student view for a specified option index.
247
263
  * @param {number} optionIndex - The index of the option to verify in the student view.
@@ -348,7 +364,7 @@ const steps = {
348
364
  .eq(index)
349
365
  .find('[role="math"]')
350
366
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
351
- // .contains(constants.CKEditorInputFieldEnteredEquationText);
367
+ // .contains(constants.CKEditorInputFieldEnteredEquationText);
352
368
  },
353
369
 
354
370
  /**
@@ -395,7 +411,7 @@ const steps = {
395
411
  .eq(index)
396
412
  .find('[role="math"]')
397
413
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
398
- // .contains(constants.CKEditorInputFieldEnteredEquationText);
414
+ // .contains(constants.CKEditorInputFieldEnteredEquationText);
399
415
  },
400
416
 
401
417
  /**
@@ -679,6 +695,16 @@ const steps = {
679
695
  }
680
696
  });
681
697
  },
698
+
699
+ /**
700
+ * Verifies the contents of option fields within the options section.
701
+ * @param {Array<string>} optionsTextArray - An array of strings representing the expected text content for each option field.
702
+ */
703
+ verifyOptionFieldContentsInOptionsSection: (optionsTextArray) => {
704
+ optionsTextArray.forEach((option, optionIndex) => {
705
+ utilities.verifyTextContent(utilities.getNthElement(singleSelectionPage.optionsInputFieldInQuestionPreviewTab(), optionIndex), option);
706
+ });
707
+ }
682
708
  };
683
709
 
684
710
  const tests = {
@@ -8,11 +8,11 @@ const selectors = {
8
8
  const steps = {
9
9
  submitResponse: () => {
10
10
  cy.log('Adding wait to make sure the answers are added')
11
- cy.wait(3000);
11
+ cy.wait(5000);
12
12
  studentViewPage.submitButton()
13
13
  .click();
14
14
  cy.log('Adding wait to make sure the answers is submitted')
15
- cy.wait(3000);
15
+ cy.wait(5000);
16
16
  },
17
17
 
18
18
  clickOnGoToGradingViewButton: () => {
@@ -1,6 +1,7 @@
1
1
  import constants from "../fixtures/constants";
2
2
  import utilities from "../support/helpers/utilities";
3
3
  import { createQuestionBasePage, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, setPointsPopupBase, commonComponents, ckEditorToolbar, equationEditorFlyout, studentViewSettingsLabelComponent, enableOuterBorderComponent, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, styleAndLayoutCustomizationAccordionComponent, colorPopupComponent, showAvailableOptionsToStudents, showStudentMaximumNumberOfPossibleSelections, singleMultipleSelectionModeComponent } from "./components";
4
+ import { createItemPage } from "./createItemPage";
4
5
  import { dialogBoxBase } from "./dialogBoxBase";
5
6
  const css = Cypress.env('css');
6
7
  const colorLibrary = css.textSelectionColorLibrary;
@@ -98,6 +99,7 @@ const selectors = {
98
99
  correctIncorrectAnswerLabelWrapper: () => cy.get('[class*="AnswerStatusWrapper"]'),
99
100
  correctIncorrectAnswerLabel: () => cy.get('[class*="AnswerStatusText"]'),
100
101
  correctAnswersLabel: () => cy.get('[class*="Highlightstyles__CorrectAnswerHeader-"]'),
102
+ optionsInputFieldInQuestionPreviewTab: () => cy.get('[class*="word-span highlight_option"]'),
101
103
  }
102
104
 
103
105
  const steps = {
@@ -121,6 +123,7 @@ const steps = {
121
123
  ...showAvailableOptionsToStudents.steps,
122
124
  ...showStudentMaximumNumberOfPossibleSelections.steps,
123
125
  ...singleMultipleSelectionModeComponent.steps,
126
+ ...createItemPage.steps,
124
127
 
125
128
  addInputToQuestionInputField: (text) => {
126
129
  textSelectionPage.questionInputField()
@@ -1203,6 +1206,16 @@ const steps = {
1203
1206
  });
1204
1207
  }
1205
1208
  });
1209
+ },
1210
+
1211
+ /**
1212
+ * Verifies the contents of option fields within the options section.
1213
+ * @param {Array<string>} optionsTextArray - An array of strings representing the expected text content for each option field.
1214
+ */
1215
+ verifyOptionFieldContentsInOptionsSectionQuestionPreviewTab: (optionsTextArray) => {
1216
+ optionsTextArray.forEach((option, optionIndex) => {
1217
+ utilities.verifyInnerText(utilities.getNthElement(textSelectionPage.optionsInputFieldInQuestionPreviewTab(), optionIndex), option);
1218
+ });
1206
1219
  }
1207
1220
  }
1208
1221
 
@@ -25,7 +25,7 @@ const selectors = {
25
25
  pauseButton: () => cy.get('button[aria-label="Pause recording"]'),
26
26
  stopButton: () => cy.get('button[aria-label="Stop recording"]'),
27
27
  resumeButton: () => cy.get('button[aria-label="Resume recording"]'),
28
- retakeRecordingButton: () => cy.get('[type="button"][aria-label*="Retake"]'),
28
+ retakeRecordingButton: () => cy.get('.recording-again-button'),
29
29
  playerTimer: () => cy.get('[class*="VideoRecorderstyle__PlayerTimerWrapper"]'),
30
30
  playbackSpeedButton: () => cy.get('button[aria-label="Playback speed"]'),
31
31
  fullScreenButton: () => cy.get('button[aria-label="Full screen"]'),
@@ -371,6 +371,19 @@ const steps = {
371
371
  cy.wait(1000)
372
372
  },
373
373
 
374
+ /**
375
+ * @description Sets the maximum recording duration in the input field.
376
+ * @param {string} recordingLength - The maximum recording duration to set in seconds.
377
+ * @example - setMaximumRecordingDuration(600); // Sets the maximum recording duration to '10:00'
378
+ */
379
+ setMaximumRecordingDurationNew: (recordingLength) => {
380
+ videoResponsePage.maxRecordingDurationInputField()
381
+ .clear()
382
+ videoResponsePage.maxRecordingDurationInputField()
383
+ .type(recordingLength)
384
+ },
385
+
386
+
374
387
  /**
375
388
  * @description Verifies that the maximum recording length input field has the expected value.
376
389
  * @param {string} value - The expected value to be compared with the input field's value attribute.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.290",
3
+ "version": "1.0.293-e2eUpdates5thFeb-7e9457e.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {