itemengine-cypress-automation 1.0.155-migrationScripts-86e4c95.0 → 1.0.155

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +1 -1
  2. package/cypress/e2e/ILC/DesmosGraphing/additionalSettings.js +5 -5
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +2 -2
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +4 -4
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +4 -4
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +1 -1
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +1 -1
  8. package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +6 -6
  9. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +2 -3
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +1 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +34 -29
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +2 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +1 -1
  14. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -0
  15. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +4 -1
  16. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +2 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +1 -1
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +2 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -0
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsForDropdowns.js +7 -7
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +1 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +20 -8
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +2 -2
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +1 -0
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +3 -3
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +5 -4
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +5 -2
  34. package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +2 -2
  35. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +4 -3
  37. package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -0
  38. package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +0 -8
  39. package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +1 -1
  40. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +39 -35
  41. package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +1 -1
  42. package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +8 -6
  43. package/cypress/e2e/ILC/GridFill/customizeLayoutFillColor.js +475 -0
  44. package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +669 -0
  45. package/cypress/e2e/ILC/GridFill/customizeLayoutSectionShadeCellsGridBorders.js +1 -1
  46. package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +0 -11
  47. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +204 -0
  48. package/cypress/e2e/ILC/GridFill/gridLayoutEditTabFunctionality.js +229 -0
  49. package/cypress/e2e/ILC/GridFill/gridLayoutPreviewTabFunctionality.js +219 -0
  50. package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -0
  51. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +2 -2
  52. package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +0 -2
  53. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  54. package/cypress/e2e/ILC/Matching/draggableOptions.js +1 -1
  55. package/cypress/e2e/ILC/Matching/headerSection.js +82 -0
  56. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +93 -0
  57. package/cypress/e2e/ILC/MultipleSelection/blockCreateItem.js +2 -2
  58. package/cypress/e2e/ILC/MultipleSelection/editTabScoringSection.js +3 -0
  59. package/cypress/e2e/ILC/MultipleSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
  60. package/cypress/e2e/ILC/MultipleSelection/multipleSelectionBasicAccessibility.js +8 -10
  61. package/cypress/e2e/ILC/MultipleSelection/specifyCorrectAnswerSection.js +3 -3
  62. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +16 -25
  63. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
  64. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +403 -0
  65. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +363 -0
  66. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +393 -0
  67. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +377 -0
  68. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
  69. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +341 -0
  70. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +373 -0
  71. package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +0 -1
  72. package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +27 -8
  73. package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +15 -34
  74. package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +13 -15
  75. package/cypress/e2e/ILC/ShortTextResponseNew/specifyCorrectAnswerSection.js +4 -4
  76. package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +4 -2
  77. package/cypress/e2e/ILC/SingleSelection/blockCreateItem.js +2 -2
  78. package/cypress/e2e/ILC/SingleSelection/specifyCorrectAnswerSection.js +3 -3
  79. package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +1 -1
  80. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +183 -0
  81. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +185 -0
  82. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +263 -0
  83. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
  84. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +233 -0
  85. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +205 -0
  86. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +233 -0
  87. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +214 -0
  88. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
  89. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
  90. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +213 -0
  91. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +21 -17
  92. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +1 -1
  93. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +25 -25
  94. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +20 -17
  95. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -2
  96. package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +2 -3
  97. package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +3 -3
  98. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +2 -2
  99. package/cypress/fixtures/fillColorDefaultProperties.js +35 -0
  100. package/cypress/fixtures/theme/ilc.json +2 -1
  101. package/cypress/fixtures/uploads/sampleVirus.zip +0 -0
  102. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  103. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  104. package/cypress/pages/components/backgroundImageUploadComponent.js +4 -1
  105. package/cypress/pages/components/colorPopupComponent.js +6 -3
  106. package/cypress/pages/components/commonComponents.js +1 -1
  107. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +4 -3
  108. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +47 -12
  109. package/cypress/pages/components/gridQuestionCommonComponent.js +0 -81
  110. package/cypress/pages/components/imageCanvasComponent.js +10 -8
  111. package/cypress/pages/components/listSortingAndOrderingBase.js +1 -1
  112. package/cypress/pages/components/questionInputFieldComponent.js +1 -1
  113. package/cypress/pages/components/questionInstructionsComponent.js +1 -1
  114. package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
  115. package/cypress/pages/essayResponsePage.js +4 -4
  116. package/cypress/pages/fillInTheGapsDragAndDropPage.js +34 -23
  117. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +0 -1
  118. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +26 -4
  119. package/cypress/pages/fillInTheGapsOverImageTextPage.js +0 -29
  120. package/cypress/pages/graphingPage.js +26 -16
  121. package/cypress/pages/gridFillPage.js +1610 -90
  122. package/cypress/pages/matchingPage.js +164 -20
  123. package/cypress/pages/multipleSelectionGridPage.js +82 -2
  124. package/cypress/pages/multipleSelectionPage.js +7 -2
  125. package/cypress/pages/rulerPage.js +3 -8
  126. package/cypress/pages/shortTextResponsePage.js +13 -0
  127. package/cypress/pages/simpleCalculatorPage.js +8 -0
  128. package/cypress/pages/singleSelectionGridPage.js +58 -2
  129. package/cypress/pages/textEntryMathPage.js +58 -11
  130. package/cypress/pages/uploadResponsePage.js +4 -2
  131. package/package.json +2 -2
  132. package/cypress/e2e/ILC/MultipleSelection/multipleSelectionAdditionalSettings.js +0 -835
  133. package/cypress/e2e/ILC/SingleSelection/singleSelectionAdditionalSettings.js +0 -469
@@ -1,4 +1,4 @@
1
- import { commonComponents, autoScoredScoringSectionMultiResponseType, questionInputFieldComponent, correctIncorrectAnswerLabelComponent, questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, studentViewSettingsLabelComponent } from "./components";
1
+ import { commonComponents, autoScoredScoringSectionMultiResponseType, questionInputFieldComponent, correctIncorrectAnswerLabelComponent, questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, studentViewSettingsLabelComponent, colorPopupComponent, backgroundImageUploadComponent, imageCanvasComponent, imageActionsComponent } from "./components";
2
2
  import { dialogBoxBase } from ".";
3
3
  import utilities from "../support/helpers/utilities";
4
4
  const css = Cypress.env('css');
