itemengine-cypress-automation 1.0.275-cssUpdates12Dec-bbaeace.0 → 1.0.276-updatedRepo12thDec-303c8a0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. package/cypress/e2e/ILC/ChartsBar/specifyCorrectAnswerSection.js +1 -2
  2. package/cypress/e2e/ILC/ChartsBar/toolSettings.js +1 -1
  3. package/cypress/e2e/ILC/ChartsLine/toolSettings.js +1 -1
  4. package/cypress/e2e/ILC/Compass/compassEditTabBasicsSection.js +11 -5
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +1 -0
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +7 -5
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +6 -2
  8. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/draggableOptions.js +8 -0
  9. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +8 -0
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +4 -0
  11. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettingsForGroupedLayout.js +2 -0
  12. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -0
  13. package/cypress/e2e/ILC/EssayResponse/toolSettings.js +8 -2
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +2 -1
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -2
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneAlternateAnswerPopup.js +1 -0
  17. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/toolSettings.js +1 -1
  19. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +20 -20
  20. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +20 -20
  21. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +20 -20
  22. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +16 -16
  23. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +16 -16
  24. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
  25. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +16 -16
  26. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +16 -16
  27. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
  28. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +1 -1
  29. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAlternateAnswerPopup.js +0 -1
  30. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +2 -0
  31. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/toolSettings.js +1 -1
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/allOrNothingGroupedScoring.js +4 -4
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +14 -14
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +14 -14
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +17 -17
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/manuallyAndNonScored.js +7 -7
  37. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +14 -14
  38. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialDifferentWeightsBasic.js +8 -8
  39. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
  40. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
  41. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialEqualWeightsBasic.js +8 -8
  42. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +14 -14
  43. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
  44. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +14 -14
  45. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +2 -2
  46. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +4 -2
  47. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -0
  48. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomization.js +2 -1
  49. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +20 -20
  50. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +20 -20
  51. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +20 -20
  52. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +16 -16
  53. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +16 -16
  54. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
  55. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +16 -16
  56. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +16 -16
  57. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
  58. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +18 -18
  59. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +18 -18
  60. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +18 -18
  61. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +6 -6
  62. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +18 -18
  63. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +6 -6
  64. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -18
  65. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +18 -18
  66. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +6 -6
  67. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +16 -16
  68. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
  69. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
  70. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +9 -9
  71. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +18 -18
  72. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +18 -18
  73. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +3 -3
  74. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +18 -18
  75. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +6 -6
  76. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +18 -18
  77. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +18 -18
  78. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsBasic.js +6 -6
  79. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +16 -16
  80. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +14 -14
  81. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +16 -16
  82. package/cypress/e2e/ILC/FillInTheGapsTextNew/toolSettings.js +1 -1
  83. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +4 -2
  84. package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +1 -0
  85. package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +2 -1
  86. package/cypress/e2e/ILC/ImageHighlight/toolSettings.js +1 -1
  87. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +2 -0
  88. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
  89. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +6 -0
  90. package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +2 -2
  91. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +2 -2
  92. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -7
  93. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +7 -7
  94. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +7 -7
  95. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +4 -4
  96. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +3 -2
  97. package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +2 -0
  98. package/cypress/e2e/ILC/Matching/toolSettings.js +1 -1
  99. package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +2 -2
  100. package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -1
  101. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +2 -1
  102. package/cypress/e2e/ILC/NumberLineLabel/toolSettings.js +1 -1
  103. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/previewContentsForAllViews.smoke.js +2 -1
  104. package/cypress/e2e/ILC/Protractor/protractorEditTabBasicsSection.js +3 -4
  105. package/cypress/e2e/ILC/Protractor/protractorEditTabFunctionality.js +4 -0
  106. package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +2 -3
  107. package/cypress/e2e/ILC/Ruler/rulerEditTabFunctionality.js +5 -0
  108. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingWithAlternativeAnswer.js +1 -1
  109. package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +3 -0
  110. package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +6 -3
  111. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  112. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  113. package/cypress/e2e/ILC/TextEntryMath/additionalSettingsForAnswerInputFields.js +23 -1
  114. package/cypress/e2e/ILC/TextEntryMath/customSettingsSeparators.ts +476 -0
  115. package/cypress/e2e/ILC/TextEntryMath/equationEditor.smoke.js +1 -1
  116. package/cypress/e2e/ILC/TextEntryMath/styleAndLayoutCustomization.js +129 -0
  117. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +7 -5
  118. package/cypress/e2e/ILC/TextEntryMathWithImage/styleAndLayoutCustomization.js +384 -0
  119. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +3 -3
  120. package/cypress/e2e/ILC/ToolAudioPlayerNew/standardAudioPlayerStyle.js +1 -1
  121. package/cypress/e2e/ILC/VideoResponseNew/standardRecorderStyle.js +6 -6
  122. package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +6 -6
  123. package/cypress/e2e/ILC/chartsDotsPlot/toolSettings.js +1 -1
  124. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +84 -84
  125. package/cypress/pages/audioPlayerPage.js +2 -2
  126. package/cypress/pages/components/ariaLabelSectionComponent.js +2 -2
  127. package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +1 -1
  128. package/cypress/pages/components/customSettingsSeparatorsComponent.ts +19 -1
  129. package/cypress/pages/components/equationEditorSectionCommonComponent.js +1 -1
  130. package/cypress/pages/components/essayResponseCommonComponents.js +6 -5
  131. package/cypress/pages/components/imageCanvasComponent.js +2 -2
  132. package/cypress/pages/components/layoutSectionComponent.js +6 -2
  133. package/cypress/pages/components/numberLineCommonComponent.js +12 -5
  134. package/cypress/pages/components/playbackControlsBaseComponent.js +5 -0
  135. package/cypress/pages/components/scoringSectionBaseEditTab.js +3 -3
  136. package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
  137. package/cypress/pages/drawingResponsePage.js +18 -1
  138. package/cypress/pages/fillInTheGapsDragAndDropPage.js +3 -2
  139. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +19 -6
  140. package/cypress/pages/gridFillPage.js +2 -3
  141. package/cypress/pages/listOrderingPage.js +19 -12
  142. package/cypress/pages/matchingPage.js +16 -2
  143. package/cypress/pages/textEntryMathPage.js +716 -4
  144. package/cypress/pages/textEntryMathWithImagePage.js +133 -5
  145. package/package.json +1 -1
@@ -1,9 +1,14 @@
1
1
  import { decimalSeparator, evaluationMethods } from "../fixtures/evaluationMethodsAndCustomSettings"
2
2
  import utilities from "../support/helpers/utilities"
