itemengine-cypress-automation 1.0.166-migrationScripts-b8c79a0.0 → 1.0.167-repoUpdate10April-1465c8c.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +83 -0
  2. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +200 -0
  3. package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +56 -0
  4. package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +95 -0
  5. package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +71 -0
  6. package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +72 -0
  7. package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +71 -0
  8. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  9. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +22 -11
  10. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  12. package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +161 -0
  13. package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +308 -0
  14. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +216 -0
  15. package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +336 -0
  16. package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +570 -0
  17. package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +214 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +356 -0
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +299 -0
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +18 -7
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +11 -6
  22. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +355 -0
  23. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
  24. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +2 -36
  25. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +22 -34
  26. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +8 -24
  27. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +5 -25
  28. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +68 -114
  29. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +67 -111
  30. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +71 -123
  31. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +41 -63
  32. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +21 -25
  33. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +50 -85
  34. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +68 -115
  35. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +54 -98
  36. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +72 -120
  37. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
  38. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +309 -0
  39. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
  40. package/cypress/e2e/ILC/Matching/toolSettings.js +72 -0
  41. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1033 -0
  42. package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +28 -0
  43. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +236 -0
  44. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +239 -0
  45. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +278 -0
  46. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +178 -0
  47. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +407 -0
  48. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +273 -0
  49. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +278 -0
  50. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +228 -0
  51. package/cypress/e2e/ILC/NumberLine/additionalSettings.js +120 -0
  52. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +659 -0
  53. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +149 -0
  54. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +151 -0
  55. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +171 -0
  56. package/cypress/e2e/ILC/NumberLine/headerSection.js +76 -0
  57. package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +54 -0
  58. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +200 -0
  59. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +67 -0
  60. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +135 -0
  61. package/cypress/e2e/ILC/NumberLine/toolSettings.js +73 -0
  62. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +372 -0
  63. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1014 -0
  64. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +235 -0
  65. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +235 -0
  66. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +235 -0
  67. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +457 -0
  68. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +342 -0
  69. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +342 -0
  70. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +342 -0
  71. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +155 -0
  72. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +314 -0
  73. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +275 -0
  74. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +314 -0
  75. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +290 -0
  76. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
  77. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +137 -0
  78. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
  79. package/cypress/fixtures/theme/ilc.json +14 -26
  80. package/cypress/pages/brainingCampManipulativePage.js +122 -0
  81. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
  82. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
  83. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  84. package/cypress/pages/components/colorPopupComponent.js +2 -2
  85. package/cypress/pages/components/defaultToolDropdown.js +77 -0
  86. package/cypress/pages/components/gridQuestionCommonComponent.js +629 -2
  87. package/cypress/pages/components/index.js +3 -0
  88. package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
  89. package/cypress/pages/components/measuringToolComponent.js +2 -2
  90. package/cypress/pages/components/resetPopupComponent.js +74 -0
  91. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  92. package/cypress/pages/components/setPointsPopupBase.js +6 -4
  93. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +60 -3
  94. package/cypress/pages/components/toolSettingsComponent.js +80 -12
  95. package/cypress/pages/components/toolsAndControlsComponent.js +69 -0
  96. package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -8
  97. package/cypress/pages/feedbackScalePage copy.js +716 -0
  98. package/cypress/pages/feedbackScalePage.js +591 -449
  99. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
  100. package/cypress/pages/graphingPage.js +9 -145
  101. package/cypress/pages/gridFillPage.js +135 -120
  102. package/cypress/pages/highlightPage.js +0 -394
  103. package/cypress/pages/index.js +5 -2
  104. package/cypress/pages/matchingPage.js +78 -20
  105. package/cypress/pages/multipleSelectionGridPage.js +88 -1
  106. package/cypress/pages/numberLinePage.js +723 -0
  107. package/cypress/pages/singleSelectionGridPage.js +86 -0
  108. package/cypress/pages/textSelectionPage.js +582 -0
  109. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +3 -12
  110. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +0 -1
  111. package/cypress/support/migrationHelpers/migrationScript.js +0 -10
  112. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +0 -8
  113. package/package.json +1 -1
@@ -12,7 +12,9 @@ const selectors = {
12
12
  editCellPropertyListOption: () => cy.get('[class*="MuiMenuItem"][role="menuitem"]'),
13
13
  editCellPropertyTableWrapper: () => cy.get('.single-select-grid-option-selection-component .selection-grid-wrapper').eq(0),
14
14
  editCellPropertyRow: () => gridQuestionCommonComponent.editCellPropertyTableWrapper().find('[class*="wrapper-row"]'),
15
- cellPropertyInputField: () => cy.get('[title="Enter text here..."]'),
15
+ editCellPropertyTableLeftPaginationButton: () => cy.get('.authoring-selection-grid [class*="SelectionGridstyles__PaginationLeftControl"]'),
16
+ editCellPropertyTableRightPaginationButton: () => cy.get('.authoring-selection-grid [class*="SelectionGridstyles__PaginationRightControl"]'),
17
+ cellPropertyInputField: () => cy.get('[title*="text"]'),
16
18
  optionCellPropertyInputField: () => cy.get('[title="Option text or image..."]'),
17
19
  tableRowSpecifyCorrectAnswerSection: () => cy.get('.correct-answer-accordion [class*="wrapper-row"]'),
18
20
  tableRowPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="wrapper-row"]'),