@@ -10,9 +10,27 @@ const selectors = {
10
10
  ...autoScoredScoringSectionMultiResponseType,
11
11
  ...autoScoredSpecifyCorrectAnswerSection,
12
12
  ...correctIncorrectAnswerLabelComponent,
13
- ...commonComponents,
14
13
  ...autoScoredScoringPreviewTab,
15
-
14
+ ...backgroundImageUploadComponent,
15
+ ...dialogBoxBase,
16
+ ...imageCanvasComponent,
17
+ ...imageActionsComponent,
18
+
19
+ //grid layout
20
+ gridLayoutLabel: () => cy.get('[class*="GridFillstyles__CanvasParameterLabelWrapper"]'),
21
+ selectLayoutLabel: () => cy.get('.layout-accordian-cls [class*="GridFillstyles__CanvasInputLabelWrapper"]'),
22
+ openTheGridSelectorDropdownButton: () => cy.get('.layout-accordian-cls .ngie-accordion-summary'),
23
+ openTheGridSelectorDropdownButtonLabel: () => cy.get('.layout-accordian-cls .ngie-accordion-summary .label-properties'),
24
+ gridInOpenTheGridSelectorDropdownContainer: () => cy.get('.add-rows-cols-grid-container'),
25
+ cellInOpenTheGridSelectorAccordion: () => cy.get('.add-rows-cols-grid-container [class*="GridFillstyles__CellContainer"]'),
26
+ cellHeightLabel: () => cy.get('[class*="WidthHeightWrapper"] [class*="CanvasInputLabelWrapper"]').eq(0),
27
+ cellHeightInputField: () => cy.get('[class*="WidthHeightWrapper"] input').eq(0),
28
+ cellWidthLabel: () => cy.get('[class*="WidthHeightWrapper"] [class*="CanvasInputLabelWrapper"]').eq(1),
29
+ cellWidthInputField: () => cy.get('[class*="WidthHeightWrapper"] input').eq(1),
30
+ makeResponsiveLabel: () => cy.get('.mobile-responsive-wrapper .MuiFormControlLabel-label'),
31
+ makeResponsiveCheckbox: () => cy.get('.mobile-responsive-wrapper input'),
32
+ makeResponsiveCheckboxIcon: () => cy.get('.mobile-responsive-wrapper .MuiSwitch-thumb'),
33
+ whatIsThisLabel: () => cy.get('.what-is-wrapper [class*="StyledLink"]'),
16
34
  columnsInputField: () => cy.get('[class*="GridFillstyles__RowsColWrapper"] .input-stepper-textfield').eq(0),
17
35
  columnsLabel: () => cy.get('[class*="GridFillstyles__RowsColWrapper"] [class*="GridFillstyles__CanvasInputLabelWrapper"]').eq(0),
18
36
  columnsIncreaseButton: () => cy.get('[class*="GridFillstyles__RowsColWrapper"] [aria-label="Increase count"]').eq(0),
@@ -21,9 +39,10 @@ const selectors = {
21
39
  rowsLabel: () => cy.get('[class*="GridFillstyles__RowsColWrapper"] [class*="GridFillstyles__CanvasInputLabelWrapper"]').eq(1),
22
40
  rowsIncreaseButton: () => cy.get('[class*="GridFillstyles__RowsColWrapper"] [aria-label="Increase count"]').eq(1),
23
41
  rowsDecreaseButton: () => cy.get('[class*="GridFillstyles__RowsColWrapper"] [aria-label="Decrease count"]').eq(1),
42
+
24
43
  cellInEditTab: () => cy.get('[class*="GridFillResponsestyles__CellContainer"]'),
25
- matchExactPositionLabel: () => cy.get('[data-ngie-testid="match-exact-position-of-cells-checkbox"] [class*="label"]'),
26
- matchExactPositionCheckbox: () => cy.get('[data-ngie-testid="match-exact-position-of-cells-checkbox"] input'),
44
+ matchExactPositionLabel: () => cy.get('[data-ngie-testid="exact-match-position-of-cells-checkbox"] .MuiFormControlLabel-label'),
45
+ matchExactPositionCheckbox: () => cy.get('[data-ngie-testid="exact-match-position-of-cells-checkbox"] input'),
27
46
  cellInSpecifyCorrectAnswerSection: () => cy.get('[class*="GridFillstyles__SetCorrectAnswerWrapper"] [class*="GridFillResponsestyles__CellContainer"]'),
28
47
  rowsWrapperSpecifyCorrectAnswerSection: () => cy.get('[class*="GridFillstyles__SetCorrectAnswerWrapper"] [class*="GridFillResponsestyles__RowContainer"]'),
29
48
  correctAnswerAccordion: () => cy.get('.correct-answer-accordion'),
@@ -35,27 +54,27 @@ const selectors = {
35
54
  penaltyPointsForEachIncorrectCellInputField: () => cy.get('input[aria-label="Penalty points for each incorrect cell"]'),
36
55
  specifyPointsForEachIncorrectCellRadioButton: () => cy.get('input[aria-label*="Specify points for each incorrect"]'),
37
56
  cellShadeCountInputField: () => cy.get('.grid-fill-response-wrapper [aria-label="labeling"]'),
38
- matchExactPositionOfCellsCheckbox: () => cy.get('input[aria-label="Match exact position of cells"]'),
39
57
  gridSpecifyCorrectAnswerSection: () => cy.get('[class*="AnswerAccordionstyles__AnswerPanel"] [class*="GridFillResponsestyles__GridWrapper"]'),
40
58
  gridRow: () => cy.get('[class*="GridFillResponsestyles__RowContainer"]'),
41
59
  cellShadeCountLabel: () => cy.get('[class*="GridFillResponsestyles__CellFillCountLabel"]'),
42
60
  cellShadeCountInputField: () => cy.get('.cell-count-cls input'),
43
- penaltyPointsForEachIncorrectCellInputField: () => cy.get('input[aria-label="Penalty points for each incorrect cell"]'),
44
- //student view settings
45
- maxSelectedCellLabel: () => cy.get('[class*="MaxSelectedCellsstyles__MaxCellsLabel"]'),
46
- maxSelectedCellInputField: () => cy.get('input[aria-label="Max selected cells"]'),
61
+ paginationButtonWrapperSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-accordion [class*="PaginationControlWrapper"]'),
62
+ paginationTextSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-accordion [class*="PaginationControlWrapper"] [class*="PaginationDetails"]'),
63
+ previousPaginationButtonSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-accordion [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(0),
64
+ nextPaginationButtonSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-accordion [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(1),
65
+
47
66
  //Customize layout accordion
48
67
  customizeLayoutAccordionButton: () => cy.get('.customize-layout-wrapper-cls .ngie-accordion-summary'),
49
68
  customizeLayoutLabel: () => cy.get('[class*="AdditionalGridFillSettingsstyles__StyledLabel"]'),
50
69
  customizeLayoutAccordionChevronButton: () => cy.get('.customize-layout-wrapper-cls [class*="MuiAccordionSummary-expandIconWrapper "]'),
51
- shadeTheCellLabel: () => cy.get('[class*="AdditionalGridFillSettingsstyles__LabelTextWrapper"]'),
52
70
  shadeCellButton: () => cy.get('.single-select-toggle-group button').eq(0),
53
71
  hideCellButton: () => cy.get('.single-select-toggle-group button').eq(1),
54
- shadedCellIcon: () => cy.get('[class*="GridFillResponsestyles__CellHideFillIconWrapper"] g[id*="Group"]'),
55
- hiddenCellIcon: () => cy.get('[class*="GridFillResponsestyles__CellHideFillIconWrapper"] #Hide_cell'),
56
- gridCustomizeLayoutSection: () => cy.get('.customize-layout-wrapper-cls [class*="GridFillResponsestyles__GridWrapper"]'),
57
72
  cellInCustomizeLayout: () => cy.get('[id*="Response-cell"]'),
58
73
  rowsWrapperCustomizeLayout: () => cy.get('.customize-layout-wrapper-cls [class*="GridFillResponsestyles__RowContainer"]'),
74
+ paginationTextCustomizeLayoutSection: () => cy.get('.customize-layout-wrapper-cls [class*="PaginationControlWrapper"] [class*="PaginationDetails"]'),
75
+ paginationButtonWrapperCustomizeLayout: () => cy.get('.customize-layout-wrapper-cls [class*="PaginationControlWrapper"]'),
76
+ previousPaginationButtonCustomizeLayout: () => cy.get('.customize-layout-wrapper-cls [class*="PaginationControl"]').eq(1),
77
+ nextPaginationButtonCustomizeLayout: () => cy.get('.customize-layout-wrapper-cls [class*="PaginationControl"]').eq(2),
59
78
  lockShadedCellsCheckbox: () => cy.get('[data-ngie-testid="lock-shaded-cells-checkbox"] input'),
60
79
  lockShadedCellsLabel: () => cy.get('[data-ngie-testid="lock-shaded-cells-checkbox"] [class*="label"]'),
61
80
  outlineCellOnHoverCheckbox: () => cy.get('[data-ngie-testid="outline-cell-on-hover-checkbox"] input'),
@@ -72,6 +91,89 @@ const selectors = {
72
91
  dottedToggleButton: () => cy.get('.single-select-toggle-group-double button').eq(5),
73
92
  outerGridBorderTitle: () => cy.get('[class*="CustomizedGridstyles__SwitchLabelWrapper"]'),
74
93
  outerGridBorderSwitch: () => cy.get('[class*="CustomizedGridstyles__OuterGridWrapper"] [class*="MuiSwitch-switchBase"]'),
94
+ penaltyPointsForEachIncorrectCellInputField: () => cy.get('input[aria-label="Penalty points for each incorrect cell"]'),
95
+ //student view settings
96
+ maxSelectedCellLabel: () => cy.get('[class*="MaxSelectedCellsstyles__MaxCellsLabel"]'),
97
+ maxSelectedCellInputField: () => cy.get('input[aria-label="Max selected cells"]'),
98
+ //Customize layout accordion
99
+ customizeLayoutAccordionButton: () => cy.get('.customize-layout-wrapper-cls .ngie-accordion-summary'),
100
+ customizeLayoutLabel: () => cy.get('[class*="AdditionalGridFillSettingsstyles__StyledLabel"]'),
101
+ customizeLayoutAccordionChevronButton: () => cy.get('.customize-layout-wrapper-cls [class*="MuiAccordionSummary-expandIconWrapper "]'),
102
+ shadeTheCellLabel: () => cy.get('[class*="AdditionalGridFillSettingsstyles__LabelTextWrapper"]'),
103
+ shadeCellButton: () => cy.get('.single-select-toggle-group button').eq(0),
104
+ hideCellButton: () => cy.get('.single-select-toggle-group button').eq(1),
105
+ shadedCellIcon: () => cy.get('[class*="GridFillResponsestyles__CellHideFillIconWrapper"] g[id*="Group"]'),
106
+ hiddenCellIcon: () => cy.get('[class*="GridFillResponsestyles__CellHideFillIconWrapper"] #Hide_cell'),
107
+ gridCustomizeLayoutSection: () => cy.get('.customize-layout-wrapper-cls [class*="GridFillResponsestyles__GridWrapper"]'),
108
+ cellInCustomizeLayout: () => cy.get('[id*="Response-cell"]'),
109
+ rowsWrapperCustomizeLayout: () => cy.get('.customize-layout-wrapper-cls [class*="GridFillResponsestyles__RowContainer"]'),
110
+ penaltyPointsForEachIncorrectCellInputField: () => cy.get('input[aria-label="Penalty points for each incorrect cell"]'),
111
+ //Fill type section
112
+ fillTypeLabel: () => cy.get('[class*="CustomizedGridstyles__LabelTextWrapper"]'),
113
+ colorBlock: () => cy.get('.color-picker-block'),
114
+ colorRadioButton: () => cy.get('[class*="RadioGroupstyles__RadioOptionWrapper"] .radio-btn').eq(0),
115
+ colorLabel: () => cy.get('[class*="RadioGroupstyles__RadioOptionWrapper"] label').eq(0),
116
+ imageRadioButton: () => cy.get('[class*="RadioGroupstyles__RadioOptionWrapper"] .radio-btn').eq(1),
117
+ imageLabel: () => cy.get('[class*="RadioGroupstyles__RadioOptionWrapper"] label').eq(1),
118
+ defaultLabel: () => cy.get('[class*=ColorStateComponentstyles__ColorStateLabel]').eq(0),
119
+ defaultGridColorWrapper: () => cy.get('[class*=ColorStateWrapper]').eq(0),
120
+ defaultFillColorLabel: () => cy.get('[class*="ColorTypeWrapper"]').eq(0),
121
+ defaultBorderColorLabel: () => cy.get('[class*="ColorTypeWrapper"]').eq(1),
122
+ defaultFillColorOpacityLabel: () => cy.get('[class*=ColorStateComponentstyles__OpacityLabel]').eq(0),
123
+ defaultBorderColorOpacityLabel: () => cy.get('[class*=ColorStateComponentstyles__OpacityLabel]').eq(1),
124
+ defaultFillColorHexCodeLabel: () => cy.get('[class*=ColorStateComponentstyles__HexColorLabel]').eq(0),
125
+ defaultBorderColorHexCodeLabel: () => cy.get('[class*=ColorStateComponentstyles__HexColorLabel]').eq(1),
126
+ defaultFillColorBlock: () => cy.get('.color-picker-block').eq(0),
127
+ defaultBorderColorBlock: () => cy.get('.color-picker-block').eq(1),
128
+ //Hover
129
+ hoverLabel: () => cy.get('[class*=ColorStateComponentstyles__ColorStateLabel]').eq(1),
130
+ hoverGridColorWrapper: () => cy.get('[class*=ColorStateWrapper]').eq(1),
131
+ hoverFillColorLabel: () => cy.get('[class*="ColorTypeWrapper"]').eq(2),
132
+ hoverBorderColorLabel: () => cy.get('[class*="ColorTypeWrapper"]').eq(3),
133
+ hoverFillColorOpacityLabel: () => cy.get('[class*=ColorStateComponentstyles__OpacityLabel]').eq(2),
134
+ hoverBorderColorOpacityLabel: () => cy.get('[class*=ColorStateComponentstyles__OpacityLabel]').eq(3),
135
+ hoverFillColorHexCodeLabel: () => cy.get('[class*=ColorStateComponentstyles__HexColorLabel]').eq(2),
136
+ hoverBorderColorHexCodeLabel: () => cy.get('[class*=ColorStateComponentstyles__HexColorLabel]').eq(3),
137
+ hoverFillColorBlock: () => cy.get('.color-picker-block').eq(2),
138
+ hoverBorderColorBlock: () => cy.get('.color-picker-block').eq(3),
139
+ //Active
140
+ filledLabel: () => cy.get('[class*=ColorStateComponentstyles__ColorStateLabel]').eq(2),
141
+ filledGridColorWrapper: () => cy.get('[class*=ColorStateWrapper]').eq(2),
142
+ filledFillColorLabel: () => cy.get('[class*="ColorTypeWrapper"]').eq(4),
143
+ filledBorderColorLabel: () => cy.get('[class*="ColorTypeWrapper"]').last(),
144
+ filledFillColorOpacityLabel: () => cy.get('[class*=ColorStateComponentstyles__OpacityLabel]').eq(4),
145
+ filledBorderColorOpacityLabel: () => cy.get('[class*=ColorStateComponentstyles__OpacityLabel]').last(),
146
+ filledFillColorHexCodeLabel: () => cy.get('[class*=ColorStateComponentstyles__HexColorLabel]').eq(4),
147
+ filledBorderColorHexCodeLabel: () => cy.get('[class*=ColorStateComponentstyles__HexColorLabel]').last(),
148
+ filledFillColorBlock: () => cy.get('.color-picker-block').eq(4),
149
+ filledBorderColorBlock: () => cy.get('.color-picker-block').last(),
150
+ applyPatternOnActiveStateLabel: () => cy.get('[data-ngie-testid="apply-pattern-on-active-state-checkbox"] [class*="label"]'),
151
+ applyPatternOnActiveStateCheckbox: () => cy.get('[data-ngie-testid="apply-pattern-on-active-state-checkbox"] input'),
152
+ //Color popup
153
+ setToNoColorButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(0),
154
+ cancelButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(1),
155
+ okButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(2),
156
+ //Filled image
157
+ filledImageLabel: () => cy.get('[class*="Background"][class*="LabelWrapper"]').eq(0),
158
+ filledImageUploadLabel: () => cy.get('[class*="__LabelWrapper"][class*="Upload"]').eq(0),
159
+ filledImageChooseFileButton: () => cy.get('.choose-file-button').eq(0),
160
+ filledImageFileNameLabel: () => cy.get('[class*="__LabelWrapper"][class*="Upload"]').eq(1),
161
+ filledImageNoFileChosenLabel: () => cy.get('[class*="UploadImagestyles__SelectedFile-"]').eq(0),
162
+ filledImageInputTypeFile: () => cy.get('input[type="file"]').eq(0),
163
+ filledImageUploadedFileNameLabel: () => cy.get('[class*="styles__SelectedFileWithIcon"][class*="Upload"]').eq(0),
164
+ filledImageAltTextLabel: () => cy.get('[class*="UploadImagestyles__InputWrapper"] .text-label').eq(0),
165
+ filledImageAltTextInputField: () => cy.get('[class*="UploadImagestyles__InputWrapper"] input').eq(0),
166
+ filledImageDeleteImageButton: () => cy.get('[aria-label*="Delete-button"]').eq(0),
167
+ //Background image - Image properties
168
+ imagePropertiesLabel: () => cy.get('[class*="UploadImagestyles__SectionLabel"]'),
169
+ fillImageToGridCheckboxLabel: () => cy.get('[data-ngie-testid="fill-image-to-grid-checkbox"] .MuiFormControlLabel-label'),
170
+ fillImageToGridCheckbox: () => cy.get('[data-ngie-testid="fill-image-to-grid-checkbox"] input'),
171
+ backgroundImageAlternativeTextLabel: () => cy.get('[class*="UploadImagestyles__InputWrapper"] .text-label').last(),
172
+ backgroundImageAlternativeTextInputField: () => cy.get('[class*="UploadImagestyles__InputWrapper"] input').last(),
173
+ //student view settings
174
+ maxSelectedCellLabel: () => cy.get('[class*="MaxSelectedCellsstyles__MaxCellsLabel"]'),
175
+ maxSelectedCellInputField: () => cy.get('input[aria-label="Max selected cells"]'),
176
+ penaltyPointsForEachIncorrectCellInputField: () => cy.get('input[aria-label="Penalty points for each incorrect cell"]'),
75
177
 
76
178
  //Fill type section
77
179
  fillTypeLabel: () => cy.get('[class*="CustomizedGridstyles__LabelTextWrapper"]'),
@@ -80,6 +182,10 @@ const selectors = {
80
182
  gridWrapperPreviewTab: () => cy.get('[class*="GridFillResponsestyles__GridWrapper"]:visible'),
81
183
  cellInPreviewTab: () => cy.get('[class*="GridFillResponsestyles__CellContainer"]:visible'),
82
184
  rowsWrapperPreviewTab: () => cy.get('[class*="GridFillResponsestyles__RowContainer"]:visible'),
185
+ paginationButtonWrapperPreviewTab: () => cy.get('[class*="PaginationControlWrapper"]'),
186
+ paginationTextPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationDetails"]'),
187
+ previousPaginationButtonPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(2),
188
+ nextPaginationButtonPreviewTab: () => cy.get(' [class*="PaginationControlWrapper"] [class*="PaginationControl"]').eq(3),
83
189
  canvasTitlePreviewTab: () => cy.get('[class*="GridFillResponsestyles__CanvasTitleWrapper"]'),
84
190
  warningMessageContainer: () => cy.get('.disabled-wrapper-cls'),
85
191
  warningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]'),
@@ -95,12 +201,15 @@ const steps = {
95
201
  ...autoScoredSpecifyCorrectAnswerSection.steps,
96
202
  ...dialogBoxBase.steps,
97
203
  ...autoScoredScoringSectionMultiResponseType.steps,
204
+ ...colorPopupComponent.steps,
98
205
  ...commonComponents.steps,
99
206
  ...additionalSettingsPanel.steps,
207
+ ...backgroundImageUploadComponent.steps,
208
+ ...imageCanvasComponent.steps,
100
209
 
101
210
  /**
102
- * @param {number} value value of columns
103
- * @description function enters value in columns input field
211
+ * @param {number} value The value to set in the columns input field.
212
+ * @description Sets the value in the columns input field.
104
213
  */
105
214
  setColumns: (value) => {
106
215
  gridFillPage.columnsInputField()
@@ -108,32 +217,42 @@ const steps = {
108
217
  .type('{selectall}')
109
218
  .type(value)
110
219
  .blur();
111
- gridFillPage.columnsInputField()
112
- .should('have.value', value);
113
220
  },
114
221
 
115
222
  /**
116
- * Verifies the value of the columns input field.
117
- * @param {number} value value of columns input field
223
+ * @param {number} value The expected value of the columns input field.
224
+ * @description Verifies the value of the columns input field.
118
225
  */
119
- verifyColumnsInputField: (value) => {
226
+ verifyColumnsInputStepperCountInputFieldValue: (value) => {
120
227
  gridFillPage.columnsInputField()
121
228
  .should('have.value', value);
122
229
  },
123
230
 
124
- decreaseColumnsCount: () => {
125
- gridFillPage.columnsDecreaseButton()
126
- .click();
231
+ /**
232
+ * @description Decreases the columns stepper count by a specified value.
233
+ * @param {number} count The value by which the columns stepper count is to be decreased.
234
+ */
235
+ decreaseColumnsInputStepperCount: (count) => {
236
+ for (let index = 0; index < count; index++) {
237
+ gridFillPage.columnsDecreaseButton()
238
+ .click();
239
+ };
127
240
  },
128
241
 
129
- increaseColumnsCount: () => {
130
- gridFillPage.columnsIncreaseButton()
131
- .click();
242
+ /**
243
+ * @description Increases the columns stepper count by a specified value.
244
+ * @param {number} count value by which the columns stepper count is to be increased.
245
+ */
246
+ increaseColumnsInputStepperCount: (count) => {
247
+ for (let index = 0; index < count; index++) {
248
+ gridFillPage.columnsIncreaseButton()
249
+ .click();
250
+ };
132
251
  },
133
252
 
134
253
  /**
135
- * @param {number} value value of rows
136
- * @description function enters value in rows input field
254
+ * @param {number} value The value to set in the rows input field.
255
+ * @description Sets the value in the rows input field.
137
256
  */
138
257
  setRows: (value) => {
139
258
  gridFillPage.rowsInputField()
@@ -141,27 +260,64 @@ const steps = {
141
260
  .type('{selectall}')
142
261
  .type(value)
143
262
  .blur();
144
- gridFillPage.rowsInputField()
145
- .should('have.value', value);
146
263
  },
147
264
 
148
265
  /**
149
- * Verifies the value of the rows input field.
150
- * @param {number} value value of rows input field
266
+ * @param {number} value The expected value of the rows input field.
267
+ * @description Verifies the value of the rows input field.
151
268
  */
152
- verifyRowsInputField: (value) => {
269
+ verifyRowsInputStepperCountInputFieldValue: (value) => {
153
270
  gridFillPage.rowsInputField()
154
271
  .should('have.value', value);
155
272
  },
156
273
 
157
- decreaseRowsCount: () => {
158
- gridFillPage.rowsDecreaseButton()
159
- .click();
274
+ /**
275
+ * @description Decreases the rows stepper count by a specified value.
276
+ * @param {number} count The value by which the rows stepper count is to be decreased.
277
+ */
278
+ decreaseRowsInputStepperCount: (count) => {
279
+ for (let index = 0; index < count; index++) {
280
+ gridFillPage.rowsDecreaseButton()
281
+ .click();
282
+ };
160
283
  },
161
284
 
162
- increaseRowsCount: () => {
163
- gridFillPage.rowsIncreaseButton()
164
- .click();
285
+ /**
286
+ * @description Increases the rows stepper count by a specified value.
287
+ * @param {number} count The value by which the rows stepper count is to be increased.
288
+ */
289
+ increaseRowsInputStepperCount: (count) => {
290
+ for (let index = 0; index < count; index++) {
291
+ gridFillPage.rowsIncreaseButton()
292
+ .click();
293
+ };
294
+ },
295
+
296
+ verifyColumnInputStepperIncreaseDecreaseButton: () => {
297
+ utilities.verifyElementVisibilityState(gridFillPage.columnsDecreaseButton(), 'visible');
298
+ utilities.verifyElementVisibilityState(gridFillPage.columnsIncreaseButton(), 'visible');
299
+
300
+ },
301
+
302
+ verifyRowInputStepperIncreaseDecreaseButton: () => {
303
+ utilities.verifyElementVisibilityState(gridFillPage.rowsIncreaseButton(), 'visible');
304
+ utilities.verifyElementVisibilityState(gridFillPage.rowsDecreaseButton(), 'visible');
305
+ },
306
+
307
+ verifyRowInputStepperIncreaseButtonIsDisabled: () => {
308
+ utilities.verifyElementDisabled(gridFillPage.rowsIncreaseButton());
309
+ },
310
+
311
+ verifyRowInputStepperDecreaseButtonIsDisabled: () => {
312
+ utilities.verifyElementDisabled(gridFillPage.rowsDecreaseButton());
313
+ },
314
+
315
+ verifyColumnInputStepperIncreaseButtonIsDisabled: () => {
316
+ utilities.verifyElementDisabled(gridFillPage.columnsIncreaseButton());
317
+ },
318
+
319
+ verifyColumnInputStepperDecreaseButtonIsDisabled: () => {
320
+ utilities.verifyElementDisabled(gridFillPage.columnsDecreaseButton());
165
321
  },
166
322
 
167
323
  clickOnCustomizeLayoutAccordionButton: () => {
@@ -745,6 +901,176 @@ const steps = {
745
901
  });
746
902
  },
747
903
 
904
+ expandOpenTheGridSelectorDropdown: () => {
905
+ gridFillPage.openTheGridSelectorDropdownButton()
906
+ .click()
907
+ .should('have.attr', 'aria-expanded', 'true');
908
+ },
909
+
910
+ collapseOpenTheGridSelectorDropdown: () => {
911
+ gridFillPage.openTheGridSelectorDropdownButton()
912
+ .click()
913
+ .should('have.attr', 'aria-expanded', 'false');
914
+ },
915
+
916
+ verifyOpenTheGridSelectorDropdownCollapsed: () => {
917
+ gridFillPage.openTheGridSelectorDropdownButton()
918
+ .should('have.attr', 'aria-expanded', 'false');
919
+ },
920
+
921
+ /**
922
+ * Verifies the grid size in the grid layout section using aria-label.
923
+ * @param {number} rowsNumber - The expected number of rows.
924
+ * @param {number} columns - The expected number of columns.
925
+ */
926
+ verifyGridSizeInGridLayoutSection: (rowsNumber, columns) => {
927
+ let maxRow = 0;
928
+ let maxCol = 0;
929
+ gridFillPage.cellInOpenTheGridSelectorAccordion()
930
+ .last()
931
+ .invoke('attr', 'aria-label').then(ariaLabel => {
932
+ const [row, col] = ariaLabel.match(/\d+/g).map(Number);
933
+ maxRow = row;
934
+ maxCol = col;
935
+ expect(maxRow).to.equal(rowsNumber);
936
+ expect(maxCol).to.equal(columns);
937
+ });
938
+ },
939
+
940
+ /**
941
+ * Verifies the selection state of cells in the grid.
942
+ * @param {number} expectedRow - The number of rows to verify.
943
+ * @param {number} expectedColumn - The number of columns to verify.
944
+ */
945
+ verifySelectedRowsAndColumns: (expectedRow, expectedColumn) => {
946
+ for (let i = 0; i < expectedRow; i++) {
947
+ for (let j = 0; j < expectedColumn; j++) {
948
+ cy.get(`.add-rows-cols-grid-container [id*="cell-${i}-${j}"]`)
949
+ .invoke('attr', 'aria-label')
950
+ .should('include', 'selected');
951
+ cy.get(`.add-rows-cols-grid-container [id*="cell-${i}-${j}"]`)
952
+ .should('have.class', 'cell-container');
953
+ }
954
+ }
955
+ if (expectedRow < 20 && expectedColumn < 20) {
956
+ cy.get(`.add-rows-cols-grid-container [id*="cell-${expectedRow}-${expectedColumn}"]`)
957
+ .invoke('attr', 'aria-label')
958
+ .should('include', 'not selected');
959
+ }
960
+ },
961
+
962
+ /**
963
+ * Verifies the selection state of a cell in the interactive grid.
964
+ * @param {number} rowIndex - The index of the row of the cell to verify.
965
+ * @param {number} columnIndex - The index of the column of the cell to verify.
966
+ */
967
+ verifySelectedRowsAndColumnsInInteractiveState: (rowIndex, columnIndex) => {
968
+ gridFillPage.cellInOpenTheGridSelectorAccordion()
969
+ .filter(`[aria-label*="Row${rowIndex} Column${columnIndex}"]`)
970
+ .trigger('mouseover');
971
+ if (rowIndex !== null && columnIndex !== null) {
972
+ gridFillPage.cellInOpenTheGridSelectorAccordion()
973
+ .filter(`[aria-label*="Row${rowIndex} Column${columnIndex}"]`)
974
+ .should('have.class', 'cell-container')
975
+ .should('have.css', 'background-color', css.color.toggleButtonSelectedBg)
976
+ }
977
+ gridFillPage.cellInOpenTheGridSelectorAccordion()
978
+ .filter(`[aria-label*="Row${rowIndex} Column${columnIndex}"]`)
979
+ .trigger('mouseout');
980
+ },
981
+
982
+ /**
983
+ * Clicks on a cell in the open grid selector dropdown.
984
+ * @param {number} rowIndex - The index of the row of the cell to click on.
985
+ * @param {number} columnIndex - The index of the column of the cell to click on.
986
+ */
987
+ clickOnCellInOpenTheGridSelectorDropdown: (rowIndex, columnIndex) => {
988
+ gridFillPage.cellInOpenTheGridSelectorAccordion()
989
+ .filter(`[aria-label*="Row${rowIndex} Column${columnIndex}"]`)
990
+ .click();
991
+ },
992
+
993
+ /**
994
+ * Verifies the height property in the cell height input field.
995
+ * @param {number} height The expected height value.
996
+ */
997
+ verifyCellHeightInputField: (height) => {
998
+ gridFillPage.cellHeightInputField()
999
+ .should('have.value', height);
1000
+ },
1001
+
1002
+ /**
1003
+ * Updates the value in the cell height input field.
1004
+ * @param {number} height The new height value to be entered.
1005
+ */
1006
+ updateValueInCellHeightInputField: (height) => {
1007
+ gridFillPage.cellHeightInputField()
1008
+ .clear()
1009
+ .type(height)
1010
+ .blur();
1011
+ },
1012
+
1013
+ /**
1014
+ * Updates the value in the cell width input field.
1015
+ * @param {number} width The new width value to be entered.
1016
+ */
1017
+ updateValueInCellWidthInputField: (width) => {
1018
+ gridFillPage.cellWidthInputField()
1019
+ .clear()
1020
+ .type(width)
1021
+ .blur();
1022
+ },
1023
+
1024
+ /**
1025
+ * Verifies the width property in the cell width input field.
1026
+ * @param {number} width The expected width value.
1027
+ */
1028
+ verifyCellWidthInputField: (width) => {
1029
+ gridFillPage.cellWidthInputField()
1030
+ .should('have.value', width);
1031
+ },
1032
+
1033
+ verifyMakeResponsiveCheckboxChecked: () => {
1034
+ gridFillPage.makeResponsiveCheckboxIcon()
1035
+ .should('have.class', 'icon-ILC-tick-icon');
1036
+ },
1037
+
1038
+ verifyMakeResponsiveCheckboxUnchecked: () => {
1039
+ gridFillPage.makeResponsiveCheckboxIcon()
1040
+ .should('have.class', 'icon-x-circle');
1041
+ },
1042
+
1043
+ checkMakeResponsiveCheckbox: () => {
1044
+ gridFillPage.makeResponsiveCheckboxIcon()
1045
+ .click();
1046
+ steps.verifyMakeResponsiveCheckboxChecked();
1047
+ },
1048
+
1049
+ uncheckMakeResponsiveCheckbox: () => {
1050
+ gridFillPage.makeResponsiveCheckboxIcon()
1051
+ .click({ force: true });
1052
+ steps.verifyMakeResponsiveCheckboxUnchecked();
1053
+ },
1054
+
1055
+ /**
1056
+ * Verifies the count of rows in the Customize Layout section
1057
+ * @param {number} lengthRows The expected count of rows.
1058
+ */
1059
+ verifyRowsCountCustomizeLayout: (lengthRows) => {
1060
+ utilities.verifyElementCount(gridFillPage.rowsWrapperCustomizeLayout(), lengthRows);
1061
+ },
1062
+
1063
+ /**
1064
+ * Verifies the count of columns in a row in the Customize Layout section.
1065
+ * @param {number} columnsLength The expected count of cells in the row.
1066
+ */
1067
+ verifyColumnsCountCustomizeLayout: (lengthColumns) => {
1068
+ utilities.getNthElement(gridFillPage.rowsWrapperCustomizeLayout(), 0)
1069
+ .within(() => {
1070
+ utilities.verifyElementCount(gridFillPage.cellInEditTab(), lengthColumns);
1071
+ });
1072
+ },
1073
+
748
1074
  verifyOutlineCellOnHoverCheckboxIsChecked: () => {
749
1075
  gridFillPage.outlineCellOnHoverCheckbox()
750
1076
  .should('be.checked');
@@ -797,6 +1123,25 @@ const steps = {
797
1123
  },
798
1124
 
799
1125
  /**
1126
+ * Verifies the count of rows in the Specify Correct Answer section.
1127
+ * @param {number} lengthRows The expected count of rows.
1128
+ */
1129
+ verifyRowsCountSpecifyCorrectAnswer: (lengthRows) => {
1130
+ utilities.verifyElementCount(gridFillPage.rowsWrapperSpecifyCorrectAnswerSection(), lengthRows);
1131
+ },
1132
+
1133
+ /**
1134
+ * Verifies the count of columns in a row in the Specify Correct Answer section.
1135
+ * @param {number} columnsLength The expected count of cells in the row.
1136
+ */
1137
+ verifyColumnsCountSpecifyCorrectAnswer: (lengthColumns) => {
1138
+ utilities.getNthElement(gridFillPage.rowsWrapperSpecifyCorrectAnswerSection(), 0)
1139
+ .within(() => {
1140
+ utilities.verifyElementCount(gridFillPage.cellInEditTab(), lengthColumns);
1141
+ });
1142
+ },
1143
+
1144
+ /**
800
1145
  * @description Verifies that cell does not show interactive state when hovered on in specify correct answer section
801
1146
  * @param {number} rowIndex - The index of the row to verify.
802
1147
  * @param {number} columnIndex - Index of column on the cell
@@ -814,6 +1159,117 @@ const steps = {
814
1159
  },
815
1160
 
816
1161
  /**
1162
+ * Verifies the height of the cell in the Customize Layout section.
1163
+ * @param {number} height The expected height of the cell.
1164
+ */
1165
+ verifyCellHeightInCustomizeLayoutSection: (height) => {
1166
+ utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), 0)
1167
+ .should('have.attr', 'height', height);
1168
+ },
1169
+
1170
+ /**
1171
+ * Verifies the width of the cell in the Customize Layout section.
1172
+ * @param {number} width The expected width of the cell.
1173
+ */
1174
+ verifyCellWidthInCustomizeLayoutSection: (width) => {
1175
+ utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), 0)
1176
+ .should('have.attr', 'width', width);
1177
+ },
1178
+
1179
+ /**
1180
+ * Verifies the height of the cell in the Specify Correct Answer section.
1181
+ * @param {number} height The expected height of the cell.
1182
+ */
1183
+ verifyCellHeightInSpecifyCorrectAnswerSection: (height) => {
1184
+ utilities.getNthElement(gridFillPage.cellInSpecifyCorrectAnswerSection(), 0)
1185
+ .should('have.attr', 'height', height);
1186
+ },
1187
+
1188
+ /**
1189
+ * Verifies the width of the cell in the Specify Correct Answer section.
1190
+ * @param {number} width The expected width of the cell.
1191
+ */
1192
+ verifyCellWidthInSpecifyCorrectAnswerSection: (width) => {
1193
+ utilities.getNthElement(gridFillPage.cellInSpecifyCorrectAnswerSection(), 0)
1194
+ .should('have.attr', 'width', width);
1195
+ },
1196
+
1197
+ /**
1198
+ * Verifies the height of the cell in the Preview tab.
1199
+ * @param {number} height The expected height of the cell.
1200
+ */
1201
+ verifyCellHeightInPreviewTab: (height) => {
1202
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), 0)
1203
+ .should('have.attr', 'height', height);
1204
+ },
1205
+
1206
+ /**
1207
+ * Verifies the width of the cell in the preview tab
1208
+ * @param {number} width The expected width of the cell.
1209
+ */
1210
+ verifyCellWidthInPreviewTab: (width) => {
1211
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), 0)
1212
+ .should('have.attr', 'width', width);
1213
+ },
1214
+
1215
+ verifyPaginationButtonsNotExistCustomizeLayoutSection: () => {
1216
+ utilities.verifyElementVisibilityState(gridFillPage.paginationButtonWrapperCustomizeLayout(), 'notExist');
1217
+ },
1218
+
1219
+ verifyPaginationButtonsVisibleCustomizeLayoutSection: () => {
1220
+ utilities.verifyElementVisibilityState(gridFillPage.previousPaginationButtonCustomizeLayout(), 'visible');
1221
+ utilities.verifyElementVisibilityState(gridFillPage.nextPaginationButtonCustomizeLayout(), 'visible');
1222
+ },
1223
+
1224
+ verifyPaginationButtonsNotExistSpecifyCorrectAnswerSection: () => {
1225
+ utilities.verifyElementVisibilityState(gridFillPage.paginationButtonWrapperSpecifyCorrectAnswerSection(), 'notExist');
1226
+ },
1227
+
1228
+ verifyPaginationButtonsVisibleSpecifyCorrectAnswerSection: () => {
1229
+ utilities.verifyElementVisibilityState(gridFillPage.previousPaginationButtonSpecifyCorrectAnswerSection(), 'visible');
1230
+ utilities.verifyElementVisibilityState(gridFillPage.nextPaginationButtonSpecifyCorrectAnswerSection(), 'visible');
1231
+ },
1232
+
1233
+ navigateToPreviousPageCustomizeLayoutSection: () => {
1234
+ gridFillPage.previousPaginationButtonCustomizeLayout()
1235
+ .click();
1236
+ },
1237
+
1238
+ navigateToNextPageCustomizeLayoutSection: () => {
1239
+ gridFillPage.nextPaginationButtonCustomizeLayout()
1240
+ .click();
1241
+ },
1242
+
1243
+ navigateToPreviousPageSpecifyCorrectAnswerSection: () => {
1244
+ gridFillPage.previousPaginationButtonSpecifyCorrectAnswerSection()
1245
+ .click();
1246
+ },
1247
+
1248
+ navigateToNextPageSpecifyCorrectAnswerSection: () => {
1249
+ gridFillPage.nextPaginationButtonSpecifyCorrectAnswerSection()
1250
+ .click();
1251
+ },
1252
+
1253
+ navigateToPreviousPagePreviewTab: () => {
1254
+ gridFillPage.previousPaginationButtonPreviewTab()
1255
+ .click();
1256
+ },
1257
+
1258
+ navigateToNextPagePreviewTab: () => {
1259
+ gridFillPage.nextPaginationButtonPreviewTab()
1260
+ .click();
1261
+ },
1262
+
1263
+ verifyPaginationButtonsNotExistPreviewTab: () => {
1264
+ utilities.verifyElementVisibilityState(gridFillPage.paginationButtonWrapperPreviewTab(), 'notExist');
1265
+ },
1266
+
1267
+ verifyPaginationButtonsVisiblePreviewTab: () => {
1268
+ utilities.verifyElementVisibilityState(gridFillPage.previousPaginationButtonPreviewTab(), 'visible');
1269
+ utilities.verifyElementVisibilityState(gridFillPage.nextPaginationButtonPreviewTab(), 'visible');
1270
+ },
1271
+
1272
+ /**
817
1273
  * @description Verifies that cell does not show interactive state when hovered on in preview tab
818
1274
  * @param {number} rowIndex - The index of the row to verify.
819
1275
  * @param {number} columnIndex - Index of column on the cell
@@ -883,7 +1339,7 @@ const steps = {
883
1339
 
884
1340
  /**
885
1341
  * @description Add input to canvas title input field
886
- * @param {string} titleText Text to be given as input in canvas title input field
1342
+ * @param {string} titleText Text to be given as input in canvas title input field
887
1343
  */
888
1344
  addInputToCanvasTitleInputField: (titleText) => {
889
1345
  gridFillPage.canvasTitleInputField()
@@ -1216,70 +1672,637 @@ const steps = {
1216
1672
  });
1217
1673
  });
1218
1674
  },
1219
-
1220
- /**
1221
- * @description verify the displayed penalty points for each incorrect cell
1222
- * @param {number} penaltyPoints displayed penalty points
1223
- */
1224
- verifyPenaltyPointsForEachIncorrectCell: (penaltyPoints) => {
1225
- utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.penaltyPointsDetailsSectionAllottedPointsLabel(), `Penalty points for each incorrect cell: ${penaltyPoints}`);
1675
+
1676
+ verifyColorRadioButtonIsSelected: () => {
1677
+ gridFillPage.colorRadioButton()
1678
+ .should('have.class', 'Mui-checked');
1226
1679
  },
1227
1680
 
1228
- /**
1229
- * @description Verifies the penalty points value for each incorrect cell
1230
- * @param {number} points - The expected penalty points value for each incorrect cell
1231
- */
1232
- verifyPenaltyPointsForEachIncorrectCellValue: (points) => {
1233
- gridFillPage.penaltyPointsForEachIncorrectCellInputField()
1234
- .should('have.value', points);
1681
+ verifyApplyPatternOnActiveStateCheckboxIsNotChecked: () => {
1682
+ gridFillPage.applyPatternOnActiveStateCheckbox()
1683
+ .should('not.be.checked');
1235
1684
  },
1236
1685
 
1237
- /**
1238
- * @description Allots penalty points for each incorrect text container
1239
- * @param {number} points - The penalty points to be allotted for each text container.
1240
- selectPenaltyPointsForEachIncorrectCell: () => {
1241
- gridFillPage.specifyPointsForEachIncorrectCellRadioButton()
1242
- .click();
1686
+ uncheckApplyPatternOnActiveStateCheckbox: () => {
1687
+ gridFillPage.applyPatternOnActiveStateCheckbox()
1688
+ .click()
1689
+ .should('not.be.checked');
1690
+ },
1691
+
1692
+ checkApplyPatternOnActiveStateCheckbox: () => {
1693
+ gridFillPage.applyPatternOnActiveStateCheckbox()
1694
+ .click()
1695
+ .should('be.checked');
1243
1696
  },
1244
1697
 
1245
1698
  /**
1246
- * @description Allots penalty points for each incorrect cell
1247
- * @param {number} points - The penalty points to be allotted for each cell.
1699
+ * @param {string} color background color of color block
1700
+ * @description this function verfies the background color of default fill color block
1248
1701
  */
1249
- allotPenaltyPointsForEachIncorrectCell: (points) => {
1250
- gridFillPage.penaltyPointsForEachIncorrectCellInputField()
1251
- .clear()
1252
- .type(`${points}`)
1253
- .should('have.value', points)
1254
- .blur();
1702
+ verifyDefaultFillColorBlockColor: (color) => {
1703
+ gridFillPage.defaultFillColorBlock()
1704
+ .should('have.css', 'background-color', color);
1255
1705
  },
1256
1706
 
1257
1707
  /**
1258
- * Enters value into the input field for maximum cells selected.
1259
- * @param {number} value- The value to be entered into the input field.
1708
+ * @param {string} color background color of color block
1709
+ * @description this function verfies the background color of default border color block
1260
1710
  */
1261
- enterTextInMaxSelectedCellInputField: (value) => {
1262
- gridFillPage.maxSelectedCellInputField()
1263
- .clear()
1264
- .type(value)
1265
- .blur();
1711
+ verifyDefaultBorderColorBlockColor: (color) => {
1712
+ gridFillPage.defaultBorderColorBlock()
1713
+ .should('have.css', 'background-color', color);
1266
1714
  },
1267
1715
 
1268
1716
  /**
1269
- * Enters value into the input field for maximum cells selected.
1270
- * @param {number} value- The value to be entered into the input field.
1271
- */
1272
- VerifyTextInMaxSelectedCellInputField: (value) => {
1273
- gridFillPage.maxSelectedCellInputField()
1274
- .should('have.value', value);
1717
+ * @param {string} color background color of color block
1718
+ * @description this function verfies the background color of fill color block
1719
+ */
1720
+ verifyFilledFillColorBlockColor: (color) => {
1721
+ gridFillPage.filledFillColorBlock()
1722
+ .should('have.css', 'background-color', color);
1275
1723
  },
1276
1724
 
1277
1725
  /**
1278
- * Verifies if the count of selected cells in the preview tab matches the expected value.
1279
- * @param {number} expectedValue - The expected count of selected cells.
1726
+ * @param {string} color background color of color block
1727
+ * @description this function verfies the background color of border color block
1280
1728
  */
1281
- verifySelectedCellCountPreviewTab: (expectedValue) => {
1282
- let count = 0;
1729
+ verifyFilledBorderColorBlockColor: (color) => {
1730
+ gridFillPage.filledBorderColorBlock()
1731
+ .should('have.css', 'background-color', color);
1732
+ },
1733
+
1734
+ /**
1735
+ * @param {string} color background color of color block
1736
+ * @description this function verfies the background color of hover fill color block
1737
+ */
1738
+ verifyHoverFillColorBlockColor: (color) => {
1739
+ gridFillPage.hoverFillColorBlock()
1740
+ .should('have.css', 'background-color', color);
1741
+ },
1742
+
1743
+ /**
1744
+ * @param {string} color background color of color block
1745
+ * @description this function verfies the background color of hover border color block
1746
+ */
1747
+ verifyHoverBorderColorBlockColor: (color) => {
1748
+ gridFillPage.hoverBorderColorBlock()
1749
+ .should('have.css', 'background-color', color);
1750
+ },
1751
+
1752
+ verifyPatternAppliedOnFilledState: () => {
1753
+ utilities.verifyElementVisibilityState(gridFillPage.filledFillColorBlock().find('svg'), 'visible');
1754
+ },
1755
+
1756
+ verifyPatternNotAppliedOnFilledState: () => {
1757
+ utilities.verifyElementVisibilityState(gridFillPage.filledFillColorBlock().find('svg'), 'notExist');
1758
+ },
1759
+
1760
+ verifyFillColorDefaultContentCSS: () => {
1761
+ utilities.verifyCSS(gridFillPage.defaultLabel(), {
1762
+ 'color': css.color.labels,
1763
+ 'font-size': css.fontSize.normal,
1764
+ 'font-weight': css.fontWeight.semibold
1765
+ });
1766
+ const colorLabels = [gridFillPage.defaultFillColorLabel, gridFillPage.defaultBorderColorLabel]
1767
+ for (let index = 0; index < colorLabels.length; index++) {
1768
+ utilities.verifyCSS(colorLabels[index](), {
1769
+ 'color': css.color.labels,
1770
+ 'font-size': css.fontSize.normal,
1771
+ 'font-weight': css.fontWeight.regular
1772
+ });
1773
+ };
1774
+ const hexCodeLabels = [gridFillPage.defaultFillColorHexCodeLabel, gridFillPage.defaultBorderColorHexCodeLabel]
1775
+ for (let index = 0; index < hexCodeLabels.length; index++) {
1776
+ utilities.verifyCSS(hexCodeLabels[index](), {
1777
+ 'color': css.color.placeholderText,
1778
+ 'font-size': css.fontSize.small,
1779
+ 'font-weight': css.fontWeight.semibold
1780
+ });
1781
+ };
1782
+ const opacityLabels = [gridFillPage.defaultFillColorOpacityLabel, gridFillPage.defaultBorderColorOpacityLabel]
1783
+ for (let index = 0; index < opacityLabels.length; index++) {
1784
+ utilities.verifyCSS(opacityLabels[index](), {
1785
+ 'color': css.color.placeholderText,
1786
+ 'font-size': css.fontSize.small,
1787
+ 'font-weight': css.fontWeight.regular
1788
+ });
1789
+ };
1790
+ },
1791
+
1792
+ verifyFillColorHoverContentCSS: () => {
1793
+ utilities.verifyCSS(gridFillPage.hoverLabel(), {
1794
+ 'color': css.color.labels,
1795
+ 'font-size': css.fontSize.normal,
1796
+ 'font-weight': css.fontWeight.semibold
1797
+ });
1798
+ const colorLabels = [gridFillPage.hoverFillColorLabel, gridFillPage.hoverBorderColorLabel]
1799
+ for (let index = 0; index < colorLabels.length; index++) {
1800
+ utilities.verifyCSS(colorLabels[index](), {
1801
+ 'color': css.color.labels,
1802
+ 'font-size': css.fontSize.normal,
1803
+ 'font-weight': css.fontWeight.regular
1804
+ });
1805
+ };
1806
+ const hexCodeLabels = [gridFillPage.hoverFillColorHexCodeLabel, gridFillPage.hoverBorderColorHexCodeLabel]
1807
+ for (let index = 0; index < hexCodeLabels.length; index++) {
1808
+ utilities.verifyCSS(hexCodeLabels[index](), {
1809
+ 'color': css.color.placeholderText,
1810
+ 'font-size': css.fontSize.small,
1811
+ 'font-weight': css.fontWeight.semibold
1812
+ });
1813
+ };
1814
+ const opacityLabels = [gridFillPage.hoverFillColorOpacityLabel, gridFillPage.hoverBorderColorOpacityLabel]
1815
+ for (let index = 0; index < opacityLabels.length; index++) {
1816
+ utilities.verifyCSS(opacityLabels[index](), {
1817
+ 'color': css.color.placeholderText,
1818
+ 'font-size': css.fontSize.small,
1819
+ 'font-weight': css.fontWeight.regular
1820
+ });
1821
+ };
1822
+ },
1823
+
1824
+ verifyFillColorFilledContentCSS: () => {
1825
+ utilities.verifyCSS(gridFillPage.filledLabel(), {
1826
+ 'color': css.color.labels,
1827
+ 'font-size': css.fontSize.normal,
1828
+ 'font-weight': css.fontWeight.semibold
1829
+ });
1830
+ const colorLabels = [gridFillPage.filledFillColorLabel, gridFillPage.filledBorderColorLabel]
1831
+ for (let index = 0; index < colorLabels.length; index++) {
1832
+ utilities.verifyCSS(colorLabels[index](), {
1833
+ 'color': css.color.labels,
1834
+ 'font-size': css.fontSize.normal,
1835
+ 'font-weight': css.fontWeight.regular
1836
+ });
1837
+ };
1838
+ const hexCodeLabels = [gridFillPage.filledFillColorHexCodeLabel, gridFillPage.filledBorderColorHexCodeLabel]
1839
+ for (let index = 0; index < hexCodeLabels.length; index++) {
1840
+ utilities.verifyCSS(hexCodeLabels[index](), {
1841
+ 'color': css.color.placeholderText,
1842
+ 'font-size': css.fontSize.small,
1843
+ 'font-weight': css.fontWeight.semibold
1844
+ });
1845
+ };
1846
+ const opacityLabels = [gridFillPage.filledFillColorOpacityLabel, gridFillPage.filledFillColorOpacityLabel]
1847
+ for (let index = 0; index < opacityLabels.length; index++) {
1848
+ utilities.verifyCSS(opacityLabels[index](), {
1849
+ 'color': css.color.placeholderText,
1850
+ 'font-size': css.fontSize.small,
1851
+ 'font-weight': css.fontWeight.regular
1852
+ });
1853
+ };
1854
+ },
1855
+
1856
+ /**
1857
+ * @param {string} fillColorBlock 'defaultFillColor' | 'defaultBorderColor' | 'hoverFillColor' | 'hoverBorderColor' | 'filledFillColor' | 'filledBorderColor'
1858
+ * @description this function clicks on the fill color block
1859
+ */
1860
+ clickOnFillColorBlock: (fillColorBlock) => {
1861
+ switch (fillColorBlock) {
1862
+ case 'defaultFillColor':
1863
+ gridFillPage.defaultFillColorBlock()
1864
+ .click();
1865
+ break;
1866
+ case 'defaultBorderColor':
1867
+ gridFillPage.defaultBorderColorBlock()
1868
+ .click();
1869
+ break;
1870
+ case 'hoverFillColor':
1871
+ gridFillPage.hoverFillColorBlock()
1872
+ .click();
1873
+ break;
1874
+ case 'hoverBorderColor':
1875
+ gridFillPage.hoverBorderColorBlock()
1876
+ .click();
1877
+ break;
1878
+ case 'filledFillColor':
1879
+ gridFillPage.filledFillColorBlock()
1880
+ .click();
1881
+ break;
1882
+ case 'filledBorderColor':
1883
+ gridFillPage.filledBorderColorBlock()
1884
+ .click();
1885
+ break;
1886
+ default:
1887
+ throw new Error('Invalid color block');
1888
+ }
1889
+ },
1890
+
1891
+ /**
1892
+ * @param {string} hexCode hexcode label of color block
1893
+ * @description this function verfies the hexcode label of default fill color block
1894
+ */
1895
+ verifyDefaultFillColorHexCodeLabel: (hexCode) => {
1896
+ utilities.verifyInnerText(gridFillPage.defaultFillColorHexCodeLabel(), hexCode)
1897
+ },
1898
+
1899
+ /**
1900
+ * @param {string} opacityLabel opacity label of color block
1901
+ * @description this function verfies the opacity label of default fill color block
1902
+ */
1903
+ verifyDefaultFillColorOpacityLabel: (opacityLabel) => {
1904
+ utilities.verifyInnerText(gridFillPage.defaultFillColorOpacityLabel(), opacityLabel)
1905
+ },
1906
+
1907
+ /**
1908
+ * @param {string} hexCode hexcode label of color block
1909
+ * @description this function verfies the hexcode label of default border color block
1910
+ */
1911
+ verifyDefaultBorderColorHexCodeLabel: (hexCode) => {
1912
+ utilities.verifyInnerText(gridFillPage.defaultBorderColorHexCodeLabel(), hexCode)
1913
+ },
1914
+
1915
+ /**
1916
+ * @param {string} opacityLabel opacity label of color block
1917
+ * @description this function verfies the opacity label of default border color block
1918
+ */
1919
+ verifyDefaultBorderColorOpacityLabel: (opacityLabel) => {
1920
+ utilities.verifyInnerText(gridFillPage.defaultBorderColorOpacityLabel(), opacityLabel)
1921
+ },
1922
+
1923
+ /**
1924
+ * @param {string} hexCode hexcode label of color block
1925
+ * @description this function verfies the hexcode label of hover fill color block
1926
+ */
1927
+ verifyHoverFillColorHexCodeLabel: (hexCode) => {
1928
+ utilities.verifyInnerText(gridFillPage.hoverFillColorHexCodeLabel(), hexCode)
1929
+ },
1930
+
1931
+ /**
1932
+ * @param {string} opacityLabel opacity label of color block
1933
+ * @description this function verfies the opacity label of hover fill color block
1934
+ */
1935
+ verifyHoverFillColorOpacityLabel: (opacityLabel) => {
1936
+ utilities.verifyInnerText(gridFillPage.hoverFillColorOpacityLabel(), opacityLabel)
1937
+ },
1938
+
1939
+ /**
1940
+ * @param {string} hexCode hexcode label of color block
1941
+ * @description this function verfies the hexcode label of hover border color block
1942
+ */
1943
+ verifyHoverBorderColorHexCodeLabel: (hexCode) => {
1944
+ utilities.verifyInnerText(gridFillPage.hoverBorderColorHexCodeLabel(), hexCode)
1945
+ },
1946
+
1947
+ /**
1948
+ * @param {string} opacityLabel opacity label of color block
1949
+ * @description this function verfies the opacity label of hover border color block
1950
+ */
1951
+ verifyHoverBorderColorOpacityLabel: (opacityLabel) => {
1952
+ utilities.verifyInnerText(gridFillPage.hoverBorderColorOpacityLabel(), opacityLabel)
1953
+ },
1954
+
1955
+ /**
1956
+ * @param {string} color background color of color block
1957
+ * @description this function verfies the background color of filled fill color block
1958
+ */
1959
+ verifyFilledFillColorBlockColor: (color) => {
1960
+ gridFillPage.filledFillColorBlock()
1961
+ .should('have.css', 'background-color', color);
1962
+ },
1963
+
1964
+ /**
1965
+ * @param {string} hexCode hexcode label of color block
1966
+ * @description this function verfies the hexcode label of filled fill color block
1967
+ */
1968
+ verifyFilledFillColorHexCodeLabel: (hexCode) => {
1969
+ utilities.verifyInnerText(gridFillPage.filledFillColorHexCodeLabel(), hexCode)
1970
+ },
1971
+
1972
+ /**
1973
+ * @param {string} opacityLabel opacity label of color block
1974
+ * @description this function verfies the opacity label of active fill color block
1975
+ */
1976
+ verifyFilledFillColorOpacityLabel: (opacityLabel) => {
1977
+ utilities.verifyInnerText(gridFillPage.filledFillColorOpacityLabel(), opacityLabel)
1978
+ },
1979
+
1980
+ /**
1981
+ * @param {string} color background color of color block
1982
+ * @description this function verfies the background color of filled border color block
1983
+ */
1984
+ verifyFilledBorderColorBlockColor: (color) => {
1985
+ gridFillPage.filledBorderColorBlock()
1986
+ .should('have.css', 'background-color', color);
1987
+ },
1988
+
1989
+ /**
1990
+ * @param {string} hexCode hexcode label of color block
1991
+ * @description this function verfies the hexcode label of filled fill color block
1992
+ */
1993
+ verifyFilledBorderColorHexCodeLabel: (hexCode) => {
1994
+ utilities.verifyInnerText(gridFillPage.filledBorderColorHexCodeLabel(), hexCode)
1995
+ },
1996
+
1997
+ /**
1998
+ * @param {string} opacityLabel opacity label of color block
1999
+ * @description this function verfies the opacity label of filled border color block
2000
+ */
2001
+ verifyFilledBorderColorOpacityLabel: (opacityLabel) => {
2002
+ utilities.verifyInnerText(gridFillPage.filledBorderColorOpacityLabel(), opacityLabel)
2003
+ },
2004
+
2005
+ /**
2006
+ * @description Verify the default state CSS of grids in edit tab
2007
+ * @param {string} fillColor selected fill color
2008
+ * @param {string} BorderColor selected border color
2009
+ */
2010
+ verifyDefaultStateCSSForGridInEditTab: (fillColor, BorderColor) => {
2011
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), 0), {
2012
+ 'background-color': `${fillColor}`,
2013
+ 'border-color': `${BorderColor}`
2014
+ });
2015
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), 14), {
2016
+ 'background-color': `${fillColor}`,
2017
+ 'border-color': `${BorderColor}`
2018
+ });
2019
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInSpecifyCorrectAnswerSection(), 0), {
2020
+ 'background-color': `${fillColor}`,
2021
+ 'border-color': `${BorderColor}`
2022
+ });
2023
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInSpecifyCorrectAnswerSection(), 14), {
2024
+ 'background-color': `${fillColor}`,
2025
+ 'border-color': `${BorderColor}`
2026
+ });
2027
+ },
2028
+
2029
+ /**
2030
+ * @description Verify the default state CSS of grids in preview tab
2031
+ * @param {string} fillColor selected fill color
2032
+ * @param {string} BorderColor selected border color
2033
+ */
2034
+ verifyDefaultStateCSSForGridInPreviewTabTab: (fillColor, BorderColor) => {
2035
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInPreviewTab(), 0), {
2036
+ 'background-color': `${fillColor}`,
2037
+ 'border-color': `${BorderColor}`
2038
+ });
2039
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInPreviewTab(), 14), {
2040
+ 'background-color': `${fillColor}`,
2041
+ 'border-color': `${BorderColor}`
2042
+ });
2043
+ },
2044
+
2045
+ /**
2046
+ * @description Verify the hover state CSS of grids in edit tab
2047
+ * @param {string} fillColor selected fill color
2048
+ * @param {string} BorderColor selected border color
2049
+ */
2050
+ verifyHoverStateCSSForGridInEditTab: (fillColor, BorderColor) => {
2051
+ utilities.hoverOverElement(utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), 0));
2052
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), 0), {
2053
+ 'background-color': `${fillColor}`,
2054
+ 'border-color': `${BorderColor}`
2055
+ });
2056
+ utilities.triggerMouseout(utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), 0));
2057
+ utilities.hoverOverElement(utilities.getNthElement(gridFillPage.cellInSpecifyCorrectAnswerSection(), 0));
2058
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInSpecifyCorrectAnswerSection(), 0), {
2059
+ 'background-color': `${fillColor}`,
2060
+ 'border-color': `${BorderColor}`
2061
+ });
2062
+ utilities.triggerMouseout(utilities.getNthElement(gridFillPage.cellInSpecifyCorrectAnswerSection(), 0));
2063
+ },
2064
+
2065
+ /**
2066
+ * @description Verify the hover state CSS of grid in preview tab
2067
+ * @param {string} fillColor selected fill color
2068
+ * @param {string} BorderColor selected border color
2069
+ */
2070
+ verifyHoverStateCSSForGridInPreviewTab: (fillColor, BorderColor) => {
2071
+ utilities.hoverOverElement(utilities.getNthElement(gridFillPage.cellInPreviewTab(), 0));
2072
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInPreviewTab(), 0), {
2073
+ 'background-color': `${fillColor}`,
2074
+ 'border-color': `${BorderColor}`
2075
+ });
2076
+ utilities.triggerMouseout(utilities.getNthElement(gridFillPage.cellInPreviewTab(), 0));
2077
+ },
2078
+
2079
+ /**
2080
+ * @description Verify the filled state CSS of grids in edit tab
2081
+ * @param {string} fillColor selected fill color
2082
+ * @param {string} BorderColor selected border color
2083
+ */
2084
+ verifyFilledStateCSSForGridInEditTab: (fillColor, BorderColor) => {
2085
+ gridFillPage.steps.shadeCell(1, 1);
2086
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), 6), {
2087
+ 'background-color': `${fillColor}`,
2088
+ 'border-color': `${BorderColor}`
2089
+ });
2090
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(1, 2);
2091
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInSpecifyCorrectAnswerSection(), 7), {
2092
+ 'background-color': `${fillColor}`,
2093
+ 'border-color': `${BorderColor}`
2094
+ });
2095
+ },
2096
+
2097
+ /**
2098
+ * @description Verify the filled state CSS of grid in preview tab
2099
+ * @param {string} fillColor selected fill color
2100
+ * @param {string} BorderColor selected border color
2101
+ */
2102
+ verifyFilledStateCSSForGridInPreviewTab: (fillColor, BorderColor) => {
2103
+ gridFillPage.steps.selectCellPreviewTab(1, 1);
2104
+ utilities.verifyCSS(utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), 6), {
2105
+ 'background-color': `${fillColor}`,
2106
+ 'border-color': `${BorderColor}`
2107
+ });
2108
+ },
2109
+
2110
+ /**
2111
+ * @description Verifies pattern is displayed in the cell in customize layout section
2112
+ * @param {number} rowIndex - The index of the row to verify.
2113
+ * @param {number} columnIndex - Index of column of the cell
2114
+ */
2115
+ verifyPatternIsDisplayedInCellInCustomizeLayoutSection: (rowIndex, columnIndex) => {
2116
+ utilities.getNthElement(gridFillPage.rowsWrapperCustomizeLayout(), rowIndex)
2117
+ .within(() => {
2118
+ utilities.getNthElement(gridFillPage.cellInEditTab(), columnIndex)
2119
+ .find('#Pattern')
2120
+ .should('exist');
2121
+ });
2122
+ },
2123
+
2124
+ /**
2125
+ * @description Verifies pattern is displayed in the cell in specify correct answer section
2126
+ * @param {number} rowIndex - The index of the row to verify.
2127
+ * @param {number} columnIndex - Index of column of the cell
2128
+ */
2129
+ verifyPatternIsDisplayedInCellInSpecifyCorrectAnswerSection: (rowIndex, columnIndex) => {
2130
+ utilities.getNthElement(gridFillPage.rowsWrapperSpecifyCorrectAnswerSection(), rowIndex)
2131
+ .within(() => {
2132
+ utilities.getNthElement(gridFillPage.cellInEditTab(), columnIndex)
2133
+ .find('#Pattern')
2134
+ .should('exist');
2135
+ });
2136
+ },
2137
+
2138
+ /**
2139
+ * @description Verifies pattern is displayed in the cell in preview tab
2140
+ * @param {number} rowIndex - The index of the row to verify.
2141
+ * @param {number} columnIndex - Index of column of the cell
2142
+ */
2143
+ verifyPatternIsDisplayedInCellInPreviewTab: (rowIndex, columnIndex) => {
2144
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
2145
+ .within(() => {
2146
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
2147
+ .find('#Pattern')
2148
+ .should('exist');
2149
+ });
2150
+ },
2151
+
2152
+ /**
2153
+ * @description Verifies pattern is not displayed in the cell in customize layout section
2154
+ * @param {number} rowIndex - The index of the row to verify.
2155
+ * @param {number} columnIndex - Index of column of the cell
2156
+ */
2157
+ verifyPatternIsNotDisplayedInCellInCustomizeLayoutSection: (rowIndex, columnIndex) => {
2158
+ utilities.getNthElement(gridFillPage.rowsWrapperCustomizeLayout(), rowIndex)
2159
+ .within(() => {
2160
+ utilities.getNthElement(gridFillPage.cellInEditTab(), columnIndex)
2161
+ .find('#Pattern')
2162
+ .should('not.exist');
2163
+ });
2164
+ },
2165
+
2166
+ /**
2167
+ * @description Verifies pattern is not displayed in the cell in specify correct answer section
2168
+ * @param {number} rowIndex - The index of the row to verify.
2169
+ * @param {number} columnIndex - Index of column of the cell
2170
+ */
2171
+ verifyPatternIsNotDisplayedInCellInSpecifyCorrectAnswerSection: (rowIndex, columnIndex) => {
2172
+ utilities.getNthElement(gridFillPage.rowsWrapperSpecifyCorrectAnswerSection(), rowIndex)
2173
+ .within(() => {
2174
+ utilities.getNthElement(gridFillPage.cellInEditTab(), columnIndex)
2175
+ .find('#Pattern')
2176
+ .should('not.exist');
2177
+ });
2178
+ },
2179
+
2180
+ /**
2181
+ * @description Verifies pattern is not displayed in the cell in preview tab
2182
+ * @param {number} rowIndex - The index of the row to verify.
2183
+ * @param {number} columnIndex - Index of column of the cell
2184
+ */
2185
+ verifyPatternIsNotDisplayedInCellInPreviewTab: (rowIndex, columnIndex) => {
2186
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
2187
+ .within(() => {
2188
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
2189
+ .find('#Pattern')
2190
+ .should('not.exist');
2191
+ });
2192
+ },
2193
+
2194
+ clickOnResetColorButton: () => {
2195
+ gridFillPage.resetButton()
2196
+ .click();
2197
+ },
2198
+
2199
+ verifyColorPopupCancelButton: () => {
2200
+ utilities.verifyInnerText(gridFillPage.cancelButton(), 'Cancel');
2201
+ utilities.verifyElementVisibilityState(gridFillPage.cancelButton(), 'visible');
2202
+ },
2203
+
2204
+ verifyColorPopupOkButton: () => {
2205
+ utilities.verifyInnerText(gridFillPage.okButton(), 'Ok');
2206
+ utilities.verifyElementVisibilityState(gridFillPage.okButton(), 'visible');
2207
+ },
2208
+
2209
+ clickOnCancelButton: () => {
2210
+ gridFillPage.cancelButton()
2211
+ .click();
2212
+ },
2213
+
2214
+ clickOnOkButton: () => {
2215
+ gridFillPage.okButton()
2216
+ .click();
2217
+ },
2218
+
2219
+ selectImageRadioButton: () => {
2220
+ gridFillPage.imageRadioButton()
2221
+ .click();
2222
+ },
2223
+
2224
+ /**
2225
+ * @description verify the displayed penalty points for each incorrect cell
2226
+ * @param {number} penaltyPoints displayed penalty points
2227
+ */
2228
+ verifyPenaltyPointsForEachIncorrectCell: (penaltyPoints) => {
2229
+ utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.penaltyPointsDetailsSectionAllottedPointsLabel(), `Penalty points for each incorrect cell: ${penaltyPoints}`);
2230
+ },
2231
+
2232
+ /**
2233
+ * @description Verifies the penalty points value for each incorrect cell
2234
+ * @param {number} points - The expected penalty points value for each incorrect cell
2235
+ */
2236
+ verifyPenaltyPointsForEachIncorrectCellValue: (points) => {
2237
+ gridFillPage.penaltyPointsForEachIncorrectCellInputField()
2238
+ .should('have.value', points);
2239
+ },
2240
+
2241
+ /**
2242
+ * @description Allots penalty points for each incorrect text container
2243
+ * @param {number} points - The penalty points to be allotted for each text container.
2244
+ */
2245
+ selectPenaltyPointsForEachIncorrectCell: () => {
2246
+ gridFillPage.specifyPointsForEachIncorrectCellRadioButton()
2247
+ .click();
2248
+ },
2249
+
2250
+ /**
2251
+ * @param {string} file name of the file in fixtures/upload folder
2252
+ * @description this function uploads a file
2253
+ */
2254
+ uploadFilledImageFile: (file) => {
2255
+ gridFillPage.filledImageInputTypeFile()
2256
+ .attachFile(`uploads/${file}`);
2257
+ },
2258
+
2259
+ /**
2260
+ * @param {*} fileName name of the filled image uploaded file
2261
+ * @description function verifies uploaded file name
2262
+ */
2263
+ verifyFilledImageFileNameLabel: (fileName) => {
2264
+ utilities.verifyInnerText(gridFillPage.filledImageUploadedFileNameLabel(), fileName);
2265
+ utilities.verifyElementVisibilityState(gridFillPage.filledImageUploadedFileNameLabel(), 'visible');
2266
+ },
2267
+
2268
+ /**
2269
+ * @description Allots penalty points for each incorrect cell
2270
+ * @param {number} points - The penalty points to be allotted for each cell.
2271
+ */
2272
+ allotPenaltyPointsForEachIncorrectCell: (points) => {
2273
+ gridFillPage.penaltyPointsForEachIncorrectCellInputField()
2274
+ .clear()
2275
+ .type(`${points}`)
2276
+ .should('have.value', points)
2277
+ .blur();
2278
+ },
2279
+
2280
+ /**
2281
+ * Enters value into the input field for maximum cells selected.
2282
+ * @param {number} value- The value to be entered into the input field.
2283
+ */
2284
+ enterTextInMaxSelectedCellInputField: (value) => {
2285
+ gridFillPage.maxSelectedCellInputField()
2286
+ .clear()
2287
+ .type(value)
2288
+ .blur();
2289
+ },
2290
+
2291
+ /**
2292
+ * Enters value into the input field for maximum cells selected.
2293
+ * @param {number} value- The value to be entered into the input field.
2294
+ */
2295
+ VerifyTextInMaxSelectedCellInputField: (value) => {
2296
+ gridFillPage.maxSelectedCellInputField()
2297
+ .should('have.value', value);
2298
+ },
2299
+
2300
+ /**
2301
+ * Verifies if the count of selected cells in the preview tab matches the expected value.
2302
+ * @param {number} expectedValue - The expected count of selected cells.
2303
+ */
2304
+ verifySelectedCellCountPreviewTab: (expectedValue) => {
2305
+ let count = 0;
1283
2306
  gridFillPage.cellInPreviewTab()
1284
2307
  .each((cell) => {
1285
2308
  cy.wrap(cell)
@@ -1297,6 +2320,504 @@ const steps = {
1297
2320
  clickOutsideGrid: () => {
1298
2321
  cy.get('body')
1299
2322
  .click();
2323
+ },
2324
+
2325
+ /**
2326
+ * @description Add input to filled image alt text input field
2327
+ * @param {string} input Text input
2328
+ */
2329
+ addInputToFilledImageAltTextInputField: (input) => {
2330
+ gridFillPage.filledImageAltTextInputField()
2331
+ .clear()
2332
+ .type(input)
2333
+ .should('have.value', `${input}`);
2334
+ },
2335
+
2336
+ clearFilledImageAltTextInputField: () => {
2337
+ gridFillPage.filledImageAltTextInputField()
2338
+ .clear();
2339
+ },
2340
+
2341
+ /**
2342
+ * @description Add input to background image alt text input field
2343
+ * @param {string} input Text input
2344
+ */
2345
+ addInputToBackgroundImageAltTextInputField: (input) => {
2346
+ gridFillPage.backgroundImageAlternativeTextInputField()
2347
+ .clear()
2348
+ .type(input)
2349
+ .should('have.value', `${input}`);
2350
+ },
2351
+
2352
+ clearBackgroundImageAltTextInputField: () => {
2353
+ gridFillPage.backgroundImageAlternativeTextInputField()
2354
+ .clear();
2355
+ },
2356
+
2357
+ /**
2358
+ * @description Add input to background image alt text input field
2359
+ * @param {string} input Text input
2360
+ */
2361
+ addInputToBackgroundImageAltTextInputField: (input) => {
2362
+ gridFillPage.backgroundImageAlternativeTextInputField()
2363
+ .clear()
2364
+ .type(input)
2365
+ .should('have.value', `${input}`);
2366
+ },
2367
+
2368
+ clearBackgroundImageAltTextInputField: () => {
2369
+ gridFillPage.backgroundImageAlternativeTextInputField()
2370
+ .clear();
2371
+ },
2372
+
2373
+ /**
2374
+ * @description Verify filled image is displayed in shaded cell in customize layout section
2375
+ * @param {number} rowIndex - The index of the row containing the cell.
2376
+ * @param {number} columnIndex - The index of the column containing the cell.
2377
+ */
2378
+ verifyFilledImageInShadedCellInCustomizeLayoutGrid: (rowIndex, columnIndex) => {
2379
+ utilities.getNthElement(gridFillPage.rowsWrapperCustomizeLayout(), rowIndex)
2380
+ .within(() => {
2381
+ utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), columnIndex)
2382
+ .find('img')
2383
+ .should('exist')
2384
+ });
2385
+ },
2386
+
2387
+ /**
2388
+ * @description Verify filled image is displayed in shaded cell in specify correct answer section
2389
+ * @param {number} rowIndex - The index of the row containing the cell.
2390
+ * @param {number} columnIndex - The index of the column containing the cell.
2391
+ */
2392
+ verifyFilledImageInShadedCellInSpecifyCorrectAnswerGrid: (rowIndex, columnIndex) => {
2393
+ utilities.getNthElement(gridFillPage.rowsWrapperSpecifyCorrectAnswerSection(), rowIndex)
2394
+ .within(() => {
2395
+ utilities.getNthElement(gridFillPage.cellInEditTab(), columnIndex)
2396
+ .find('img')
2397
+ .should('exist')
2398
+ });
2399
+ },
2400
+
2401
+ /**
2402
+ * @description Verify filled image is displayed in selected cell in preview tab grid
2403
+ * @param {number} rowIndex - The index of the row containing the cell.
2404
+ * @param {number} columnIndex - The index of the column containing the cell.
2405
+ */
2406
+ verifyFilledImageInSelectedCellInPreviewTabGrid: (rowIndex, columnIndex) => {
2407
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
2408
+ .within(() => {
2409
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
2410
+ .find('img')
2411
+ .should('exist')
2412
+ });
2413
+ },
2414
+
2415
+ /**
2416
+ * @description Verify background image alternative text in edit tab grids
2417
+ * @param {string} altText - Alternative text of the image
2418
+ */
2419
+ verifyBackgroundImageAltTextInEditTabGrids: (altText) => {
2420
+ gridFillPage.gridCustomizeLayoutSection()
2421
+ .parents('.grid-fill-response-wrapper')
2422
+ .find('p')
2423
+ .should('have.text', `${altText}`);
2424
+ gridFillPage.gridSpecifyCorrectAnswerSection()
2425
+ .parents('.grid-fill-response-wrapper')
2426
+ .find('p')
2427
+ .should('have.text', `${altText}`);
2428
+ },
2429
+
2430
+ /**
2431
+ * @description Verify background image alternative text in preview tab grids
2432
+ * @param {string} altText - Alternative text of the image
2433
+ */
2434
+ verifyBackgroundImageAltTextInPreviewTabGrids: (altText) => {
2435
+ gridFillPage.gridWrapperPreviewTab()
2436
+ .parents('.grid-fill-response-wrapper')
2437
+ .find('p')
2438
+ .should('have.text', `${altText}`);
2439
+ },
2440
+
2441
+ verifyBackgroundImageAltTextNotPresentInEditTabGrids: () => {
2442
+ gridFillPage.gridCustomizeLayoutSection()
2443
+ .parents('.grid-fill-response-wrapper')
2444
+ .find('p')
2445
+ .should('not.exist');
2446
+ gridFillPage.gridSpecifyCorrectAnswerSection()
2447
+ .parents('.grid-fill-response-wrapper')
2448
+ .find('p')
2449
+ .should('not.exist');
2450
+ },
2451
+
2452
+ verifyBackgroundImageAltTextNotPresentInPreviewTabGrid: () => {
2453
+ gridFillPage.gridWrapperPreviewTab()
2454
+ .parents('.grid-fill-response-wrapper')
2455
+ .find('p')
2456
+ .should('not.exist');
2457
+ },
2458
+
2459
+ /**
2460
+ * @description Verify image alternative text in shaded cell of customize layout grid
2461
+ * @param {number} rowIndex - The index of the row containing the cell.
2462
+ * @param {number} columnIndex - The index of the column containing the cell.
2463
+ * @param {string} altText - Alternative text of the image
2464
+ */
2465
+ verifyFilledImageAltTextInShadedCellInCustomizeLayoutGrid: (rowIndex, columnIndex, altText) => {
2466
+ utilities.getNthElement(gridFillPage.rowsWrapperCustomizeLayout(), rowIndex)
2467
+ .within(() => {
2468
+ utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), columnIndex)
2469
+ .find('img')
2470
+ .should('have.attr', 'alt', `${altText}`);
2471
+ });
2472
+ },
2473
+
2474
+ /**
2475
+ * @description Verify image alternative text in shaded cell of specify correct answer section grid
2476
+ * @param {number} rowIndex - The index of the row containing the cell.
2477
+ * @param {number} columnIndex - The index of the column containing the cell.
2478
+ * @param {string} altText - Alternative text of the image
2479
+ */
2480
+ verifyFilledImageAltTextInShadedCellInSpecifyCorrectAnswerGrid: (rowIndex, columnIndex, altText) => {
2481
+ utilities.getNthElement(gridFillPage.rowsWrapperSpecifyCorrectAnswerSection(), rowIndex)
2482
+ .within(() => {
2483
+ utilities.getNthElement(gridFillPage.cellInEditTab(), columnIndex)
2484
+ .find('img')
2485
+ .should('have.attr', 'alt', `${altText}`);
2486
+ });
2487
+ },
2488
+
2489
+ /**
2490
+ * @description Verify image alternative text in selected cell of preview tab grid
2491
+ * @param {number} rowIndex - The index of the row containing the cell.
2492
+ * @param {number} columnIndex - The index of the column containing the cell.
2493
+ * @param {string} altText - Alternative text of the image
2494
+ */
2495
+ verifyFilledImageAltTextInShadedCellInPreviewTabGrid: (rowIndex, columnIndex, altText) => {
2496
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
2497
+ .within(() => {
2498
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
2499
+ .find('img')
2500
+ .should('have.attr', 'alt', `${altText}`);
2501
+ });
2502
+ },
2503
+
2504
+ deleteFilledImage: () => {
2505
+ gridFillPage.filledImageDeleteImageButton()
2506
+ .click();
2507
+ },
2508
+
2509
+ /**
2510
+ * @description Verify filled image is not displayed in shaded cell in customize layout section
2511
+ * @param {number} rowIndex - The index of the row containing the cell.
2512
+ * @param {number} columnIndex - The index of the column containing the cell.
2513
+ */
2514
+ verifyFilledImageNotDisplayedInCellInCustomizeLayoutGrid: (rowIndex, columnIndex) => {
2515
+ utilities.getNthElement(gridFillPage.rowsWrapperCustomizeLayout(), rowIndex)
2516
+ .within(() => {
2517
+ utilities.getNthElement(gridFillPage.cellInCustomizeLayout(), columnIndex)
2518
+ .find('img')
2519
+ .should('not.exist');
2520
+ });
2521
+ },
2522
+
2523
+ /**
2524
+ * @description Verify filled image is not displayed in shaded cell in specify correct answer section
2525
+ * @param {number} rowIndex - The index of the row containing the cell.
2526
+ * @param {number} columnIndex - The index of the column containing the cell.
2527
+ */
2528
+ verifyFilledImageNotDisplayedInCellInSpecifyCorrectAnswerGrid: (rowIndex, columnIndex) => {
2529
+ utilities.getNthElement(gridFillPage.rowsWrapperSpecifyCorrectAnswerSection(), rowIndex)
2530
+ .within(() => {
2531
+ utilities.getNthElement(gridFillPage.cellInEditTab(), columnIndex)
2532
+ .find('img')
2533
+ .should('not.exist');
2534
+ });
2535
+ },
2536
+
2537
+ /**
2538
+ * @description Verify filled image is not displayed in selected cell in preview tab
2539
+ * @param {number} rowIndex - The index of the row containing the cell.
2540
+ * @param {number} columnIndex - The index of the column containing the cell.
2541
+ */
2542
+ verifyFilledImageNotDisplayedInCellInPreviewTabGrid: (rowIndex, columnIndex) => {
2543
+ utilities.getNthElement(gridFillPage.rowsWrapperPreviewTab(), rowIndex)
2544
+ .within(() => {
2545
+ utilities.getNthElement(gridFillPage.cellInPreviewTab(), columnIndex)
2546
+ .find('img')
2547
+ .should('not.exist');
2548
+ });
2549
+ },
2550
+
2551
+ verifyBackgroundImageIsNotDisplayedInEditTabGrids: () => {
2552
+ gridFillPage.gridCustomizeLayoutSection()
2553
+ .then(($element) => {
2554
+ const win = $element[0].ownerDocument.defaultView
2555
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2556
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
2557
+ expect(CSSStyleDeclarationValue).to.deep.eq('url((unknown))');
2558
+ });
2559
+ gridFillPage.gridSpecifyCorrectAnswerSection()
2560
+ .then(($element) => {
2561
+ const win = $element[0].ownerDocument.defaultView
2562
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2563
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
2564
+ expect(CSSStyleDeclarationValue).to.deep.eq('url((unknown))');
2565
+ });
2566
+ },
2567
+
2568
+ verifyBackgroundImageIsNotDisplayedInPreviewTabGrid: () => {
2569
+ gridFillPage.gridWrapperPreviewTab()
2570
+ .then(($element) => {
2571
+ const win = $element[0].ownerDocument.defaultView
2572
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2573
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
2574
+ expect(CSSStyleDeclarationValue).to.deep.eq('url((unknown))');
2575
+ });
2576
+ },
2577
+
2578
+ verifyBackgroundImageIsDisplayedInEditTabGrids: () => {
2579
+ gridFillPage.gridCustomizeLayoutSection()
2580
+ .then(($element) => {
2581
+ const win = $element[0].ownerDocument.defaultView
2582
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2583
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
2584
+ expect(CSSStyleDeclarationValue).to.include('url("https://itemengine-file-management.itemengine-qa.il-apps.com/');
2585
+ });
2586
+ gridFillPage.gridSpecifyCorrectAnswerSection()
2587
+ .then(($element) => {
2588
+ const win = $element[0].ownerDocument.defaultView
2589
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2590
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
2591
+ expect(CSSStyleDeclarationValue).to.include('url("https://itemengine-file-management.itemengine-qa.il-apps.com/');
2592
+ });
2593
+ },
2594
+
2595
+ verifyBackgroundImageIsDisplayedInPreviewTabGrid: () => {
2596
+ gridFillPage.gridWrapperPreviewTab()
2597
+ .then(($element) => {
2598
+ const win = $element[0].ownerDocument.defaultView
2599
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2600
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-image')
2601
+ expect(CSSStyleDeclarationValue).to.include('url("https://itemengine-file-management.itemengine-qa.il-apps.com/');
2602
+ });
2603
+ },
2604
+
2605
+ verifyFillImageToGridCheckboxIsChecked: () => {
2606
+ gridFillPage.fillImageToGridCheckbox()
2607
+ .should('be.checked');
2608
+ },
2609
+
2610
+ uncheckFillImageToGridCheckbox: () => {
2611
+ gridFillPage.fillImageToGridCheckbox()
2612
+ .click()
2613
+ .should('not.be.checked');
2614
+ },
2615
+
2616
+ verifyImageFitsToGridInEditTab: () => {
2617
+ gridFillPage.gridCustomizeLayoutSection()
2618
+ .then(($element) => {
2619
+ const win = $element[0].ownerDocument.defaultView
2620
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2621
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
2622
+ expect(CSSStyleDeclarationValue).to.deep.eq('100% 100%');
2623
+ });
2624
+ gridFillPage.gridSpecifyCorrectAnswerSection()
2625
+ .then(($element) => {
2626
+ const win = $element[0].ownerDocument.defaultView
2627
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2628
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
2629
+ expect(CSSStyleDeclarationValue).to.deep.eq('100% 100%');
2630
+ });
2631
+ },
2632
+
2633
+ verifyImageFitsToGridInPreviewTab: () => {
2634
+ gridFillPage.gridWrapperPreviewTab()
2635
+ .then(($element) => {
2636
+ const win = $element[0].ownerDocument.defaultView
2637
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2638
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
2639
+ expect(CSSStyleDeclarationValue).to.deep.eq('100% 100%');
2640
+ });
2641
+ },
2642
+
2643
+ verifyDefaultImageInGridInEditTab: () => {
2644
+ gridFillPage.gridCustomizeLayoutSection()
2645
+ .then(($element) => {
2646
+ const win = $element[0].ownerDocument.defaultView
2647
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2648
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
2649
+ expect(CSSStyleDeclarationValue).to.deep.eq('auto');
2650
+ });
2651
+ gridFillPage.gridSpecifyCorrectAnswerSection()
2652
+ .then(($element) => {
2653
+ const win = $element[0].ownerDocument.defaultView
2654
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2655
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
2656
+ expect(CSSStyleDeclarationValue).to.deep.eq('auto');
2657
+ });
2658
+ },
2659
+
2660
+ verifyDefaultImageInGridInPreviewTab: () => {
2661
+ gridFillPage.gridWrapperPreviewTab()
2662
+ .then(($element) => {
2663
+ const win = $element[0].ownerDocument.defaultView
2664
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2665
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
2666
+ expect(CSSStyleDeclarationValue).to.deep.eq('auto');
2667
+ });
2668
+ },
2669
+
2670
+ verifyImageIsTopLeftAlignedInEditTabGrids: () => {
2671
+ gridFillPage.gridCustomizeLayoutSection()
2672
+ .then(($element) => {
2673
+ const win = $element[0].ownerDocument.defaultView
2674
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2675
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-position')
2676
+ expect(CSSStyleDeclarationValue).to.deep.eq('0% 0%');
2677
+ });
2678
+ gridFillPage.gridSpecifyCorrectAnswerSection()
2679
+ .then(($element) => {
2680
+ const win = $element[0].ownerDocument.defaultView
2681
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2682
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-position')
2683
+ expect(CSSStyleDeclarationValue).to.deep.eq('0% 0%');
2684
+ });
2685
+ },
2686
+
2687
+ verifyImageIsTopLeftAlignedInPreviewTabGrid: () => {
2688
+ gridFillPage.gridWrapperPreviewTab()
2689
+ .then(($element) => {
2690
+ const win = $element[0].ownerDocument.defaultView
2691
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2692
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-position')
2693
+ expect(CSSStyleDeclarationValue).to.deep.eq('0% 0%');
2694
+ });
2695
+ },
2696
+
2697
+ verifyImageIsCenterAlignedInEditTabGrids: () => {
2698
+ gridFillPage.gridCustomizeLayoutSection()
2699
+ .then(($element) => {
2700
+ const win = $element[0].ownerDocument.defaultView
2701
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2702
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-position')
2703
+ expect(CSSStyleDeclarationValue).to.deep.eq('50% 50%');
2704
+ });
2705
+ gridFillPage.gridSpecifyCorrectAnswerSection()
2706
+ .then(($element) => {
2707
+ const win = $element[0].ownerDocument.defaultView
2708
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2709
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-position')
2710
+ expect(CSSStyleDeclarationValue).to.deep.eq('50% 50%');
2711
+ });
2712
+ },
2713
+
2714
+ verifyImageIsCenterAlignedInPreviewTabGrid: () => {
2715
+ gridFillPage.gridWrapperPreviewTab()
2716
+ .then(($element) => {
2717
+ const win = $element[0].ownerDocument.defaultView
2718
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2719
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-position')
2720
+ expect(CSSStyleDeclarationValue).to.deep.eq('50% 50%');
2721
+ });
2722
+ },
2723
+
2724
+ verifyImageIsTopRightAlignedInEditTabGrids: () => {
2725
+ gridFillPage.gridCustomizeLayoutSection()
2726
+ .then(($element) => {
2727
+ const win = $element[0].ownerDocument.defaultView
2728
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2729
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-position')
2730
+ expect(CSSStyleDeclarationValue).to.deep.eq('100% 0%');
2731
+ });
2732
+ gridFillPage.gridSpecifyCorrectAnswerSection()
2733
+ .then(($element) => {
2734
+ const win = $element[0].ownerDocument.defaultView
2735
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2736
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-position')
2737
+ expect(CSSStyleDeclarationValue).to.deep.eq('100% 0%');
2738
+ });
2739
+ },
2740
+
2741
+ verifyImageIsTopRightAlignedInPreviewTabGrid: () => {
2742
+ gridFillPage.gridWrapperPreviewTab()
2743
+ .then(($element) => {
2744
+ const win = $element[0].ownerDocument.defaultView
2745
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2746
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-position')
2747
+ expect(CSSStyleDeclarationValue).to.deep.eq('100% 0%');
2748
+ });
2749
+ },
2750
+
2751
+ /**
2752
+ * @description verify opacity value for images in edit tab grids
2753
+ * @param {string} opacityValue Value of opacity
2754
+ */
2755
+ verifyOpacityValueForGridImagesInEditTab: (opacityValue) => {
2756
+ gridFillPage.gridCustomizeLayoutSection()
2757
+ .then(($element) => {
2758
+ const win = $element[0].ownerDocument.defaultView
2759
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2760
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('opacity')
2761
+ expect(CSSStyleDeclarationValue).to.deep.eq(opacityValue);
2762
+ });
2763
+ gridFillPage.gridSpecifyCorrectAnswerSection()
2764
+ .then(($element) => {
2765
+ const win = $element[0].ownerDocument.defaultView
2766
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2767
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('opacity')
2768
+ expect(CSSStyleDeclarationValue).to.deep.eq(opacityValue);
2769
+ });
2770
+ },
2771
+
2772
+ /**
2773
+ * @description verify opacity value for images in preview tab grid
2774
+ * @param {string} opacityValue Value of opacity
2775
+ */
2776
+ verifyOpacityValueForGridImageInPreviewTab: (opacityValue) => {
2777
+ gridFillPage.gridWrapperPreviewTab()
2778
+ .then(($element) => {
2779
+ const win = $element[0].ownerDocument.defaultView
2780
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2781
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('opacity')
2782
+ expect(CSSStyleDeclarationValue).to.deep.eq(opacityValue);
2783
+ });
2784
+ },
2785
+
2786
+ /**
2787
+ * @description Verify grid background image dimensions in edit tab
2788
+ * @param {string} width width of image in px
2789
+ * @param {string} height height of image in px
2790
+ */
2791
+ verifyGridBackgroundImageDimensionsInEditTab: (width, height) => {
2792
+ gridFillPage.gridCustomizeLayoutSection()
2793
+ .then(($element) => {
2794
+ const win = $element[0].ownerDocument.defaultView
2795
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2796
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
2797
+ expect(CSSStyleDeclarationValue).to.deep.eq(`${width} ${height}`);
2798
+ });
2799
+ gridFillPage.gridSpecifyCorrectAnswerSection()
2800
+ .then(($element) => {
2801
+ const win = $element[0].ownerDocument.defaultView
2802
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2803
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
2804
+ expect(CSSStyleDeclarationValue).to.deep.eq(`${width} ${height}`);
2805
+ });
2806
+ },
2807
+
2808
+ /**
2809
+ * @description Verify grid background image dimensions in preview tab
2810
+ * @param {string} width width of image in px
2811
+ * @param {string} height height of image in px
2812
+ */
2813
+ verifyGridBackgroundImageDimensionsInPreviewTab: (width, height) => {
2814
+ gridFillPage.gridWrapperPreviewTab()
2815
+ .then(($element) => {
2816
+ const win = $element[0].ownerDocument.defaultView
2817
+ const CSSStyleDeclaration = win.getComputedStyle($element[0], 'before')
2818
+ const CSSStyleDeclarationValue = CSSStyleDeclaration.getPropertyValue('background-size')
2819
+ expect(CSSStyleDeclarationValue).to.deep.eq(`${width} ${height}`);
2820
+ });
1300
2821
  }