3
- import { questionInstructionsComponent, questionInputFieldComponent, createQuestionBasePage, commonComponents, additionalSettingsPanel, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, autoScoredScoringPreviewTab, equationEditorFlyout, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, ckEditorToolbar, colorPopupComponent, gradingViewEnumerationComponent, ariaLabelSectionComponent, additionalSettingsAccessibilitySectionComponent, equationEditorSectionCommonComponent } from "./components"
3
+ import { questionInstructionsComponent, questionInputFieldComponent, createQuestionBasePage, commonComponents, additionalSettingsPanel, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, autoScoredScoringPreviewTab, equationEditorFlyout, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, ckEditorToolbar, colorPopupComponent, gradingViewEnumerationComponent, ariaLabelSectionComponent, additionalSettingsAccessibilitySectionComponent, equationEditorSectionCommonComponent, styleAndLayoutCustomizationAccordionComponent, imageCanvasComponent } from "./components"
4
4
  import { customSettingsSeparatorComponent } from "./components/customSettingsSeparatorsComponent";
5
+ import { dialogBoxBase } from "./dialogBoxBase";
6
+
5
7
 
6
8
  const css = Cypress.env('css');
9
+ const borderStyles = ["Dashed", "Dotted", "Solid", "None"]
10
+ const modifiedColor = 'rgb(121, 60, 60)'
11
+ const selectedStyle = 'dashed';
7
12
 