@@ -27,9 +29,30 @@ const selectors = {
27
29
  penaltyPointsForEachIncorrectRowInputField: () => cy.get('input[aria-label="Penalty points for each incorrect row"]'),
28
30
  pointsPerRowLabel: () => cy.get('.selection-grid-partial-points-per-response-label'),
29
31
  enableRowHeadingLabel: () => cy.get('[data-ngie-testid="enable-row-heading-checkbox"] [class*="label"]'),
30
- enableRowHeadingCheckbox: () => cy.get('[data-ngie-testid="enable-row-heading-checkbox"] .ngie-checkbox'),
32
+ enableRowHeadingCheckbox: () => cy.get('[data-ngie-testid="enable-row-heading-checkbox"] input'),
31
33
  leftPaginationButtonSpecifyCorrectAnswerSection: () => cy.get('.set-correct-ans-selection-grid [aria-label="Left Pagination Button"]'),
32
34
  rightPaginationButtonSpecifyCorrectAnswerSection: () => cy.get('.set-correct-ans-selection-grid [aria-label="Right Pagination Button"]'),
35
+ leftPaginationButtonPreviewTab: () => cy.get('.preview-selection-grid [class*="SelectionGridstyles__PaginationLeftControl"]'),
36
+ rightPaginationButtonPreviewTab: () => cy.get('.preview-selection-grid [class*="SelectionGridstyles__PaginationRightControl"]'),
37
+ defaultOptionLabel: () => cy.get('#Default-option-dropdown-label'),
38
+ defaultOptionDropdown: () => cy.get('#Default-option-select'),
39
+ defaultOptionDropdownListOptions: (ariaLabel = null) => {
40
+ if (ariaLabel) {
41
+ return cy.get(`[aria-labelledby*="Default-option-dropdown-label "] [role="option"][aria-label*="${ariaLabel}"]`).first()
42
+ } else {
43
+ return cy.get('[aria-labelledby*="Default-option-dropdown-label"] [role="option"]')
44
+ }
45
+ },
46
+ defaultTextLabel: () => cy.get('#Default-text-dropdown-label'),
47
+ defaultTextDropdown: () => cy.get('#Default-text-select'),
48
+ defaultTextDropdownListOptions: (optionText = null) => {
49
+ if (optionText) {
50
+ return cy.get('[aria-labelledby*="Default-text-dropdown-label "] [role="option"]').contains(`${optionText}`, { matchCase: false });
51
+ } else {
52
+ return cy.get('[aria-labelledby*="Default-text-dropdown-label"] [role="option"]')
53
+ }
54
+ },
55
+ specifyRowsAndColumnsTableHelpText: () => cy.get('[class*="GridPropertiesstyles__HelperTextWrapper"]')
33
56
  }
34
57
 
35
58
  const steps = {
@@ -92,6 +115,13 @@ const steps = {
92
115
  });
93
116
  },
94
117
 