1301
2822
  }
1302
2823
 
@@ -1312,6 +2833,7 @@ const tests = {
1312
2833
  ...additionalSettingsAccessibilitySectionComponent.tests,
1313
2834
  ...studentViewSettingsLabelComponent.tests,
1314
2835
  ...autoScoredStudentViewSettings.tests,
2836
+ ...backgroundImageUploadComponent.tests,
1315
2837
 
1316
2838
  verifyContentsOfSpecifyCorrectAnswerSection: () => {
1317
2839
  it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
@@ -1380,7 +2902,6 @@ const tests = {
1380
2902
  });
1381
2903
  } else {
1382
2904
  autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1383
- .eq(1)
1384
2905
  .within(() => {
1385
2906
  utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1386
2907
  });
@@ -1392,8 +2913,8 @@ const tests = {
1392
2913
  commonComponents.steps.verifyErrorMessageIsNotDisplayed();
1393
2914
  });
1394
2915
 
1395
- it(`\'Match exact position of cells\' label and checkbox should be displayed in the ${accordionName} accordion and the checkbox should be checked`, () => {
1396
- utilities.verifyInnerText(gridFillPage.matchExactPositionLabel(), 'Match exact position of cells');
2916
+ it(`\'Exact match position of cells\' label and checkbox should be displayed in the ${accordionName} accordion and the checkbox should be checked`, () => {
2917
+ utilities.verifyInnerText(gridFillPage.matchExactPositionLabel(), 'Exact match position of cells');
1397
2918
  utilities.verifyElementVisibilityState(gridFillPage.matchExactPositionLabel(), 'visible');
1398
2919
  utilities.verifyElementVisibilityState(gridFillPage.matchExactPositionCheckbox(), 'exist');
1399
2920
  gridFillPage.steps.verifyMatchExactPositionOfCellsCheckboxIsChecked();
@@ -1427,7 +2948,6 @@ const tests = {
1427
2948
  });
1428
2949
  } else {
1429
2950
  autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1430
- .eq(1)
1431
2951
  .within(() => {
1432
2952
  utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1433
2953
  });