8
13
  const selectors = {
9
14
  ...questionInstructionsComponent,
@@ -18,6 +23,8 @@ const selectors = {
18
23
  ...gradingViewEnumerationComponent,
19
24
  ...ariaLabelSectionComponent,
20
25
  ...equationEditorSectionCommonComponent,
26
+ ...styleAndLayoutCustomizationAccordionComponent,
27
+ ...imageCanvasComponent,
21
28
  addStructureTab: () => cy.get('[data-ngie-testid="add-structure-tab"]'),
22
29
  responseToken: () => cy.get('.cke_button__addresponse'),
23
30
  penaltyPointsForEachIncorrectOptionInputField: () => cy.get('input[aria-label="Penalty points for each incorrect text container"]'),
@@ -27,6 +34,7 @@ const selectors = {
27
34
  responseAccordion: () => cy.get('.response-accordion [class*="ResponseAccordionstyles__ResponsePanel"]'),
28
35
  responseAccordionLabel: () => cy.get('[class*="ResponseAccordionstyles__Label"]'),
29
36
  responseAccordionAnswerInputField: () => cy.get('[class*="__AnswersWrapper"] .equation-input-component .mq-editable-field'),
37
+ responseAccordionAnswerInputFieldNew: () => cy.get('[class*="__AnswersWrapper"] .equation-input-component'),
30
38
  responseAccordionPointsWrapper: () => cy.get('[class*="ResponseAccordionstyles__PointsDiv"]'),
31
39
  responseAccordionPointsLabel: () => cy.get('[class*="ResponseAccordionstyles__PointsLabel"]'),
32
40
  responseAccordionPointsScore: () => cy.get('[class*="ResponseAccordionstyles__Points-"]'),
@@ -133,7 +141,7 @@ const selectors = {
133
141
  //Formula Template
134
142
  layoutAccordion: () => cy.get('.custom-settings-option-wrapper .ngie-accordion-summary:visible').eq(0),
135
143
  layoutAccordionExpandIcon: () => cy.get('.ngie-accordion-summary [class*="expandIconWrapper"]').eq(2),
136
- inputFieldLayoutAccordion: () => cy.get('.equation-input-component[aria-label*="Math template"]'),
144
+ inputFieldLayoutAccordion: () => cy.get('.equation-input-component[aria-label*="Math template"]:visible'),
137
145
  addResponseContainerButton: () => cy.get('[type="button"][class*="ResponseContainerButton"]'),
138
146
  responseFieldFormulaTemplatePreviewTab: () => cy.get('.add_response_element .mq-root-block'),
139
147
  responseContainerLabel: () => cy.get('[class*="FormulaTemplatestyles__ResponseContainerWrapper"]'),
@@ -147,6 +155,22 @@ const selectors = {
147
155
  equationEditorInputField: () => cy.get('[class*="EquationEditorstyles__PreviewWrappe"]'),
148
156
  equationEditorInputFieldNew: () => cy.get('.latex-preview-response-wrapper'),
149
157
  dialogBox: () => cy.get('[role="dialog"]'),
158
+
159
+ //style and layout customization
160
+ componentContainerLabel: () => cy.get('[class*="styles__SectionWrapper"][class*="label"]'),
161
+ fillColorLabel: () => cy.get('.sub-section-label').eq(0),
162
+ borderColorLabel: () => cy.get('.sub-section-label').eq(1),
163
+ colorBlock: () => cy.get('.color-grid-wrapper .color-picker-block'),
164
+ editColorButton: () => cy.get('button[aria-label="edit color"]'),
165
+ borderStyleLabel: () => cy.get('.options-border-style .options-label'),
166
+ dashedBorderStyleToggleButton: () => cy.get('[data-ngie-testid="dashed-toggle-button"]').eq(0),
167
+ dottedBorderStyleToggleButton: () => cy.get('[data-ngie-testid="dotted-toggle-button"]').eq(0),
168
+ solidBorderStyleToggleButton: () => cy.get('[data-ngie-testid="solid-toggle-button"]').eq(0),
169
+ noneBorderStyleToggleButton: () => cy.get('[data-ngie-testid="none-toggle-button"]').eq(0),
170
+ colorBlockSelectedIcon: () => cy.get('[class*="BtnSelectionWrapper"] svg'),
171
+ responseArea: () => cy.get('[data-widget="add_response"]'),
172
+ responseAreaNew: () => cy.get('.canvas-dropzone'),
173
+ answerInputFieldPreviewTabNew: () => cy.get('.equation-input-component '),
150
174
  }
151
175
 
152
176
  const steps = {
@@ -167,6 +191,8 @@ const steps = {
167
191
  ...gradingViewEnumerationComponent.steps,
168
192
  ...ariaLabelSectionComponent.steps,
169
193
  ...equationEditorSectionCommonComponent.steps,
194
+ ...styleAndLayoutCustomizationAccordionComponent.steps,
195
+ ...imageCanvasComponent.steps,
170
196
  verifyAddStructureTabIsSelected: () => {
171
197
  textEntryMathPage.addStructureTab()
172
198
  .should('have.attr', 'aria-selected', 'true');
@@ -994,7 +1020,7 @@ const steps = {
994
1020
  */
995
1021
  verifyAnswerInputFieldAriaLabelSpecifyCorrectAnswerSection: (inputFieldIndex, ariaLabel) => {
996
1022
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(inputFieldIndex);
997
- textEntryMathPage.responseAccordionAnswerInputField()
1023
+ textEntryMathPage.responseAccordionAnswerInputFieldNew()
998
1024
  .eq(inputFieldIndex)
999
1025
  .should('have.attr', 'aria-label', ariaLabel)
1000
1026
  },
@@ -1082,6 +1108,229 @@ const steps = {
1082
1108
  textEntryMathPage.responseInputFieldMathTemplatePreviewTab()
1083
1109
  .should('not.have.class', 'mq-editable-field');
1084
1110
  },
1111
+
1112
+ /**
1113
+ * Verifies the ARIA label text input fields.
1114
+ * @param {number} inputFieldIndex - The index of the input field to verify.
1115
+ */
1116
+ verifyAriaLabelTextInputFields: (inputFieldIndex) => {
1117
+ utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.inputFieldNumeration(), inputFieldIndex), `${inputFieldIndex + 1}`);
1118
+ // utilities.verifyInnerText(textEntryMathPage.inputFieldNumeration(), `${inputFieldIndex + 1}`)
1119
+ utilities.verifyInputFieldValue(textEntryMathPage.ariaLabelInputField(), '');
1120
+ },
1121
+
1122
+ /**
1123
+ * Verifies the color of a color block.
1124
+ * @param {number} blockIndex - The index of the color block.
1125
+ * @param {string} color - The expected background color of the color block.
1126
+ */
1127
+ verifyColorBlockColor: (blockIndex, color) => {
1128
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.colorBlock(), blockIndex), {
1129
+ 'background-color': color
1130
+ });
1131
+ },
1132
+
1133
+ /**
1134
+ * @param {number} blockIndex index of the color block in the style and layout customization section
1135
+ * @description this function verifies the selected state of a block
1136
+ */
1137
+ verifyColorBlockSelectedState: (blockIndex) => {
1138
+ utilities.getNthElement(textEntryMathPage.colorBlock(), blockIndex)
1139
+ .should('have.class', 'selected-button-icon')
1140
+ .within(() => {
1141
+ utilities.verifyElementVisibilityState(textEntryMathPage.colorBlockSelectedIcon(), 'visible');
1142
+ });
1143
+ },
1144
+
1145
+ /**
1146
+ * Verifies the selected state of a border style toggle button.
1147
+ * @param {('Dashed' | 'Dotted' | 'Solid' | 'None')} button - The border style to verify.
1148
+ * @throws {Error} Throws an error if an invalid border style is provided.
1149
+ */
1150
+ verifyBorderStyleToggleButtonSelectedState: (button) => {
1151
+ switch (button) {
1152
+ case 'Dashed':
1153
+ textEntryMathPage.dashedBorderStyleToggleButton()
1154
+ .should('have.class', 'ngie-toggle-button-selected');
1155
+ break;
1156
+ case 'Dotted':
1157
+ textEntryMathPage.dottedBorderStyleToggleButton()
1158
+ .should('have.class', 'ngie-toggle-button-selected');
1159
+ break;
1160
+ case 'Solid':
1161
+ textEntryMathPage.solidBorderStyleToggleButton()
1162
+ .should('have.class', 'ngie-toggle-button-selected');
1163
+ break;
1164
+ case 'None':
1165
+ textEntryMathPage.noneBorderStyleToggleButton()
1166
+ .should('have.class', 'ngie-toggle-button-selected');
1167
+ break;
1168
+ default:
1169
+ throw new Error('Invalid border style');
1170
+ }
1171
+ },
1172
+
1173
+ /**
1174
+ * Verifies the background color of a response area element.
1175
+ * @param {number} responseAreaIndex - The index of the response area to verify.
1176
+ * @param {string} colorValue - The expected background color value.
1177
+ */
1178
+ verifyResponseAreaFillColor: (responseAreaIndex, colorValue) => {
1179
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.responseArea(), responseAreaIndex), {
1180
+ 'background-color': colorValue
1181
+ });
1182
+ },
1183
+
1184
+ /**
1185
+ * Selects a color block by index.
1186
+ * @param {number} blockIndex - The index of the color block to select.
1187
+ */
1188
+ selectColorBlock: (blockIndex) => {
1189
+ utilities.getNthElement(textEntryMathPage.colorBlock(), blockIndex)
1190
+ .click();
1191
+ },
1192
+
1193
+ /**
1194
+ * Clicks on the edit color button.
1195
+ * @param {number} buttonIndex - The index of the edit color button.
1196
+ */
1197
+ editColor: (buttonIndex) => {
1198
+ utilities.getNthElement(textEntryMathPage.editColorButton(), buttonIndex)
1199
+ .click();
1200
+ },
1201
+
1202
+ /**
1203
+ * Verifies the background color of the answer input field at the specified index.
1204
+ * @param {number} responseAreaIndex - The index of the response area to verify.
1205
+ * @param {string} colorValue - The expected background color value in CSS format.
1206
+ */
1207
+ verifyAnswerInputFieldFillColor: (responseAreaIndex, colorValue) => {
1208
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTab(), responseAreaIndex), {
1209
+ 'background-color': colorValue
1210
+ });
1211
+ },
1212
+
1213
+ /**
1214
+ * Verifies the border color of the answer input field at the specified index.
1215
+ * @param {number} responseAreaIndex - The index of the response area to verify.
1216
+ * @param {string} borderValue - The expected border color value in CSS format.
1217
+ */
1218
+ verifyAnswerInputFieldBorderColor: (responseAreaIndex, borderValue) => {
1219
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTab(), responseAreaIndex), {
1220
+ 'border': borderValue
1221
+ });
1222
+ },
1223
+
1224
+ /**
1225
+ * Verifies the border style of the answer input field at the specified index.
1226
+ * @param {number} responseAreaIndex - The index of the response area to verify.
1227
+ * @param {string} borderStyle - The expected border style value in CSS format.
1228
+ */
1229
+ verifyAnswerInputFieldBorderStyle: (responseAreaIndex, borderStyle) => {
1230
+ const styleName = borderStyle.toLowerCase();
1231
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTab(), responseAreaIndex), {
1232
+ 'border-style': styleName
1233
+ });
1234
+ },
1235
+
1236
+ /**
1237
+ * Selects a border style toggle button and verifies it has the selected class.
1238
+ * @param {('Dashed' | 'Dotted' | 'Solid' | 'None')} button - The border style to select.
1239
+ * @throws {Error} Throws an error if an invalid border style is provided.
1240
+ */
1241
+ selectBorderStyleToggleButton: (button) => {
1242
+ switch (button) {
1243
+ case 'Dashed':
1244
+ textEntryMathPage.dashedBorderStyleToggleButton()
1245
+ .click()
1246
+ .should('have.class', 'ngie-toggle-button-selected');
1247
+ break;
1248
+ case 'Dotted':
1249
+ textEntryMathPage.dottedBorderStyleToggleButton()
1250
+ .click()
1251
+ .should('have.class', 'ngie-toggle-button-selected');
1252
+ break;
1253
+ case 'Solid':
1254
+ textEntryMathPage.solidBorderStyleToggleButton()
1255
+ .click()
1256
+ .should('have.class', 'ngie-toggle-button-selected');
1257
+ break;
1258
+ case 'None':
1259
+ textEntryMathPage.noneBorderStyleToggleButton()
1260
+ .click()
1261
+ .should('have.class', 'ngie-toggle-button-selected');
1262
+ break;
1263
+ default:
1264
+ throw new Error('Invalid border style');
1265
+ }
1266
+ },
1267
+
1268
+ /**
1269
+ * Verifies the border color of a response area element.
1270
+ * @param {number} responseAreaIndex - The index of the response area to verify.
1271
+ * @param {string} colorValue - The expected border color value.
1272
+ */
1273
+ verifyResponseAreaBorderColor: (responseAreaIndex, colorValue) => {
1274
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.responseArea(), responseAreaIndex), {
1275
+ 'border': colorValue
1276
+ });
1277
+ },
1278
+
1279
+ /**
1280
+ * Verifies the background color of a response area element.
1281
+ * @param {number} responseAreaIndex - The index of the response area to verify.
1282
+ * @param {string} colorValue - The expected background color value.
1283
+ */
1284
+ verifyResponseAreaFillColorAddBackGround: (responseAreaIndex, colorValue) => {
1285
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.responseAreaNew(), responseAreaIndex), {
1286
+ 'background-color': colorValue
1287
+ });
1288
+ },
1289
+
1290
+ /**
1291
+ * Verifies the background color of the answer input field at the specified index.
1292
+ * @param {number} responseAreaIndex - The index of the response area to verify.
1293
+ * @param {string} colorValue - The expected background color value in CSS format.
1294
+ */
1295
+ verifyAnswerInputFieldFillColorAddBackground: (responseAreaIndex, colorValue) => {
1296
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTabNew(), responseAreaIndex), {
1297
+ 'background-color': colorValue
1298
+ });
1299
+ },
1300
+
1301
+ /**
1302
+ * Verifies the border color of a response area element.
1303
+ * @param {number} responseAreaIndex - The index of the response area to verify.
1304
+ * @param {string} colorValue - The expected border color value.
1305
+ */
1306
+ verifyResponseAreaOverImageBorderColorAddBackGround: (responseAreaIndex, colorValue) => {
1307
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.responseAreaNew(), responseAreaIndex), {
1308
+ 'border': colorValue
1309
+ });
1310
+ },
1311
+
1312
+ /**
1313
+ * Verifies the border color of the answer input field at the specified index.
1314
+ * @param {number} responseAreaIndex - The index of the response area to verify.
1315
+ * @param {string} borderValue - The expected border color value in CSS format.
1316
+ */
1317
+ verifyAnswerInputFieldBorderColorAddBackGround: (responseAreaIndex, borderValue) => {
1318
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTab(), responseAreaIndex), {
1319
+ 'border': borderValue
1320
+ });
1321
+ },
1322
+
1323
+ /**
1324
+ * Verifies the border style of the answer input field at the specified index.
1325
+ * @param {number} responseAreaIndex - The index of the response area to verify.
1326
+ * @param {string} borderStyle - The expected border style value in CSS format.
1327
+ */
1328
+ verifyAnswerInputFieldBorderStyleAddBackGround: (responseAreaIndex, borderStyle) => {
1329
+ const styleName = borderStyle.toLowerCase();
1330
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.answerInputFieldPreviewTab(), responseAreaIndex), {
1331
+ 'border-style': styleName
1332
+ });
1333
+ }
1085
1334
  }