118
+ /**
119
+ * Verify text in the input field of a table cell property.
120
+ * @param {Object} position - The position of the table cell property.
121
+ * @param {number} position.row - The row index (zero-based) of the table cell property.
122
+ * @param {number} position.column - The column index (zero-based) of the table cell property.
123
+ * @param {string} text - The text to verify in the input field.
124
+ */
95
125
  verifyTextInCellPropertyInputField: ({ row, column }, text) => {
96
126
  utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyRow(), row).within(() => {
97
127
  utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column).within(() => {
@@ -100,6 +130,36 @@ const steps = {
100
130
  });
101
131
  },
102
132
 
133
+ /**
134
+ * Verify placeholder text in the input field of a table cell property.
135
+ * @param {Object} position - The position of the table cell property.
136
+ * @param {number} position.row - The row index (zero-based) of the table cell property.
137
+ * @param {number} position.column - The column index (zero-based) of the table cell property.
138
+ * @param {string} text - The placeholder text to verify in the input field.
139
+ */
140
+ verifyPlaceholderTextInCellPropertyInputField: ({ row, column }, text) => {
141
+ utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyRow(), row).within(() => {
142
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column).within(() => {
143
+ gridQuestionCommonComponent.cellPropertyInputField()
144
+ .should('have.attr', 'data-cke-editorplaceholder', text);
145
+ });
146
+ });
147
+ },
148
+
149
+ /**
150
+ * Verify input field not exists in table cell property.
151
+ * @param {Object} position - The position of the table cell property.
152
+ * @param {number} position.row - The row index (zero-based) of the table cell property.
153
+ * @param {number} position.column - The column index (zero-based) of the table cell property.
154
+ */
155
+ verifyCellPropertyInputFieldNotExists: ({ row, column }) => {
156
+ utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyRow(), row).within(() => {
157
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column).within(() => {
158
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.cellPropertyInputField(), 'notExist');
159
+ });
160
+ });
161
+ },
162
+
103
163
  /**
104
164
  * Enters text into the input field of an option cell.
105
165
  * @param {Object} position - The position of the option cell.
@@ -332,6 +392,24 @@ const steps = {
332
392
  });
333
393
  },
334
394
 
395
+ /**
396
+ * Verify answer option button is not displayed in cell in the Specify Correct Answer section.
397
+ * @param {Object} position - The position of the option button.
398
+ * @param {number} position.row - The row index (zero-based) of the Specify Correct Answer section.
399
+ * @param {number} position.column - The column index (zero-based) of the option button.
400
+ */
401
+ verifyAnswerOptionButtonIsNotDisplayedInCellSpecifyCorrectAnswerSection: ({ row, column }) => {
402
+ utilities.getNthElement(gridQuestionCommonComponent.tableRowSpecifyCorrectAnswerSection(), row)
403
+ .within(() => {
404
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
405
+ .within(() => {
406
+ gridQuestionCommonComponent.optionsButton()
407
+ .find('svg')
408
+ .should('not.exist');
409
+ });
410
+ });
411
+ },
412
+
335
413
  /**
336
414
  * Unchecks an option in the Specify Correct Answer section of a grid question component.
337
415
  * @param {Object} cellPosition - The position of the option to uncheck, containing row and column indices.
@@ -567,6 +645,11 @@ const steps = {
567
645
  .should('be.checked');
568
646
  },
569
647
 
648
+ verifyEnableRowHeadingCheckboxUncheckedState: () => {
649
+ gridQuestionCommonComponent.enableRowHeadingCheckbox()
650
+ .should('not.be.checked');
651
+ },
652
+
570
653
  checkEnableRowHeadingCheckbox: () => {
571
654
  gridQuestionCommonComponent.enableRowHeadingCheckbox()
572
655
  .click()
@@ -615,6 +698,16 @@ const steps = {
615
698
  .click();
616
699
  },
617
700
 
701
+ clickOnRightPaginationButtonPreviewTab: () => {
702
+ gridQuestionCommonComponent.rightPaginationButtonPreviewTab()
703
+ .click();
704
+ },
705
+
706
+ clickOnLeftPaginationButtonPreviewTab: () => {
707
+ gridQuestionCommonComponent.leftPaginationButtonPreviewTab()
708
+ .click();
709
+ },
710
+
618
711
  /**
619
712
  * Verifies that questions are randomized in the preview tab of a grid question component.
620
713
  * @param {Array<string>} questionsArray - An array containing the original questions in their initial order.
@@ -658,6 +751,18 @@ const steps = {
658
751
  return questionsArray;
659
752
  },
660
753
 
754
+ /**
755
+ * @description Verify the number of columns in the edit cell property table
756
+ * @param {number} numberOfColumns Number of columns in the edit cell property table
757
+ */
758
+ verifyColumnsCountInEditCellPropertyTable: (numberOfColumns) => {
759
+ gridQuestionCommonComponent.editCellPropertyRow()
760
+ .eq(0)
761
+ .within(() => {
762
+ utilities.verifyElementCount(gridQuestionCommonComponent.tableCell(), numberOfColumns);
763
+ });
764
+ },
765
+
661
766
  /**
662
767
  * Verifies the presence of an error icon in the specified row of the Specify Columns and Rows grid.
663
768
  * @param {number} rowIndex - The index of the row to verify.
@@ -672,6 +777,215 @@ const steps = {
672
777
  });
673
778
  },
674
779
 
780
+ /**
781
+ * @description Verify the number of rows in the edit cell property table
782
+ * @param {number} numberOfRows Number of rows in the edit cell property table
783
+ */
784
+ verifyRowsCountInEditCellPropertyTable: (numberOfRows) => {
785
+ utilities.verifyElementCount(gridQuestionCommonComponent.editCellPropertyRow(), numberOfRows);
786
+ },
787
+
788
+ /**
789
+ * @description Verify the edit cell category table first row or column cell property
790
+ * @param {Object} position - The position of the table cell
791
+ * @param {number} position.row - The row index (zero-based) of the table cell property.
792
+ * @param {number} position.column - The column index (zero-based) of the table cell property.
793
+ * @param {("Heading" | "Subheading" | "Text" | "None")} cellPropertyType - Property of the table cell
794
+ */
795
+ verifyEditCellCategoryTableCellProperty: ({ row, column }, cellPropertyType) => {
796
+ utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyRow(), row)
797
+ .within(() => {
798
+ switch (cellPropertyType) {
799
+ case 'Heading':
800
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
801
+ .should('have.class', 'cell-content-heading');
802
+ break;
803
+ case 'Subheading':
804
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
805
+ .should('have.class', 'cell-content-subeading');
806
+ break;
807
+ case 'Text':
808
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
809
+ .should('have.class', 'cell-content-text');
810
+ break;
811
+ case 'None':
812
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
813
+ .should('have.class', 'cell-content-none')
814
+ .find('textarea')
815
+ .should('not.exist');
816
+ break;
817
+ case 'Radio button':
818
+ case 'Checkbox':
819
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
820
+ .should('have.class', 'cell-content-radio');
821
+ break;
822
+ case 'Radio button with text':
823
+ case 'Checkbox with text':
824
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
825
+ .should('have.class', 'cell-content-radio-text');
826
+ break;
827
+ case 'No radio button':
828
+ case 'No checkbox':
829
+ utilities.getNthElement(gridQuestionCommonComponent.tableCell(), column)
830
+ .should('have.class', 'cell-content-text');
831
+ break;
832
+ default:
833
+ throw new Error('Invalid cell property');
834
+ }
835
+ });
836
+ },
837
+
838
+ clickOnLeftPaginationButtonEditCellPropertyTable: () => {
839
+ gridQuestionCommonComponent.editCellPropertyTableLeftPaginationButton()
840
+ .click();
841
+ },
842
+
843
+ clickOnRightPaginationButtonEditCellPropertyTable: () => {
844
+ gridQuestionCommonComponent.editCellPropertyTableRightPaginationButton()
845
+ .click();
846
+ },
847
+
848
+ /**
849
+ * @description Verify column is visible in the edit cell category table
850
+ * @param {number} columnIndex Index of the column
851
+ */
852
+ verifyColumnIsVisibleInEditCellPropertyTable: (columnIndex) => {
853
+ gridQuestionCommonComponent.editCellPropertyRow()
854
+ .eq(0)
855
+ .within(() => {
856
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.tableCell().eq(columnIndex), 'visible');
857
+ });
858
+ },
859
+
860
+ /**
861
+ * @description Verify column is not visible in the edit cell category table
862
+ * @param {number} columnIndex Index of the column
863
+ */
864
+ verifyColumnIsNotVisibleInEditCellPropertyTable: (columnIndex) => {
865
+ gridQuestionCommonComponent.editCellPropertyRow()
866
+ .eq(0)
867
+ .within(() => {
868
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.tableCell().eq(columnIndex), 'hidden');
869
+ });
870
+ },
871
+
872
+ /**
873
+ * @description Verify column is visible in the specify correct answer table
874
+ * @param {number} columnIndex Index of the column
875
+ */
876
+ verifyColumnIsVisibleInSpecifyCorrectAnswerTable: (columnIndex) => {
877
+ gridQuestionCommonComponent.tableRowSpecifyCorrectAnswerSection()
878
+ .eq(0)
879
+ .within(() => {
880
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.tableCell().eq(columnIndex), 'visible');
881
+ });
882
+ },
883
+
884
+ /**
885
+ * @description Verify column is visible in the preview tab table
886
+ * @param {number} columnIndex Index of the column
887
+ */
888
+ verifyColumnIsVisibleInPreviewTabTable: (columnIndex) => {
889
+ gridQuestionCommonComponent.tableRowPreviewTab()
890
+ .eq(0)
891
+ .within(() => {
892
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.tableCell().eq(columnIndex), 'visible');
893
+ });
894
+ },
895
+
896
+ /**
897
+ * @description Verify the number of columns in the specify correct answer section table
898
+ * @param {number} numberOfColumns Number of columns in the specify correct answer section table
899
+ */
900
+ verifyColumnsCountInSpecifyCorrectAnswerSectionTable: (numberOfColumns) => {
901
+ gridQuestionCommonComponent.tableRowSpecifyCorrectAnswerSection()
902
+ .eq(0)
903
+ .within(() => {
904
+ utilities.verifyElementCount(gridQuestionCommonComponent.tableCell(), numberOfColumns);
905
+ });
906
+ },
907
+
908
+ /**
909
+ * @description Verify the number of rows in the specify correct answer section table
910
+ * @param {number} numberOfRows Number of rows in the specify correct answer section table
911
+ */
912
+ verifyRowsCountInSpecifyCorrectAnswerSectionTable: (numberOfRows) => {
913
+ utilities.verifyElementCount(gridQuestionCommonComponent.tableRowSpecifyCorrectAnswerSection(), numberOfRows);
914
+ },
915
+
916
+ /**
917
+ * @description Verify the number of columns in the preview tab table
918
+ * @param {number} numberOfColumns Number of columns in the preview tab table
919
+ */
920
+ verifyColumnsCountInPreviewTabTable: (numberOfColumns) => {
921
+ gridQuestionCommonComponent.tableRowPreviewTab()
922
+ .eq(0)
923
+ .within(() => {
924
+ utilities.verifyElementCount(gridQuestionCommonComponent.tableCell(), numberOfColumns)
925
+ });
926
+ },
927
+
928
+ /**
929
+ * @description Verify the number of rows in the preview tab table
930
+ * @param {number} numberOfRows Number of rows in the preview tab table
931
+ */
932
+ verifyRowsCountInPreviewTabTable: (numberOfRows) => {
933
+ utilities.verifyElementCount(gridQuestionCommonComponent.tableRowPreviewTab(), numberOfRows);
934
+ },
935
+
936
+ expandDefaultOptionDropdown: () => {
937
+ gridQuestionCommonComponent.defaultOptionDropdown()
938
+ .click();
939
+ },
940
+
941
+ expandDefaultTextDropdown: () => {
942
+ gridQuestionCommonComponent.defaultTextDropdown()
943
+ .click();
944
+ },
945
+
946
+ /**
947
+ * @param {('Checkboxes' or 'Radio buttons' | 'Checkboxes with text' or 'Radio buttons with text' |'No checkboxes' or 'No radio buttons' )} listOption
948
+ * @description this function selects an option from expanded default option dropdown
949
+ */
950
+ selectOptionFromDefaultOptionDropdown: (listOption) => {
951
+ gridQuestionCommonComponent.defaultOptionDropdownListOptions(listOption)
952
+ .click();
953
+ },
954
+
955
+ /**
956
+ * @param {('True / False'| 'Yes / No'|'Agree / Disagree'|'Custom')} listOption
957
+ * @description this function selects an option from expanded default text dropdown
958
+ */
959
+ selectOptionFromDefaultTextDropdown: (listOption) => {
960
+ gridQuestionCommonComponent.defaultTextDropdownListOptions(listOption)
961
+ .click();
962
+ },
963
+
964
+ /**
965
+ * Expand cell property menu of a table cell at the specified row and column.
966
+ * @param {Object} position - The position of the table cell to modify.
967
+ * @param {number} position.row - The row index (zero-based) of the table cell.
968
+ * @param {number} position.column - The column index (zero-based) of the table cell.
969
+ */
970
+ expandCellPropertyMenu: ({ row, column }) => {
971
+ utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyRow(), row).within(() => {
972
+ utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyButton(), column)
973
+ .scrollIntoView()
974
+ .click();
975
+ });
976
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.editCellPropertyList(), 'visible');
977
+ },
978
+
979
+ /**
980
+ * @description Verify cell property menu item is selected
981
+ * @param {string} cellType Selected cell property menu option
982
+ */
983
+ verifyCellPropertyMenuOptionIsSelected: (cellType) => {
984
+ gridQuestionCommonComponent.editCellPropertyListOption()
985
+ .contains(`${cellType}`, { matchCase: false })
986
+ .should('have.class', 'Mui-selected');
987
+ },
988
+
675
989
  /**
676
990
  * Verifies the absence of an error icon in the specified row of the Specify Columns and Rows grid.
677
991
  * @param {number} rowIndex - The index of the row to verify.
@@ -705,6 +1019,319 @@ const tests = {
705
1019
 
706
1020
  });
707
1021
  },
1022
+
1023
+ /**
1024
+ * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
1025
+ * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
1026
+ * @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
1027
+ */
1028
+ verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
1029
+ it(`The user should be able to check an option in the ${accordionName} accordion`, () => {
1030
+ gridQuestionCommonComponent.steps.setAnswerInSpecifyCorrectAnswerSection({ row: 1, column: 0 });
1031
+ });
1032
+
1033
+ it(`When the user has unchecked all the options in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
1034
+ gridQuestionCommonComponent.steps.uncheckOptionInSpecifyCorrectAnswerSection({ row: 1, column: 0 });
1035
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible')
1036
+ utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
1037
+ if (accordionName == 'Correct') {
1038
+ autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1039
+ .within(() => {
1040
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1041
+ });
1042
+ } else {
1043
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1044
+ .within(() => {
1045
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1046
+ });
1047
+ };
1048
+ });
1049
+
1050
+ autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredCorrectAnswerErrorMessageCSSAndA11y();
1051
+
1052
+ it('When the user checks an option in the question grid, the error message should disappear', () => {
1053
+ gridQuestionCommonComponent.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
1054
+ commonComponents.steps.verifyErrorMessageIsNotDisplayed();
1055
+ });
1056
+
1057
+ autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
1058
+
1059
+ it('CSS of \'Correct\' accordion contents', { tags: 'css' }, () => {
1060
+ gridQuestionCommonComponent.gridSpecifyCorrectAnswerSection()
1061
+ .within(() => {
1062
+ utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell().parent(), 1), {
1063
+ 'background-color': css.color.matrixHeadingCellBg,
1064
+ 'border-color': `${css.color.matrixCellBorder}`
1065
+ });
1066
+ utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell().parent(), 6), {
1067
+ 'background-color': css.color.matrixSubheadingCellBg,
1068
+ 'border-color': `${css.color.matrixCellBorder}`
1069
+ });
1070
+ utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell().parent(), 9), {
1071
+ 'background-color': css.color.defaultBackground,
1072
+ 'border-color': `${css.color.matrixCellBorder}`
1073
+ });
1074
+ utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.optionsButton, 0), {
1075
+ 'background-color': css.color.matrixHeadingCellBg,
1076
+ 'color': `${css.color.matrixCellBorder}`
1077
+ });
1078
+ utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.optionsButton, 0).find('svg'), {
1079
+ 'color': css.color.activeButtons
1080
+ });
1081
+ utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell(), 1).find('.question-text-wrapper'), {
1082
+ 'color': css.color.text,
1083
+ 'font-size': css.fontSize.heading,
1084
+ 'font-weight': css.fontWeight.bold
1085
+ });
1086
+ utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell(), 6).find('.question-text-wrapper'), {
1087
+ 'color': css.color.text,
1088
+ 'font-size': css.fontSize.default,
1089
+ 'font-weight': css.fontWeight.bold
1090
+ });
1091
+ utilities.verifyCSS(utilities.getNthElement(gridQuestionCommonComponent.tableCell(), 9).find('.question-text-wrapper'), {
1092
+ 'color': css.color.text,
1093
+ 'font-size': css.fontSize.default,
1094
+ 'font-weight': css.fontWeight.regular
1095
+ });
1096
+ });
1097
+ });
1098
+
1099
+ it('Accessibility of \'Correct\' accordion contents', { tags: 'a11y' }, () => {
1100
+ cy.checkAccessibility(gridQuestionCommonComponent.tableCell().parents('.correct-answer-accordion'));
1101
+ });
1102
+ },
1103
+
1104
+ /**
1105
+ * Verifies the contents of the 'Default options' dropdown
1106
+ * @param {{'Multiple selection grid' | 'Single selection grid'}} questionType - The name of the question type to be used for validation.
1107
+ * @example - verifyDefaultOptionLabelAndDropdown('Multiple selection grid');
1108
+ */
1109
+ verifyDefaultOptionLabelAndDropdown: (questionType) => {
1110
+ const cellPropertyArray = (questionType === 'Multiple selection grid') ?
1111
+ ['Checkboxes', 'Checkboxes with text', 'No checkboxes'] :
1112
+ ['Radio buttons', 'Radio buttons with text', 'No radio buttons'];
1113
+
1114
+ it(`'Default option' label and dropdown should be displayed and in 'Default option' dropdown '${cellPropertyArray[0]}' option should be selected by default`, () => {
1115
+ utilities.verifyInnerText(gridQuestionCommonComponent.defaultOptionLabel(), 'Default option');
1116
+ utilities.verifyInnerText(gridQuestionCommonComponent.defaultOptionDropdown(), cellPropertyArray[0]);
1117
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.defaultOptionDropdown(), 'visible');
1118
+ });
1119
+
1120
+ it(`Clicking on default option dropdown should open a list of default option types - ${cellPropertyArray}`, () => {
1121
+ gridQuestionCommonComponent.steps.expandDefaultOptionDropdown()
1122
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.defaultOptionDropdownListOptions().eq(0), 'visible')
1123
+ cellPropertyArray.forEach((option, count) => {
1124
+ utilities.verifyInnerText(utilities.getNthElement(gridQuestionCommonComponent.defaultOptionDropdownListOptions(), count), option);
1125
+ });
1126
+ });
1127
+
1128
+ it('CSS of default option type dropdown in active state', { tags: 'css' }, () => {
1129
+ utilities.verifyCSS(gridQuestionCommonComponent.defaultOptionDropdownListOptions().eq(0), {
1130
+ 'color': css.color.liText,
1131
+ 'font-size': css.fontSize.default,
1132
+ 'font-weight': css.fontWeight.regular,
1133
+ 'background-color': css.color.liTextSelectedBg
1134
+ })
1135
+ utilities.verifyCSS(gridQuestionCommonComponent.defaultOptionDropdownListOptions().eq(1), {
1136
+ 'background-color': css.color.transparent
1137
+ });
1138
+ });
1139
+
1140
+ it('Accessibility of default option type dropdown in active state', { tags: 'a11y' }, () => {
1141
+ cy.checkAccessibility(commonComponents.dropdownList())
1142
+ });
1143
+
1144
+ it('On selecting an option from the default option dropdown, the dropdown should close', () => {
1145
+ gridQuestionCommonComponent.steps.selectOptionFromDefaultOptionDropdown(cellPropertyArray[1]);
1146
+ utilities.verifyElementVisibilityState(commonComponents.dropdownList(), 'notExist');
1147
+ });
1148
+
1149
+ it('CSS of default option section', { tags: 'css' }, () => {
1150
+ utilities.verifyCSS(gridQuestionCommonComponent.defaultOptionLabel(), {
1151
+ 'color': css.color.labels,
1152
+ 'font-size': css.fontSize.normal,
1153
+ 'font-weight': css.fontWeight.semibold
1154
+ });
1155
+ utilities.verifyCSS(gridQuestionCommonComponent.defaultOptionDropdown().find('.dropdown-label-text'), {
1156
+ 'color': css.color.liText,
1157
+ 'font-size': css.fontSize.default,
1158
+ 'font-weight': css.fontWeight.regular
1159
+ });
1160
+ });
1161
+ },
1162
+
1163
+ verifyDefaultTextLabelAndDropdown: () => {
1164
+ const defaultTextDropdown = ['True / false', 'Yes / no', 'Agree / disagree', 'Custom'];
1165
+ it(`\'Default text\' label and dropdown should be displayed and in \'Default text\' dropdown \'${defaultTextDropdown[0]}\' option should be selected by default`, () => {
1166
+ utilities.verifyInnerText(gridQuestionCommonComponent.defaultTextLabel(), 'Default text');
1167
+ utilities.verifyInnerText(gridQuestionCommonComponent.defaultTextDropdown(), defaultTextDropdown[0]);
1168
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.defaultTextDropdown(), 'visible');
1169
+ });
1170
+
1171
+ it(`Clicking on default option dropdown should open a list of default option types - ${defaultTextDropdown}`, () => {
1172
+ gridQuestionCommonComponent.steps.expandDefaultTextDropdown()
1173
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.defaultTextDropdownListOptions().eq(0), 'visible')
1174
+ defaultTextDropdown.forEach((option, count) => {
1175
+ utilities.verifyInnerText(utilities.getNthElement(gridQuestionCommonComponent.defaultTextDropdownListOptions(), count), option);
1176
+ });
1177
+ });
1178
+
1179
+ it('CSS of default text type dropdown in active state', { tags: 'css' }, () => {
1180
+ utilities.verifyCSS(gridQuestionCommonComponent.defaultTextDropdownListOptions().eq(0), {
1181
+ 'color': css.color.liText,
1182
+ 'font-size': css.fontSize.default,
1183
+ 'font-weight': css.fontWeight.regular,
1184
+ 'background-color': css.color.liTextSelectedBg
1185
+ })
1186
+ utilities.verifyCSS(gridQuestionCommonComponent.defaultTextDropdownListOptions().eq(1), {
1187
+ 'background-color': css.color.transparent
1188
+ });
1189
+ });
1190
+
1191
+ it('Accessibility of default text type dropdown in active state', { tags: 'a11y' }, () => {
1192
+ cy.checkAccessibility(commonComponents.dropdownList())
1193
+ });
1194
+
1195
+ it('On selecting an option from the default option dropdown, the dropdown should close', () => {
1196
+ gridQuestionCommonComponent.steps.selectOptionFromDefaultTextDropdown(defaultTextDropdown[0]);
1197
+ utilities.verifyElementVisibilityState(commonComponents.dropdownList(), 'notExist');
1198
+ });
1199
+
1200
+ it('CSS of default option section', { tags: 'css' }, () => {
1201
+ utilities.verifyCSS(gridQuestionCommonComponent.defaultTextLabel(), {
1202
+ 'color': css.color.labels,
1203
+ 'font-size': css.fontSize.normal,
1204
+ 'font-weight': css.fontWeight.semibold
1205
+ });
1206
+ utilities.verifyCSS(gridQuestionCommonComponent.defaultTextDropdown().find('.dropdown-label-text'), {
1207
+ 'color': css.color.liText,
1208
+ 'font-size': css.fontSize.default,
1209
+ 'font-weight': css.fontWeight.regular
1210
+ });
1211
+ });
1212
+ },
1213
+
1214
+ verifyHeaderRowCellPropertyMenu: () => {
1215
+ const headerRowCellPropertyMenuOptions = ['Heading', 'Subheading', 'Text', 'None']
1216
+ it(`When user expands cell property menu of header row cell, then ${headerRowCellPropertyMenuOptions.join('')} option should be displayed with the corresponding cell property displayed as active selection`, () => {
1217
+ gridQuestionCommonComponent.steps.expandCellPropertyMenu({ row: 0, column: 0 });
1218
+ headerRowCellPropertyMenuOptions.forEach((cellType, index) => {
1219
+ utilities.verifyInnerText(utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyListOption(), index), cellType);
1220
+ });
1221
+ gridQuestionCommonComponent.steps.verifyCellPropertyMenuOptionIsSelected(headerRowCellPropertyMenuOptions[3]);
1222
+ });
1223
+
1224
+ it('CSS of cell property menu in active state', { tags: 'css' }, () => {
1225
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyButton().eq(5).find('g g'), {
1226
+ 'fill': css.color.primaryBtn
1227
+ });
1228
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyButton().eq(0).find('g g'), {
1229
+ 'fill': css.color.selectToolbarOptionBg
1230
+ });
1231
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().find('span[class*="MuiListItemText"]'), {
1232
+ 'color': css.color.liText,
1233
+ 'font-size': css.fontSize.default,
1234
+ 'font-weight': css.fontWeight.regular
1235
+ });
1236
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(0).find('span').eq(0), {
1237
+ 'fill': css.color.liText
1238
+ });
1239
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(1).find('span').eq(0), {
1240
+ 'fill': css.color.liText
1241
+ });
1242
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(2).find('span').eq(0), {
1243
+ 'fill': css.color.liText
1244
+ });
1245
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(3).find('span').eq(0), {
1246
+ 'fill': css.color.liText
1247
+ });
1248
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(0), {
1249
+ 'background-color': css.color.defaultBackground
1250
+ });
1251
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(3), {
1252
+ 'background-color': css.color.liTextSelectedBg
1253
+ });
1254
+ });
1255
+
1256
+ it('Accessibility of cell property menu in active state', { tags: 'a11y' }, () => {
1257
+ cy.checkAccessibility(gridQuestionCommonComponent.editCellPropertyList())
1258
+ });
1259
+
1260
+ it('On selecting an option from the default option dropdown, the dropdown should close', () => {
1261
+ gridQuestionCommonComponent.editCellPropertyListOption()
1262
+ .contains('None', { matchCase: false })
1263
+ .click();
1264
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.editCellPropertyList(), 'notExist');
1265
+ });
1266
+
1267
+ headerRowCellPropertyMenuOptions.forEach((cellType) => {
1268
+ it(`When user selects ${cellType} option from the cell property menu, the table cell should be set to ${cellType}`, () => {
1269
+ gridQuestionCommonComponent.steps.modifyTableCellProperty({ row: 0, column: 0 }, cellType);
1270
+ gridQuestionCommonComponent.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 0 }, cellType);
1271
+ });
1272
+ });
1273
+ },
1274
+
1275
+ verifyFirstColumnCellPropertyMenu: () => {
1276
+ const firstColumnCellPropertyMenuOptions = ['Heading', 'Subheading', 'Text']
1277
+ it(`When user expands cell property menu of first column cell, then ${firstColumnCellPropertyMenuOptions.join('')} option should be displayed with the corresponding cell property displayed as active selection`, () => {
1278
+ gridQuestionCommonComponent.steps.expandCellPropertyMenu({ row: 1, column: 0 });
1279
+ firstColumnCellPropertyMenuOptions.forEach((cellType, index) => {
1280
+ utilities.verifyInnerText(utilities.getNthElement(gridQuestionCommonComponent.editCellPropertyListOption(), index), cellType);
1281
+ });
1282
+ gridQuestionCommonComponent.steps.verifyCellPropertyMenuOptionIsSelected(firstColumnCellPropertyMenuOptions[2]);
1283
+ });
1284
+
1285
+ it('CSS of cell property menu in active state', { tags: 'css' }, () => {
1286
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyButton().eq(5).find('g g'), {
1287
+ 'fill': css.color.primaryBtn
1288
+ });
1289
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyButton().eq(3).find('g g'), {
1290
+ 'fill': css.color.selectToolbarOptionBg
1291
+ });
1292
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().find('span[class*="MuiListItemText"]'), {
1293
+ 'color': css.color.liText,
1294
+ 'font-size': css.fontSize.default,
1295
+ 'font-weight': css.fontWeight.regular
1296
+ });
1297
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(0).find('span').eq(0), {
1298
+ 'fill': css.color.liText
1299
+ });
1300
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(1).find('span').eq(0), {
1301
+ 'fill': css.color.liText
1302
+ });
1303
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(2).find('span').eq(0), {
1304
+ 'fill': css.color.liText
1305
+ });
1306
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(3).find('span').eq(0), {
1307
+ 'fill': css.color.liText
1308
+ });
1309
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(0), {
1310
+ 'background-color': css.color.defaultBackground
1311
+ });
1312
+ utilities.verifyCSS(gridQuestionCommonComponent.editCellPropertyListOption().eq(2), {
1313
+ 'background-color': css.color.liTextSelectedBg
1314
+ });
1315
+ });
1316
+
1317
+ it('Accessibility of cell property menu in active state', { tags: 'a11y' }, () => {
1318
+ cy.checkAccessibility(gridQuestionCommonComponent.editCellPropertyList())
1319
+ });
1320
+
1321
+ it('On selecting an option from the default option dropdown, the dropdown should close', () => {
1322
+ gridQuestionCommonComponent.editCellPropertyListOption()
1323
+ .contains('Heading', { matchCase: false })
1324
+ .click();
1325
+ utilities.verifyElementVisibilityState(gridQuestionCommonComponent.editCellPropertyList(), 'notExist');
1326
+ });
1327
+
1328
+ firstColumnCellPropertyMenuOptions.forEach((cellType) => {
1329
+ it(`When user selects ${cellType} option from the cell property menu, the table cell should be set to ${cellType}`, () => {
1330
+ gridQuestionCommonComponent.steps.modifyTableCellProperty({ row: 1, column: 0 }, cellType);
1331
+ gridQuestionCommonComponent.steps.verifyEditCellCategoryTableCellProperty({ row: 1, column: 0 }, cellType);
1332
+ });
1333
+ });
1334
+ },
708
1335
  }
709
1336
 
710
1337
  export const gridQuestionCommonComponent = {