1086
1335
 
1087
1336
  const tests = {
@@ -1097,6 +1346,7 @@ const tests = {
1097
1346
  ...ariaLabelSectionComponent.tests,
1098
1347
  ...additionalSettingsAccessibilitySectionComponent.tests,
1099
1348
  ...equationEditorSectionCommonComponent.tests,
1349
+ ...styleAndLayoutCustomizationAccordionComponent.tests,
1100
1350
  /**
1101
1351
  * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
1102
1352
  * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
@@ -1123,7 +1373,7 @@ const tests = {
1123
1373
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
1124
1374
  textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
1125
1375
  equationEditorFlyout.steps.focusInPreviewInputField();
1126
- equationEditorFlyout.steps.clickOnEquationEditorCancelButton();
1376
+ equationEditorFlyout.steps.clickOnOkButton();
1127
1377
  textEntryMathPage.steps.focusOutOfResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
1128
1378
  utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
1129
1379
  utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Answer is required.');
@@ -1135,8 +1385,11 @@ const tests = {
1135
1385
  });
1136
1386
 
1137
1387
  it('User should be able to expand multiple response accordions simultaneously', () => {
1388
+ textEntryMathPage.steps.deleteAlternativeAnswerAccordion(0);
1389
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
1138
1390
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
1139
1391
  textEntryMathPage.steps.verifyResponseAccordionIsExpanded(0);
1392
+ textEntryMathPage.steps.verifyResponseAccordionIsExpanded(1);
1140
1393
  });
1141
1394
 
1142
1395
  autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
@@ -1197,6 +1450,465 @@ const tests = {
1197
1450
  it('User should be able to select a different evaluation method', () => {
1198
1451
  textEntryMathPage.steps.selectEvaluationMethod(evaluationMethods[3].name);
1199
1452
  });
1453
+ },
1454
+
1455
+ /**
1456
+ * Verifies the border color functionality in edit tab.
1457
+ * @param {string} type - 'Add structure' || 'Add background'.
1458
+ */
1459
+ verifyBorderColorFunctionalityEditTab: (type) => {
1460
+ it('When the default color block is in selected state in the "Fill color" section, then the background color of the text containers in the question input field should be the default selected color', () => {
1461
+ if (type === 'add background') {
1462
+ textEntryMathPage.steps.verifyResponseAreaOverImageBorderColorAddBackGround(0, `1px dashed ${css.color.activeComponentBorder}`);
1463
+ }
1464
+ else {
1465
+ textEntryMathPage.steps.verifyResponseAreaBorderColor(0, `1px solid ${css.color.activeComponentBorder}`);
1466
+ textEntryMathPage.steps.verifyResponseAreaBorderColor(1, `1px solid ${css.color.activeComponentBorder}`);
1467
+ }
1468
+ });
1469
+
1470
+ it('When the user selects the "None" color block, it should get in selected state and the no background color should be present for the text containers in the question input field', () => {
1471
+ textEntryMathPage.steps.selectColorBlock(3);
1472
+ if (type === 'add background') {
1473
+ textEntryMathPage.steps.verifyResponseAreaOverImageBorderColorAddBackGround(0, `1px dashed ${css.color.transparent}`);
1474
+ }
1475
+ else {
1476
+ textEntryMathPage.steps.verifyResponseAreaBorderColor(0, `1px solid ${css.color.transparent}`);
1477
+ textEntryMathPage.steps.verifyResponseAreaBorderColor(1, `1px solid ${css.color.transparent}`);
1478
+ }
1479
+ });
1480
+
1481
+ it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the background color of the text containers in the question input field should be the modified selected color', () => {
1482
+ textEntryMathPage.steps.editColor(1);
1483
+ colorPopupComponent.steps.clickInColorSaturationPalette();
1484
+ colorPopupComponent.steps.clickOnOkButton();
1485
+ if (type === 'add background') {
1486
+ textEntryMathPage.steps.verifyResponseAreaOverImageBorderColorAddBackGround(0, `1px dashed ${modifiedColor}`);
1487
+ }
1488
+ else {
1489
+ textEntryMathPage.steps.verifyResponseAreaBorderColor(0, `1px solid ${modifiedColor}`);
1490
+ textEntryMathPage.steps.verifyResponseAreaBorderColor(1, `1px solid ${modifiedColor}`);
1491
+ }
1492
+ });
1493
+
1494
+ it('When the adds a new text container, then the background color of the newly added text container should be the modified selected color', () => {
1495
+ if (type === 'add background') {
1496
+ textEntryMathPage.steps.insertResponseArea(60);
1497
+ textEntryMathPage.steps.verifyResponseAreaOverImageBorderColorAddBackGround(0, `1px dashed ${modifiedColor}`);
1498
+ textEntryMathPage.steps.verifyResponseAreaOverImageBorderColorAddBackGround(1, `1px dashed ${modifiedColor}`);
1499
+ }
1500
+ else {
1501
+ textEntryMathPage.steps.addResponseArea();
1502
+ textEntryMathPage.steps.verifyResponseAreaBorderColor(0, `1px solid ${modifiedColor}`);
1503
+ textEntryMathPage.steps.verifyResponseAreaBorderColor(1, `1px solid ${modifiedColor}`);
1504
+ textEntryMathPage.steps.verifyResponseAreaBorderColor(2, `1px solid ${modifiedColor}`);
1505
+ }
1506
+ });
1507
+ },
1508
+
1509
+ /**
1510
+ * Verifies the border color functionality in preview tab.
1511
+ * @param {string} type - 'Add structure' || 'Add background'.
1512
+ */
1513
+ verifyBorderColorFunctionalityPreviewTab: (type) => {
1514
+ it('When the default color block is in selected state in the "Fill color" section, then the background color of the text containers in the preview tab should be the default selected color', () => {
1515
+ if (type === 'add background') {
1516
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColorAddBackGround(0, `1px dashed ${css.color.activeComponentBorder}`);
1517
+ }
1518
+ else {
1519
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(0, `1px dashed ${css.color.activeComponentBorder}`);
1520
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(1, `1px dashed ${css.color.activeComponentBorder}`);
1521
+ }
1522
+ });
1523
+
1524
+ it('When the user selects the "None" color block, it should get in selected state and the no background color should be present for the text containers in the preview tab', () => {
1525
+ textEntryMathPage.steps.switchToEditTab();
1526
+ textEntryMathPage.steps.selectColorBlock(3);
1527
+ textEntryMathPage.steps.switchToPreviewTab();
1528
+ if (type === 'add background') {
1529
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColorAddBackGround(0, `0px dashed ${css.color.text}`);
1530
+ }
1531
+ else {
1532
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(0, `0px dashed ${css.color.text}`);
1533
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(1, `0px dashed ${css.color.text}`);
1534
+ }
1535
+ });
1536
+
1537
+ it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the color block should get updated accordingly', () => {
1538
+ textEntryMathPage.steps.switchToEditTab();
1539
+ textEntryMathPage.steps.editColor(1);
1540
+ colorPopupComponent.steps.clickInColorSaturationPalette();
1541
+ colorPopupComponent.steps.clickOnOkButton();
1542
+ textEntryMathPage.steps.switchToPreviewTab();
1543
+ if (type === 'add background') {
1544
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColorAddBackGround(0, `1px dashed ${modifiedColor}`);
1545
+ }
1546
+ else {
1547
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(0, `1px dashed ${modifiedColor}`);
1548
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(1, `1px dashed ${modifiedColor}`);
1549
+ }
1550
+ });
1551
+
1552
+ it('The background color of the text containers in the preview tab should be the modified selected color', () => {
1553
+ textEntryMathPage.steps.switchToEditTab();
1554
+ if (type === 'add background') {
1555
+ textEntryMathPage.steps.insertResponseArea(60);
1556
+ textEntryMathPage.steps.switchToPreviewTab();
1557
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColorAddBackGround(0, `1px dashed ${modifiedColor}`);
1558
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColorAddBackGround(1, `1px dashed ${modifiedColor}`);
1559
+ }
1560
+ else {
1561
+ textEntryMathPage.steps.addResponseArea();
1562
+ textEntryMathPage.steps.switchToPreviewTab();
1563
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(0, `1px dashed ${modifiedColor}`);
1564
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(1, `1px dashed ${modifiedColor}`);
1565
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderColor(2, `1px dashed ${modifiedColor}`);
1566
+ }
1567
+ });
1568
+ },
1569
+
1570
+ verifyEditColorPopupFunctionality: () => {
1571
+ it('When the user clicks on the \'Edit color\' present in an \'Text color\' popup, then a select color popup should be displayed', () => {
1572
+ textEntryMathPage.steps.editColor(0);
1573
+ colorPopupComponent.steps.verifyColorPopupIsDisplayed();
1574
+ });
1575
+
1576
+ colorPopupComponent.tests.verifyColorPopupSelectColorTitle();
1577
+
1578
+ colorPopupComponent.tests.verifySaturationAndOpacityGradientPalette('rgb(255, 255, 255)');
1579
+
1580
+ colorPopupComponent.tests.verifyColorHuePaletteAndHexInputField('rgb(255, 0, 0)', '#ffffff');
1581
+
1582
+ colorPopupComponent.tests.verifyColorPopupFunctionality();
1583
+ },
1584
+
1585
+ verifyColorPopupUpdatingSelectedColorFunctionality: () => {
1586
+ it('When the user moves the color picker in the color saturation palette, color in the selected color block and the hex code should change, color in the hue color palette and the opacity value should not change', () => {
1587
+ textEntryMathPage.steps.editColor(0);
1588
+ colorPopupComponent.steps.clickInColorSaturationPalette();
1589
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(121, 60, 60)');
1590
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(119, 60, 60)');
1591
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
1592
+ colorPopupComponent.steps.verifyHexValue('#793c3c');
1593
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(119, 60, 60)');
1594
+ });
1595
+
1596
+ it('When the user moves the color picker in the color hue palette, color in the selected color block, the hex code and the saturation color palette should change and the opacity value should not change', () => {
1597
+ colorPopupComponent.steps.clickInColorHuePalette();
1598
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(60, 121, 121)');
1599
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(0, 255, 255)');
1600
+ colorPopupComponent.steps.verifyHexValue('#3c7979');
1601
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(60, 119, 119)');
1602
+ });
1603
+
1604
+ it('When the user changes the color using hex code, the color in color saturation palette and color hue palette should change and the opacity value should not change', () => {
1605
+ colorPopupComponent.steps.addInputToHexInputField('#ff0000');
1606
+ colorPopupComponent.steps.verifyHexValue('#ff0000');
1607
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
1608
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
1609
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(255, 0, 0)');
1610
+ });
1611
+ },
1612
+
1613
+ verifyColorPopUpCancelOkButtonFunctionality: () => {
1614
+ it('When the user modifies the selected color in the color popup and clicks on \'Cancel\' button, then the popup should close, the color block should not change and the modifications in the color popup should not persist', () => {
1615
+ textEntryMathPage.steps.editColor(0);
1616
+ colorPopupComponent.steps.addInputToHexInputField('#ff0000');
1617
+ colorPopupComponent.steps.clickOnOpacityGradientHuePalette();
1618
+ colorPopupComponent.steps.clickOnCancelButton();
1619
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
1620
+ colorPopupComponent.steps.verifyColorBlockInOptionAccordion(0, 'rgb(245, 248, 255)');
1621
+ });
1622
+
1623
+ it('When the user modifies the selected color in the color popup and clicks on \'Ok\' button, then the popup should close, the color block should change to the new selected color and the modifications in the color popup should persist', () => {
1624
+ cy.log('Pre-step: clicking on the edit color button')
1625
+ textEntryMathPage.steps.editColor(0);
1626
+ colorPopupComponent.steps.addInputToHexInputField('#ff0000');
1627
+ colorPopupComponent.steps.clickOnOpacityGradientHuePalette();
1628
+ colorPopupComponent.steps.clickOnOkButton();
1629
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
1630
+ colorPopupComponent.steps.verifyColorBlockInOptionAccordion(0, 'rgba(255, 0, 0, 0.5)');
1631
+ });
1632
+ },
1633
+
1634
+ verifyStyleAndLayoutCustomizationAccordionContent: () => {
1635
+ it('"Text container" label should be displayed', () => {
1636
+ utilities.verifyInnerText(textEntryMathPage.componentContainerLabel(), 'Text container');
1637
+ });
1638
+
1639
+ it('"Fill color" label and two color blocks and an "Edit color" button should be displayed. The selected color block should be of color "rgb(245, 248, 255)" and the other color block should have "No color"', () => {
1640
+ utilities.verifyInnerText(textEntryMathPage.fillColorLabel(), 'Fill color');
1641
+ textEntryMathPage.steps.verifyColorBlockColor(0, css.color.optionsBg);
1642
+ textEntryMathPage.steps.verifyColorBlockSelectedState(0);
1643
+ textEntryMathPage.steps.verifyColorBlockColor(1, css.color.none);
1644
+ utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.editColorButton(), 0), 'Edit color');
1645
+ utilities.verifyElementVisibilityState(textEntryMathPage.editColorButton(), 'visible');
1646
+ });
1647
+
1648
+ it('"Border color" label and two color blocks and an "Edit color" button should be displayed. The selected color block should be of color "rgb(82, 0, 255) and the other color block should have "No color"', () => {
1649
+ utilities.verifyInnerText(textEntryMathPage.borderColorLabel(), 'Border color');
1650
+ utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.editColorButton(), 1), 'Edit color');
1651
+ utilities.verifyElementVisibilityState(textEntryMathPage.editColorButton(), 'visible');
1652
+ textEntryMathPage.steps.verifyColorBlockColor(2, css.color.activeComponentBorder);
1653
+ textEntryMathPage.steps.verifyColorBlockSelectedState(2);
1654
+ textEntryMathPage.steps.verifyColorBlockColor(3, css.color.none);
1655
+ });
1656
+
1657
+ it(`"Border style" label and four toggle buttons should be displayed - "Dashed", "Dotted", "Solid", "None". By default \'Dashed\' button should be in selected state`, () => {
1658
+ utilities.verifyInnerText(textEntryMathPage.borderStyleLabel(), 'Border style');
1659
+ utilities.verifyInnerText(textEntryMathPage.dashedBorderStyleToggleButton(), 'Dashed');
1660
+ utilities.verifyElementVisibilityState(textEntryMathPage.dashedBorderStyleToggleButton(), 'visible');
1661
+ utilities.verifyInnerText(textEntryMathPage.dottedBorderStyleToggleButton(), 'Dotted');
1662
+ utilities.verifyElementVisibilityState(textEntryMathPage.dottedBorderStyleToggleButton(), 'visible');
1663
+ utilities.verifyInnerText(textEntryMathPage.solidBorderStyleToggleButton(), 'Solid');
1664
+ utilities.verifyElementVisibilityState(textEntryMathPage.solidBorderStyleToggleButton(), 'visible');
1665
+ textEntryMathPage.steps.verifyBorderStyleToggleButtonSelectedState('Dashed');
1666
+ utilities.verifyInnerText(textEntryMathPage.noneBorderStyleToggleButton(), 'None');
1667
+ utilities.verifyElementVisibilityState(textEntryMathPage.noneBorderStyleToggleButton(), 'visible');
1668
+ });
1669
+
1670
+ it('When the user hovers over the color blocks in the "Fill color" section, hex code of the selected color should be displayed in a tooltip', () => {
1671
+ utilities.getNthElement(textEntryMathPage.colorBlock(), 0).verifyTooltip('#F5F8FF');
1672
+ utilities.getNthElement(textEntryMathPage.colorBlock(), 1).verifyTooltip('None');
1673
+ });
1674
+
1675
+ it('When the user hovers over the color blocks in the "Border color" section, hex code of the selected color should be displayed in a tooltip', () => {
1676
+ utilities.getNthElement(textEntryMathPage.colorBlock(), 2).verifyTooltip('#5200FF');
1677
+ utilities.getNthElement(textEntryMathPage.colorBlock(), 3).verifyTooltip('None');
1678
+ });
1679
+
1680
+ it('CSS of "Style and layout customization accordion contents"', { tags: 'css' }, () => {
1681
+ utilities.verifyCSS(textEntryMathPage.componentContainerLabel(), {
1682
+ 'color': css.color.labels,
1683
+ 'font-size': css.fontSize.default,
1684
+ 'font-weight': css.fontWeight.semibold
1685
+ });
1686
+ utilities.verifyCSS(textEntryMathPage.fillColorLabel(), {
1687
+ 'color': css.color.labels,
1688
+ 'font-size': css.fontSize.normal,
1689
+ 'font-weight': css.fontWeight.semibold
1690
+ });
1691
+ utilities.verifyCSS(textEntryMathPage.borderColorLabel(), {
1692
+ 'color': css.color.labels,
1693
+ 'font-size': css.fontSize.normal,
1694
+ 'font-weight': css.fontWeight.semibold
1695
+ });
1696
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.colorBlock(), 0), {
1697
+ 'background-color': css.color.optionsBg,
1698
+ 'border': `1px solid ${css.color.figDefaultComponentBorder}`
1699
+ });
1700
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.editColorButton(), 0), {
1701
+ 'color': css.color.activeButtons,
1702
+ 'font-size': css.fontSize.default,
1703
+ 'font-weight': css.fontWeight.regular,
1704
+ 'background-color': css.color.transparent
1705
+ });
1706
+ utilities.verifyCSS(textEntryMathPage.borderStyleLabel(), {
1707
+ 'color': css.color.labels,
1708
+ 'font-size': css.fontSize.normal,
1709
+ 'font-weight': css.fontWeight.semibold
1710
+ });
1711
+ utilities.verifyCSS(textEntryMathPage.dottedBorderStyleToggleButton(), {
1712
+ 'color': css.color.secondaryBtn,
1713
+ 'background-color': css.color.secondaryBtnBg,
1714
+ 'font-size': css.fontSize.default,
1715
+ 'font-weight': css.fontWeight.regular,
1716
+ 'border': `1px solid ${css.color.figDefaultComponentBorder}`
1717
+ });
1718
+ let selectedToggleButton;
1719
+ if (selectedStyle == 'dashed') {
1720
+ selectedToggleButton = textEntryMathPage.dashedBorderStyleToggleButton();
1721
+ } else {
1722
+ selectedToggleButton = textEntryMathPage.solidBorderStyleToggleButton();
1723
+ }
1724
+ utilities.verifyCSS(selectedToggleButton, {
1725
+ 'color': css.color.defaultBackground,
1726
+ 'background-color': css.color.secondaryBtnBg,
1727
+ 'font-size': css.fontSize.default,
1728
+ 'font-weight': css.fontWeight.regular,
1729
+ 'border': `2px solid ${css.color.primaryBtnBg}`
1730
+ });
1731
+ });
1732
+
1733
+ it('Accessibility of "Style and layout customization accordion contents"', { tags: 'a11y' }, () => {
1734
+ cy.checkAccessibility(textEntryMathPage.componentContainerLabel().parents('.ngie-accordion-detail'))
1735
+ });
1736
+
1737
+ it('CSS of "Style and layout customization accordion contents" - hover state', { tags: 'css' }, () => {
1738
+ utilities.triggerMouseover(utilities.getNthElement(textEntryMathPage.colorBlock(), 0));
1739
+ utilities.verifyElementVisibilityState(textEntryMathPage.tooltipText(), 'visible');
1740
+ utilities.verifyCSS(textEntryMathPage.tooltipText(), {
1741
+ 'background-color': css.color.tooltipBg,
1742
+ 'color': css.color.whiteText,
1743
+ 'font-size': css.fontSize.small,
1744
+ 'font-weight': css.fontWeight.regular
1745
+ });
1746
+ utilities.triggerMouseout(utilities.getNthElement(textEntryMathPage.colorBlock(), 0));
1747
+ utilities.verifyElementVisibilityState(textEntryMathPage.tooltipText(), 'notExist');
1748
+ utilities.hoverOverElement(utilities.getNthElement(textEntryMathPage.editColorButton(), 0));
1749
+ utilities.verifyCSS(utilities.getNthElement(textEntryMathPage.editColorButton(), 0), {
1750
+ 'background-color': css.color.optionsBg,
1751
+ 'color': css.color.activeButtons,
1752
+ 'font-size': css.fontSize.default,
1753
+ 'font-weight': css.fontWeight.regular
1754
+ });
1755
+ utilities.hoverAwayFromElement();
1756
+ utilities.hoverOverElement(textEntryMathPage.dottedBorderStyleToggleButton());
1757
+ utilities.verifyCSS(textEntryMathPage.dottedBorderStyleToggleButton(), {
1758
+ 'color': css.color.secondaryBtn,
1759
+ 'background-color': css.color.secondaryBtnBg,
1760
+ 'font-size': css.fontSize.default,
1761
+ 'font-weight': css.fontWeight.regular,
1762
+ 'border': `2px solid ${css.color.draggableOptionBorder}`
1763
+ });
1764
+ utilities.hoverAwayFromElement();
1765
+ });
1766
+ },
1767
+
1768
+ /**
1769
+ * Verifies the fill color functionality preview tab.
1770
+ * @param {string} type - 'Add structure' || 'Add background'.
1771
+ */
1772
+ verifyFillColorFunctionalityEditTab: (type) => {
1773
+ it('When the default color block is in selected state in the "Fill color" section, then the background color of the text containers in the question input field should be the default selected color', () => {
1774
+ if (type === 'add background') {
1775
+ textEntryMathPage.steps.verifyResponseAreaFillColorAddBackGround(0, css.color.optionsBg);
1776
+ }
1777
+ else {
1778
+ textEntryMathPage.steps.verifyResponseAreaFillColor(0, css.color.optionsBg);
1779
+ textEntryMathPage.steps.verifyResponseAreaFillColor(1, css.color.optionsBg);
1780
+ }
1781
+ });
1782
+
1783
+ it('When the user selects the "None" color block, it should get in selected state and the no background color should be present for the text containers in the question input field', () => {
1784
+ textEntryMathPage.steps.selectColorBlock(1);
1785
+ if (type === 'add background') {
1786
+ textEntryMathPage.steps.verifyResponseAreaFillColorAddBackGround(0, css.color.transparent);
1787
+ }
1788
+ else {
1789
+ textEntryMathPage.steps.verifyResponseAreaFillColor(0, css.color.transparent);
1790
+ textEntryMathPage.steps.verifyResponseAreaFillColor(1, css.color.transparent);
1791
+ }
1792
+ });
1793
+
1794
+ it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the background color of the text containers in the question input field should be the modified selected color', () => {
1795
+ textEntryMathPage.steps.editColor(0);
1796
+ colorPopupComponent.steps.clickInColorSaturationPalette();
1797
+ colorPopupComponent.steps.clickOnOkButton();
1798
+ if (type === 'add background') {
1799
+ textEntryMathPage.steps.verifyResponseAreaFillColorAddBackGround(0, modifiedColor);
1800
+ }
1801
+ else {
1802
+ textEntryMathPage.steps.verifyResponseAreaFillColor(0, modifiedColor);
1803
+ textEntryMathPage.steps.verifyResponseAreaFillColor(1, modifiedColor);
1804
+ }
1805
+ });
1806
+
1807
+ it('When the adds a new text container, then the background color of the newly added text container should be the modified selected color', () => {
1808
+ if (type === 'add background') {
1809
+ textEntryMathPage.steps.insertResponseArea(60);
1810
+ textEntryMathPage.steps.verifyResponseAreaFillColorAddBackGround(0, modifiedColor);
1811
+ textEntryMathPage.steps.verifyResponseAreaFillColorAddBackGround(1, modifiedColor);;
1812
+ }
1813
+ else {
1814
+ textEntryMathPage.steps.addResponseArea();
1815
+ textEntryMathPage.steps.verifyResponseAreaFillColor(0, modifiedColor);
1816
+ textEntryMathPage.steps.verifyResponseAreaFillColor(1, modifiedColor);
1817
+ textEntryMathPage.steps.verifyResponseAreaFillColor(2, modifiedColor);
1818
+ }
1819
+ });
1820
+ },
1821
+
1822
+ /**
1823
+ * Verifies the fill color functionality preview tab.
1824
+ * @param {string} type - 'Add structure' || 'Add background'.
1825
+ */
1826
+ verifyFillColorFunctionalityPreviewTab: (type) => {
1827
+ it('When the default color block is in selected state in the "Fill color" section, then the background color of the text containers in the preview tab should be the default selected color', () => {
1828
+ if (type === 'add background') {
1829
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColorAddBackground(0, css.color.optionsBg);
1830
+ }
1831
+ else {
1832
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColor(0, css.color.optionsBg);
1833
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColor(1, css.color.optionsBg);
1834
+ }
1835
+ });
1836
+
1837
+ it('When the user selects the "None" color block, it should get in selected state and the no background color should be present for the text containers in the preview tab', () => {
1838
+ textEntryMathPage.steps.switchToEditTab();
1839
+ textEntryMathPage.steps.selectColorBlock(1);
1840
+ textEntryMathPage.steps.switchToPreviewTab();
1841
+ if (type === 'add background') {
1842
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColorAddBackground(0, css.color.transparent);
1843
+ }
1844
+ else {
1845
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColor(0, css.color.transparent);
1846
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColor(1, css.color.transparent);
1847
+ }
1848
+ });
1849
+
1850
+ it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the color block should get updated accordingly', () => {
1851
+ textEntryMathPage.steps.switchToEditTab();
1852
+ textEntryMathPage.steps.editColor(0);
1853
+ colorPopupComponent.steps.clickInColorSaturationPalette();
1854
+ colorPopupComponent.steps.clickOnOkButton();
1855
+ textEntryMathPage.steps.switchToPreviewTab();
1856
+ if (type === 'add background') {
1857
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColorAddBackground(0, modifiedColor);
1858
+ }
1859
+ else {
1860
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColor(0, modifiedColor);
1861
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColor(1, modifiedColor);
1862
+ }
1863
+ });
1864
+
1865
+ it('The background color of the text containers in the preview tab should be the modified selected color', () => {
1866
+ textEntryMathPage.steps.switchToEditTab();
1867
+ if (type === 'add background') {
1868
+ textEntryMathPage.steps.insertResponseArea(60);
1869
+ textEntryMathPage.steps.switchToPreviewTab();
1870
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColorAddBackground(0, modifiedColor);
1871
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColorAddBackground(1, modifiedColor);;
1872
+ }
1873
+ else {
1874
+ textEntryMathPage.steps.addResponseArea();
1875
+ textEntryMathPage.steps.switchToPreviewTab();
1876
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColor(0, modifiedColor);
1877
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColor(1, modifiedColor);
1878
+ textEntryMathPage.steps.verifyAnswerInputFieldFillColor(2, modifiedColor);
1879
+ }
1880
+ });
1881
+ },
1882
+
1883
+ /**
1884
+ * Verifies the border style of the answer input field preview tab.
1885
+ * @param {string} type - 'Add structure' || 'Add background'.
1886
+ */
1887
+ verifyBorderStylePreviewTab: (type) => {
1888
+ it('When by default \'Dashed\' border style is in selected state, then the border style of the text containers in the preview tab should be \'Dashed\'', () => {
1889
+ if (type === 'add background') {
1890
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderStyleAddBackGround(0, 'dashed');
1891
+ }
1892
+ else {
1893
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderStyle(0, 'dashed');
1894
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderStyle(1, 'dashed');
1895
+ }
1896
+ });
1897
+
1898
+ borderStyles.forEach((style) => {
1899
+ it(`When the user selects ${style}, then the border style of the text containers in the preview tab should update to ${style}`, () => {
1900
+ textEntryMathPage.steps.switchToEditTab();
1901
+ textEntryMathPage.steps.selectBorderStyleToggleButton(style);
1902
+ textEntryMathPage.steps.switchToPreviewTab();
1903
+ if (type === 'add background') {
1904
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderStyleAddBackGround(0, style);
1905
+ }
1906
+ else {
1907
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderStyle(0, style);
1908
+ textEntryMathPage.steps.verifyAnswerInputFieldBorderStyle(1, style);
1909
+ }
1910
+ });
1911
+ })
1200
1912
  }
1201
1913
  }
1202
1914