itemengine-cypress-automation 1.0.166 → 1.0.169-uploadResponseMigration-83ab996.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/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +11 -22
  3. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +7 -18
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +6 -11
  5. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -0
  6. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +36 -2
  7. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +34 -22
  8. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +24 -8
  9. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +25 -5
  10. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +114 -68
  11. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +111 -67
  12. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +123 -71
  13. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +63 -41
  14. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +25 -21
  15. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +85 -50
  16. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -68
  17. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +98 -54
  18. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +120 -72
  19. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
  20. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
  21. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
  22. package/cypress/fixtures/theme/ilc.json +26 -14
  23. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
  24. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +0 -3
  25. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  26. package/cypress/pages/components/colorPopupComponent.js +2 -2
  27. package/cypress/pages/components/gridQuestionCommonComponent.js +2 -629
  28. package/cypress/pages/components/index.js +0 -3
  29. package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
  30. package/cypress/pages/components/measuringToolComponent.js +2 -2
  31. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  32. package/cypress/pages/components/setPointsPopupBase.js +4 -6
  33. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +3 -60
  34. package/cypress/pages/components/toolSettingsComponent.js +12 -80
  35. package/cypress/pages/dragAndDropIntoCategoriesPage.js +8 -0
  36. package/cypress/pages/feedbackScalePage.js +449 -591
  37. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -3
  38. package/cypress/pages/graphingPage.js +145 -9
  39. package/cypress/pages/gridFillPage.js +120 -135
  40. package/cypress/pages/highlightPage.js +394 -0
  41. package/cypress/pages/index.js +2 -5
  42. package/cypress/pages/matchingPage.js +20 -78
  43. package/cypress/pages/multipleSelectionGridPage.js +1 -88
  44. package/cypress/pages/singleSelectionGridPage.js +0 -86
  45. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +38 -1
  46. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
  47. package/cypress/support/migrationHelpers/migrationScript.js +4 -0
  48. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +34 -2
  49. package/package.json +2 -2
  50. package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +0 -83
  51. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +0 -200
  52. package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +0 -56
  53. package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -95
  54. package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +0 -71
  55. package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +0 -72
  56. package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +0 -71
  57. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
  58. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
  59. package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
  60. package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +0 -308
  61. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +0 -216
  62. package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +0 -336
  63. package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +0 -570
  64. package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +0 -214
  65. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
  66. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
  67. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -355
  68. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +0 -309
  69. package/cypress/e2e/ILC/Matching/toolSettings.js +0 -72
  70. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +0 -1033
  71. package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
  72. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +0 -236
  73. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -239
  74. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -278
  75. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +0 -178
  76. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +0 -407
  77. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +0 -273
  78. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +0 -278
  79. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +0 -228
  80. package/cypress/e2e/ILC/NumberLine/additionalSettings.js +0 -120
  81. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +0 -659
  82. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +0 -149
  83. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +0 -151
  84. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -171
  85. package/cypress/e2e/ILC/NumberLine/headerSection.js +0 -76
  86. package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -54
  87. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +0 -200
  88. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +0 -67
  89. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +0 -135
  90. package/cypress/e2e/ILC/NumberLine/toolSettings.js +0 -73
  91. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +0 -372
  92. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +0 -1014
  93. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -235
  94. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -235
  95. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -235
  96. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -457
  97. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -342
  98. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -342
  99. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -342
  100. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -155
  101. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -314
  102. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -275
  103. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -314
  104. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -290
  105. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -142
  106. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +0 -137
  107. package/cypress/pages/brainingCampManipulativePage.js +0 -122
  108. package/cypress/pages/components/defaultToolDropdown.js +0 -77
  109. package/cypress/pages/components/resetPopupComponent.js +0 -74
  110. package/cypress/pages/components/toolsAndControlsComponent.js +0 -69
  111. package/cypress/pages/feedbackScalePage copy.js +0 -716
  112. package/cypress/pages/numberLinePage.js +0 -723
  113. package/cypress/pages/textSelectionPage.js +0 -582
@@ -1,1014 +0,0 @@
1
- import { singleSelectionGridPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
-
6
- describe('Create item page - Single selection grid: Question instructions, Specify rows and columns section', () => {
7
- before(() => {
8
- cy.loginAs('admin');
9
- });
10
-
11
- describe('Question instructions input field - Edit tab', () => {
12
- abortEarlySetup();
13
- before(() => {
14
- singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
15
- cy.barsPreLoaderWait();
16
- });
17
-
18
- singleSelectionGridPage.tests.verifyQuestionInstructionsInputFieldEditTab();
19
- });
20
-
21
- describe('Question instructions input field - Preview tab', () => {
22
- abortEarlySetup();
23
- before(() => {
24
- singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
25
- cy.barsPreLoaderWait();
26
- });
27
-
28
- singleSelectionGridPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
29
- });
30
-
31
- describe('Specify columns and rows - Columns and Options rows input steppers, Enable row heading checkbox - Contents and specify columns and rows table', () => {
32
- abortEarlySetup();
33
- before(() => {
34
- singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
35
- cy.barsPreLoaderWait();
36
- });
37
-
38
- singleSelectionGridPage.tests.verifySpecifyColumnsAndRowsDefaultInputSteppers();
39
-
40
- it('\'Enable row heading\' label and checkbox should be displayed and by default it should be checked', () => {
41
- utilities.verifyInnerText(singleSelectionGridPage.enableRowHeadingLabel(), 'Enable row heading');
42
- utilities.verifyElementVisibilityState(singleSelectionGridPage.enableRowHeadingLabel(), 'visible');
43
- utilities.verifyElementVisibilityState(singleSelectionGridPage.enableRowHeadingCheckbox(), 'exist');
44
- singleSelectionGridPage.steps.verifyEnableRowHeadingCheckboxCheckedState();
45
- });
46
-
47
- it('User should be able to uncheck the \'Enable row heading\' checkbox', () => {
48
- singleSelectionGridPage.steps.uncheckEnableRowHeadingCheckbox();
49
- });
50
-
51
- it('When user has unchecked the \'Enable row heading\' checkbox, then column input stepper value should not change and header row should not be displayed in the edit cell category table', () => {
52
- singleSelectionGridPage.steps.verifyRowsInputStepperCountInputFieldValue(4);
53
- singleSelectionGridPage.steps.verifyRowsCountInEditCellPropertyTable(4);
54
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 0 }, 'Text');
55
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 1 }, 'Radio button');
56
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 2 }, 'Radio button');
57
- });
58
-
59
- //Columns and rows input steppers functionality
60
- it('When user increases the number of columns in the column input stepper using the increase button, then the count of input stepper and the number of columns in the table displayed in \'Specify columns and rows\' section should increase', () => {
61
- singleSelectionGridPage.steps.increaseColumnInputStepperCount(1);
62
- singleSelectionGridPage.steps.verifyColumnInputStepperCountInputFieldValue(4);
63
- singleSelectionGridPage.steps.verifyColumnsCountInEditCellPropertyTable(4);
64
- });
65
-
66
- it('When user has increased the number of columns, then the \'Default text\' label and dropdown should not be displayed', () => {
67
- utilities.verifyElementVisibilityState(singleSelectionGridPage.defaultTextLabel(), 'notExist');
68
- utilities.verifyElementVisibilityState(singleSelectionGridPage.defaultTextDropdown(), 'notExist');
69
- });
70
-
71
- it('When user decreases the number of rows in the option row input stepper using the decrease button, then the count of input stepper and the number of rows in the table displayed in \'Specify columns and rows\' section should decrease', () => {
72
- singleSelectionGridPage.steps.decreaseRowInputStepperCount(1);
73
- singleSelectionGridPage.steps.verifyRowsInputStepperCountInputFieldValue(3);
74
- singleSelectionGridPage.steps.verifyRowsCountInEditCellPropertyTable(3);
75
- });
76
-
77
- it('User should be able to edit the number of rows and columns by directly giving an input in the input steppers and the table should be updated', () => {
78
- singleSelectionGridPage.steps.addInputToColumnInputStepper(5);
79
- singleSelectionGridPage.steps.addInputToRowInputStepper(5);
80
- singleSelectionGridPage.steps.verifyColumnsCountInEditCellPropertyTable(5);
81
- singleSelectionGridPage.steps.verifyRowsCountInEditCellPropertyTable(5);
82
- });
83
-
84
- it('When the user increases the number of rows to 25 using the input stepper increase button, then the increase button should get disabled', () => {
85
- singleSelectionGridPage.steps.increaseRowInputStepperCount(20);
86
- singleSelectionGridPage.steps.verifyRowsInputStepperCountInputFieldValue(25);
87
- singleSelectionGridPage.steps.verifyRowsCountInEditCellPropertyTable(25);
88
- singleSelectionGridPage.steps.verifyRowInputStepperIncreaseButtonIsDisabled();
89
- });
90
-
91
- it('When the user decreases the number of columns to 1 using the input stepper decrease button, then the decrease button should get disabled', () => {
92
- singleSelectionGridPage.steps.decreaseColumnInputStepperCount(4);
93
- singleSelectionGridPage.steps.verifyColumnInputStepperCountInputFieldValue(1);
94
- singleSelectionGridPage.steps.verifyColumnsCountInEditCellPropertyTable(1);
95
- singleSelectionGridPage.steps.verifyColumnInputStepperDecreaseButtonIsDisabled();
96
- });
97
-
98
- it('When the user gives an input value lower than 1 i.e. 0 in the rows input stepper, then the columns value should be reset to 1', () => {
99
- singleSelectionGridPage.steps.addInputToRowInputStepper(0);
100
- singleSelectionGridPage.steps.verifyRowsInputStepperCountInputFieldValue(1);
101
- });
102
-
103
- it('When the user gives an input value greater than 25 in the columns input stepper, then the columns value should be reset to 25', () => {
104
- singleSelectionGridPage.steps.addInputToColumnInputStepper(30);
105
- singleSelectionGridPage.steps.verifyColumnInputStepperCountInputFieldValue(25);
106
- });
107
-
108
- it('When \'Enable row heading\' checkbox is checked, then header row should be displayed in the table and row input stepper count should not change', () => {
109
- cy.log('Pre-step: Setting columns and rows value to default state');
110
- singleSelectionGridPage.steps.addInputToColumnInputStepper(3);
111
- singleSelectionGridPage.steps.addInputToRowInputStepper(4);
112
- singleSelectionGridPage.steps.checkEnableRowHeadingCheckbox();
113
- singleSelectionGridPage.steps.verifyRowsInputStepperCountInputFieldValue(4);
114
- singleSelectionGridPage.steps.verifyRowsCountInEditCellPropertyTable(5);
115
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 0 }, 'None');
116
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 1 }, 'Heading');
117
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 2 }, 'Heading');
118
- });
119
-
120
- it('When the number of columns do not exceed the table viewport, then the left and right pagination button should not be displayed in the \'Specify columns and rows\' table', () => {
121
- utilities.verifyElementVisibilityState(singleSelectionGridPage.editCellPropertyTableLeftPaginationButton(), 'notExist');
122
- utilities.verifyElementVisibilityState(singleSelectionGridPage.editCellPropertyTableRightPaginationButton(), 'notExist');
123
- });
124
-
125
- it('When user has added columns such that they exceed the table viewport, then the left and right pagination button should be displayed in the \'Specify columns and rows\' table', () => {
126
- singleSelectionGridPage.steps.addInputToColumnInputStepper(8);
127
- utilities.verifyElementVisibilityState(singleSelectionGridPage.editCellPropertyTableLeftPaginationButton(), 'visible');
128
- utilities.verifyElementVisibilityState(singleSelectionGridPage.editCellPropertyTableRightPaginationButton(), 'visible');
129
- });
130
-
131
- it('By default the left pagination button should be disabled in \'Specify columns and rows\' table', () => {
132
- utilities.verifyElementDisabled(singleSelectionGridPage.editCellPropertyTableLeftPaginationButton());
133
- });
134
-
135
- it('When user clicks on the right pagination button, then the table should be scrolled by one column towards its right and the left pagination button should now be enabled and the first column should still be visible', () => {
136
- cy.log('Pre-step: Setting number of columns to 15');
137
- singleSelectionGridPage.steps.addInputToColumnInputStepper(15);
138
- singleSelectionGridPage.steps.clickOnRightPaginationButtonEditCellPropertyTable();
139
- singleSelectionGridPage.steps.clickOnRightPaginationButtonEditCellPropertyTable();
140
- singleSelectionGridPage.steps.clickOnRightPaginationButtonEditCellPropertyTable();
141
- singleSelectionGridPage.steps.clickOnRightPaginationButtonEditCellPropertyTable();
142
- singleSelectionGridPage.steps.verifyColumnIsVisibleInEditCellPropertyTable(0);
143
- singleSelectionGridPage.steps.verifyColumnIsVisibleInEditCellPropertyTable(8);
144
- singleSelectionGridPage.steps.verifyColumnIsNotVisibleInEditCellPropertyTable(1);
145
- utilities.verifyElementNotDisabled(singleSelectionGridPage.editCellPropertyTableLeftPaginationButton());
146
- });
147
-
148
- it('When user has navigated to the rightmost column of the table, then the right pagination button should be disabled', () => {
149
- for (let index = 0; index < 4; index++) {
150
- singleSelectionGridPage.steps.clickOnRightPaginationButtonEditCellPropertyTable();
151
- }
152
- utilities.verifyElementDisabled(singleSelectionGridPage.editCellPropertyTableRightPaginationButton());
153
- });
154
-
155
- it('When user clicks on the left pagination button, then the table should be scrolled by one column towards its left and the right pagination button should be enabled', () => {
156
- singleSelectionGridPage.steps.clickOnLeftPaginationButtonEditCellPropertyTable();
157
- singleSelectionGridPage.steps.verifyColumnIsVisibleInEditCellPropertyTable(8);
158
- singleSelectionGridPage.steps.verifyColumnIsNotVisibleInEditCellPropertyTable(14);
159
- utilities.verifyElementNotDisabled(singleSelectionGridPage.editCellPropertyTableRightPaginationButton());
160
- });
161
-
162
- it('When user has navigated towards the left using the left pagination button, then the right pagination button should be enabled again', () => {
163
- for (let index = 10; index < 15; index++) {
164
- singleSelectionGridPage.steps.clickOnLeftPaginationButtonEditCellPropertyTable();
165
- }
166
- utilities.verifyElementDisabled(singleSelectionGridPage.editCellPropertyTableLeftPaginationButton());
167
- });
168
-
169
- it('When the number of columns is reduced such that they do not exceed the table viewport, then the then the left and right pagination button should not be displayed in the \'Specify columns and rows\' table', () => {
170
- singleSelectionGridPage.steps.addInputToColumnInputStepper(7);
171
- utilities.verifyElementVisibilityState(singleSelectionGridPage.editCellPropertyTableLeftPaginationButton(), 'notExist');
172
- utilities.verifyElementVisibilityState(singleSelectionGridPage.editCellPropertyTableRightPaginationButton(), 'notExist');
173
- });
174
-
175
- it('CSS of \'Enable row heading checkbox\'', { tags: 'css' }, () => {
176
- utilities.verifyCSS(multipleSelectionGridPage.enableRowHeadingLabel(), {
177
- 'color': css.color.labels,
178
- 'font-size': css.fontSize.normal,
179
- 'font-weight': css.fontWeight.regular
180
- });
181
- utilities.verifyCSS(multipleSelectionGridPage.enableRowHeadingCheckbox().parent().find('g').eq(1), {
182
- 'fill': css.color.activeButtons
183
- });
184
- });
185
-
186
- //A11y covered in test function
187
- });
188
-
189
- describe('Specify columns and rows - Columns and Options rows input steppers, Enable row heading checkbox - Specify correct answer table', () => {
190
- abortEarlySetup();
191
- before(() => {
192
- singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
193
- cy.barsPreLoaderWait();
194
- });
195
-
196
- it('When \'Enable row heading\' checkbox is checked, then header row should be displayed in the specify correct answer table', () => {
197
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 0 }, 'None');
198
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 1 }, 'Heading');
199
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 2 }, 'Heading');
200
- singleSelectionGridPage.steps.verifyRowsCountInSpecifyCorrectAnswerSectionTable(5);
201
- singleSelectionGridPage.steps.verifyRowsInputStepperCountInputFieldValue(4);
202
- });
203
-
204
- it('When \'Enable row heading\' checkbox is unchecked, then header row should not be displayed in the specify correct answer table and row input stepper value should not change', () => {
205
- singleSelectionGridPage.steps.uncheckEnableRowHeadingCheckbox();
206
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 0 }, 'Text');
207
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 1 }, 'Radio button');
208
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 2 }, 'Radio button');
209
- singleSelectionGridPage.steps.verifyRowsCountInSpecifyCorrectAnswerSectionTable(4);
210
- singleSelectionGridPage.steps.verifyRowsInputStepperCountInputFieldValue(4);
211
- });
212
-
213
- it('When user increases the number of columns in the column input stepper using the increase button, then number of columns should also increase in the table displayed in \'Specify correct answer\' section', () => {
214
- singleSelectionGridPage.steps.increaseColumnInputStepperCount(1);
215
- singleSelectionGridPage.steps.verifyColumnsCountInSpecifyCorrectAnswerSectionTable(4);
216
- });
217
-
218
- it('When user decreases the number of columns in the column input stepper using the decrease button, then number of columns should also decrease in the table displayed in \'Specify correct answer\' section', () => {
219
- singleSelectionGridPage.steps.decreaseColumnInputStepperCount(1);
220
- singleSelectionGridPage.steps.verifyColumnsCountInSpecifyCorrectAnswerSectionTable(3);
221
- });
222
-
223
- it('When user increases the number of rows in the row input stepper using the increase button, then number of rows should also increase in the table displayed in \'Specify correct answer\' section', () => {
224
- singleSelectionGridPage.steps.increaseRowInputStepperCount(1);
225
- singleSelectionGridPage.steps.verifyRowsCountInSpecifyCorrectAnswerSectionTable(5);
226
- });
227
-
228
- it('When user decreases the number of rows in the row input stepper using the decrease button, then number of rows should also decrease in the table displayed in \'Specify correct answer\' section', () => {
229
- singleSelectionGridPage.steps.decreaseRowInputStepperCount(1);
230
- singleSelectionGridPage.steps.verifyRowsCountInSpecifyCorrectAnswerSectionTable(4);
231
- });
232
-
233
- it('When user updates the number of rows and columns by directly giving an input in the input steppers, then the number of rows and columns should also be updated in the table displayed in \'Specify correct answer\' section', () => {
234
- singleSelectionGridPage.steps.addInputToColumnInputStepper(5);
235
- singleSelectionGridPage.steps.addInputToRowInputStepper(5);
236
- singleSelectionGridPage.steps.verifyColumnsCountInSpecifyCorrectAnswerSectionTable(5);
237
- singleSelectionGridPage.steps.verifyRowsCountInSpecifyCorrectAnswerSectionTable(5);
238
- });
239
-
240
- it('When the number of columns do not exceed the table viewport, then the left and right pagination button should not be displayed in the \'Specify correct answer\' table', () => {
241
- cy.log('Pre-step: Setting the number of columns to 6');
242
- singleSelectionGridPage.steps.addInputToColumnInputStepper(6);
243
- utilities.verifyElementVisibilityState(singleSelectionGridPage.leftPaginationButtonSpecifyCorrectAnswerSection(), 'notExist');
244
- utilities.verifyElementVisibilityState(singleSelectionGridPage.rightPaginationButtonSpecifyCorrectAnswerSection(), 'notExist');
245
- });
246
-
247
- it('When user has added columns such that they exceed the table viewport, then the left and right pagination button should be displayed in the \'Specify correct answer\' table', () => {
248
- singleSelectionGridPage.steps.addInputToColumnInputStepper(8);
249
- utilities.verifyElementVisibilityState(singleSelectionGridPage.leftPaginationButtonSpecifyCorrectAnswerSection(), 'visible');
250
- utilities.verifyElementVisibilityState(singleSelectionGridPage.rightPaginationButtonSpecifyCorrectAnswerSection(), 'visible');
251
- });
252
-
253
- it('By default the left pagination button should be disabled in both \'Specify columns and rows\' and \'Specify correct answer\' tables', () => {
254
- utilities.verifyElementDisabled(singleSelectionGridPage.leftPaginationButtonSpecifyCorrectAnswerSection());
255
- });
256
-
257
- it('When user clicks on right pagination button in specify correct answer, then the table should scroll to the right and left pagination button should be enabled', () => {
258
- singleSelectionGridPage.steps.clickOnRightPaginationButtonSpecifyCorrectAnswerSection();
259
- singleSelectionGridPage.steps.verifyColumnIsVisibleInSpecifyCorrectAnswerTable(7);
260
- utilities.verifyElementNotDisabled(singleSelectionGridPage.leftPaginationButtonSpecifyCorrectAnswerSection());
261
- });
262
-
263
- it('When the number of columns is reduced such that they do not exceed the table viewport, then the then the left and right pagination button should not be displayed in the \'Specify correct answer\' table', () => {
264
- singleSelectionGridPage.steps.addInputToColumnInputStepper(6);
265
- utilities.verifyElementVisibilityState(singleSelectionGridPage.leftPaginationButtonSpecifyCorrectAnswerSection(), 'notExist');
266
- utilities.verifyElementVisibilityState(singleSelectionGridPage.rightPaginationButtonSpecifyCorrectAnswerSection(), 'notExist');
267
- });
268
- });
269
-
270
- describe('Specify columns and rows - Columns and Rows input steppers - Preview tab', () => {
271
- abortEarlySetup();
272
- before(() => {
273
- singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
274
- cy.barsPreLoaderWait();
275
- singleSelectionGridPage.steps.switchToPreviewTab();
276
- });
277
-
278
- it('When \'Enable row heading\' checkbox is checked, then header row should be displayed in the preview tab table', () => {
279
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
280
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 1 }, 'Heading');
281
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 2 }, 'Heading');
282
- singleSelectionGridPage.steps.verifyRowsCountInPreviewTabTable(5);
283
- });
284
-
285
- it('When \'Enable row heading\' checkbox is unchecked, then header row should not be displayed in the preview table and row input stepper value should not change', () => {
286
- singleSelectionGridPage.steps.switchToEditTab();
287
- singleSelectionGridPage.steps.uncheckEnableRowHeadingCheckbox();
288
- singleSelectionGridPage.steps.switchToPreviewTab();
289
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'Text');
290
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 1 }, 'Radio button');
291
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 2 }, 'Radio button');
292
- singleSelectionGridPage.steps.verifyRowsCountInPreviewTabTable(4);
293
- });
294
-
295
- it('When user increases the number of columns in the column input stepper using the increase button, then the number of columns in the table displayed in preview tab should increase', () => {
296
- singleSelectionGridPage.steps.switchToEditTab();
297
- singleSelectionGridPage.steps.increaseColumnInputStepperCount(1);
298
- singleSelectionGridPage.steps.switchToPreviewTab();
299
- singleSelectionGridPage.steps.verifyColumnsCountInPreviewTabTable(4);
300
- });
301
-
302
- it('When user decreases the number of columns in the column input stepper using the decrease button, then the number of columns in the table displayed in preview tab should decrease', () => {
303
- singleSelectionGridPage.steps.switchToEditTab();
304
- singleSelectionGridPage.steps.decreaseColumnInputStepperCount(1);
305
- singleSelectionGridPage.steps.switchToPreviewTab();
306
- singleSelectionGridPage.steps.verifyColumnsCountInPreviewTabTable(3);
307
- });
308
-
309
- it('When user increases the number of rows in the row input stepper using the increase button, then the number of rows in the table displayed in preview tab should increase', () => {
310
- singleSelectionGridPage.steps.switchToEditTab();
311
- singleSelectionGridPage.steps.increaseRowInputStepperCount(1);
312
- singleSelectionGridPage.steps.switchToPreviewTab();
313
- singleSelectionGridPage.steps.verifyRowsCountInPreviewTabTable(5);
314
- });
315
-
316
- it('When user decreases the number of rows in the row input stepper using the decrease button, then the number of rows in the table displayed in preview tab should decrease', () => {
317
- singleSelectionGridPage.steps.switchToEditTab();
318
- singleSelectionGridPage.steps.decreaseRowInputStepperCount(1);
319
- singleSelectionGridPage.steps.switchToPreviewTab();
320
- singleSelectionGridPage.steps.verifyRowsCountInPreviewTabTable(4);
321
- });
322
-
323
- it('When user changes the number of rows by directly giving an input in rows input steppers, then the added number of rows should be reflected in preview tab', () => {
324
- singleSelectionGridPage.steps.switchToEditTab();
325
- singleSelectionGridPage.steps.addInputToRowInputStepper(7);
326
- singleSelectionGridPage.steps.switchToPreviewTab();
327
- singleSelectionGridPage.steps.verifyRowsCountInPreviewTabTable(7);
328
- });
329
-
330
- it('When user changes the number of columns by directly giving an input in columns input steppers, then the added number of columns should be reflected in preview tab', () => {
331
- singleSelectionGridPage.steps.switchToEditTab();
332
- singleSelectionGridPage.steps.addInputToColumnInputStepper(6);
333
- singleSelectionGridPage.steps.switchToPreviewTab();
334
- singleSelectionGridPage.steps.verifyColumnsCountInPreviewTabTable(6);
335
- });
336
-
337
- it('When the number of columns do not exceed the table viewport, then the left and right pagination button should not be displayed in the preview tab table', () => {
338
- utilities.verifyElementVisibilityState(singleSelectionGridPage.leftPaginationButtonPreviewTab(), 'notExist');
339
- utilities.verifyElementVisibilityState(singleSelectionGridPage.rightPaginationButtonPreviewTab(), 'notExist');
340
- });
341
-
342
- it('When the user has added columns such that they exceed the table viewport, then the left and right pagination button should be displayed in the preview tab table', () => {
343
- singleSelectionGridPage.steps.switchToEditTab();
344
- singleSelectionGridPage.steps.addInputToColumnInputStepper(8);
345
- singleSelectionGridPage.steps.switchToPreviewTab();
346
- utilities.verifyElementVisibilityState(singleSelectionGridPage.leftPaginationButtonPreviewTab(), 'visible');
347
- utilities.verifyElementVisibilityState(singleSelectionGridPage.rightPaginationButtonPreviewTab(), 'visible');
348
- });
349
-
350
- it('By default the left pagination button should be disabled', () => {
351
- utilities.verifyElementDisabled(singleSelectionGridPage.leftPaginationButtonPreviewTab());
352
- });
353
-
354
- it('When user clicks on right pagination button in preview tab, then the table should scroll to the right and left pagination button should be enabled', () => {
355
- singleSelectionGridPage.steps.clickOnRightPaginationButtonPreviewTab();
356
- singleSelectionGridPage.steps.verifyColumnIsVisibleInPreviewTabTable(7);
357
- utilities.verifyElementNotDisabled(singleSelectionGridPage.leftPaginationButtonPreviewTab());
358
- });
359
-
360
- it('When number of columns are reduced such that they do not exceed the table viewport, then the then the left and right pagination button should not be displayed in the preview tab table', () => {
361
- singleSelectionGridPage.steps.switchToEditTab();
362
- singleSelectionGridPage.steps.addInputToColumnInputStepper(6);
363
- singleSelectionGridPage.steps.switchToPreviewTab();
364
- utilities.verifyElementVisibilityState(singleSelectionGridPage.leftPaginationButtonPreviewTab(), 'notExist');
365
- utilities.verifyElementVisibilityState(singleSelectionGridPage.rightPaginationButtonPreviewTab(), 'notExist');
366
- });
367
- });
368
-
369
- describe('Specify columns and rows - Default option dropdown, Default text dropdown, Same radio button text in each column - Contents and edit tab functionality', () => {
370
- abortEarlySetup();
371
- before(() => {
372
- singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
373
- cy.barsPreLoaderWait();
374
- });
375
-
376
- singleSelectionGridPage.tests.verifyDefaultOptionLabelAndDropdown('Single selection grid');
377
-
378
- singleSelectionGridPage.tests.verifyDefaultTextLabelAndDropdown();
379
-
380
- it('When default options dropdown is set to \'Radio buttons\', then the answer cells in the edit tab grids should be set to checkbox category', () => {
381
- singleSelectionGridPage.steps.expandDefaultOptionDropdown();
382
- singleSelectionGridPage.steps.selectOptionFromDefaultOptionDropdown('Radio buttons');
383
- for (let rowIndex = 1; rowIndex < 5; rowIndex++) {
384
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: rowIndex, column: 1 }, 'Radio button');
385
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: rowIndex, column: 2 }, 'Radio button');
386
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, 'Radio button');
387
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, 'Radio button');
388
- };
389
- });
390
-
391
- it('When user selects \'Radio buttons with text\' option in the default option dropdown, then the answer cells in the edit tab grids should be set to checkbox with text category', () => {
392
- singleSelectionGridPage.steps.expandDefaultOptionDropdown();
393
- singleSelectionGridPage.steps.selectOptionFromDefaultOptionDropdown('Radio buttons with text');
394
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
395
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: rowIndex, column: 1 }, 'Radio button with text');
396
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: rowIndex, column: 2 }, 'Radio button with text');
397
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, 'Radio button with text');
398
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, 'Radio button with text');
399
- };
400
- });
401
-
402
- it('When user has selected \'Radio buttons with text\' option in the default option dropdown, then \'Enable row heading\' checkbox should be unchecked and header row should not be displayed', () => {
403
- singleSelectionGridPage.steps.verifyEnableRowHeadingCheckboxUncheckedState();
404
- singleSelectionGridPage.steps.verifyRowsCountInEditCellPropertyTable(4);
405
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 0 }, 'Text');
406
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 1 }, 'Radio button with text');
407
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 2 }, 'Radio button with text');
408
- });
409
-
410
- it('When user has selected \'Radio buttons with text\' option in the default option dropdown, then \'Same radio button text in each column\' checkbox and label should be displayed in checked state', () => {
411
- utilities.verifyElementVisibilityState(singleSelectionGridPage.sameRadioButtonTextInEachColumnCheckbox(), 'exist');
412
- utilities.verifyInnerText(singleSelectionGridPage.sameRadioButtonTextInEachColumnCheckboxLabel(), 'Same radio button text in each column');
413
- utilities.verifyElementVisibilityState(singleSelectionGridPage.sameRadioButtonTextInEachColumnCheckboxLabel(), 'visible');
414
- singleSelectionGridPage.steps.verifySameRadioButtonTextInColumnCheckboxCheckedState();
415
- });
416
-
417
- it('When \'Same radio button text in each column\' checkbox is checked, then the cells in each column should have the same text in all edit tab grids', () => {
418
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
419
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 1 }, 'True');
420
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 2 }, 'False');
421
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, 'True');
422
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, 'False');
423
- };
424
- });
425
-
426
- it('When the user unchecks \'Same radio button text in each column\' checkbox, then the default text in each column cell should be removed and \'Default text\' dropdown should change to \'Custom\'', () => {
427
- singleSelectionGridPage.steps.uncheckSameRadioButtonTextInColumnCheckbox();
428
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
429
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 1 }, '');
430
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 2 }, '');
431
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, '');
432
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, '');
433
- };
434
- utilities.verifyInnerText(singleSelectionGridPage.defaultTextDropdown(), 'Custom');
435
- });
436
-
437
- it('When the user checks the \'Same radio button text in each column\' checkbox again, then the cells in each column should have the same text in all edit tab grids', () => {
438
- singleSelectionGridPage.steps.checkSameRadioButtonTextInColumnCheckbox();
439
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
440
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 1 }, 'True');
441
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 2 }, 'False');
442
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, 'True');
443
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, 'False');
444
- };
445
- });
446
-
447
- it('When user selects \'Radio buttons\' option in default option dropdown, then then the answer cells in the edit tab grids should be set to checkbox category, \'Same radio button text in each column\' checkbox should not be displayed and \'Enable row heading\' checkbox should be checked again', () => {
448
- singleSelectionGridPage.steps.expandDefaultOptionDropdown();
449
- singleSelectionGridPage.steps.selectOptionFromDefaultOptionDropdown('Radio buttons');
450
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 0 }, 'None');
451
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 1 }, 'Heading');
452
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 2 }, 'Heading');
453
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 1, column: 0 }, 'Text');
454
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 2, column: 0 }, 'Text');
455
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 3, column: 0 }, 'Text');
456
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 4, column: 0 }, 'Text');
457
- for (let rowIndex = 1; rowIndex < 5; rowIndex++) {
458
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: rowIndex, column: 1 }, 'Radio button');
459
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: rowIndex, column: 2 }, 'Radio button');
460
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, 'Radio button');
461
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, 'Radio button');
462
- };
463
- utilities.verifyElementVisibilityState(singleSelectionGridPage.sameRadioButtonTextInEachColumnCheckboxLabel(), 'notExist');
464
- utilities.verifyElementVisibilityState(singleSelectionGridPage.sameRadioButtonTextInEachColumnCheckbox(), 'notExist');
465
- singleSelectionGridPage.steps.verifyEnableRowHeadingCheckboxCheckedState();
466
- });
467
-
468
- it('User should be able to select \'No radio buttons\' option in default option dropdown, then the answer cells in the edit tab grids should be set to \'No radio buttons\'', () => {
469
- singleSelectionGridPage.steps.expandDefaultOptionDropdown();
470
- singleSelectionGridPage.steps.selectOptionFromDefaultOptionDropdown('No radio buttons');
471
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
472
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: rowIndex, column: 1 }, 'No radio button');
473
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: rowIndex, column: 2 }, 'No radio button');
474
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, 'No radio button');
475
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, 'No radio button');
476
- };
477
- });
478
-
479
- it('When user has selected \'No radio buttons\' option in the default option dropdown, then \'Enable row heading\' checkbox should be unchecked and header row should not be displayed', () => {
480
- singleSelectionGridPage.steps.verifyEnableRowHeadingCheckboxUncheckedState();
481
- singleSelectionGridPage.steps.verifyRowsCountInEditCellPropertyTable(4);
482
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 0 }, 'Text');
483
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 1 }, 'No radio button');
484
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 2 }, 'No radio button');
485
- });
486
-
487
- it('When user has selected \'No radio buttons\' option, then \'Same radio button text in each column\' checkbox should be displayed in unchecked state', () => {
488
- singleSelectionGridPage.steps.verifySameRadioButtonTextInColumnCheckboxUncheckedState();
489
- });
490
-
491
- it('When user has selected \'No radio buttons\' option in the default option dropdown, then there should be a blank text field in each answer cell and default text dropdown should be set to custom option', () => {
492
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
493
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 1 }, '');
494
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 2 }, '');
495
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, '');
496
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, '');
497
- };
498
- utilities.verifyInnerText(singleSelectionGridPage.defaultTextDropdown(), 'Custom');
499
- });
500
-
501
- it('When the user checks the \'Same radio button text in each column\' checkbox, then the cells in each column should have the same default text in all edit tab grids', () => {
502
- singleSelectionGridPage.steps.checkSameRadioButtonTextInColumnCheckbox();
503
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
504
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 1 }, 'True');
505
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 2 }, 'False');
506
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, 'True');
507
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, 'False');
508
- };
509
- });
510
-
511
- it('When the user unchecks \'Same radio button text in each column\' checkbox, then the default text in each column cell should be removed', () => {
512
- singleSelectionGridPage.steps.uncheckSameRadioButtonTextInColumnCheckbox();
513
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
514
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 1 }, '');
515
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 2 }, '');
516
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, '');
517
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, '');
518
- };
519
- });
520
-
521
- it('When \'Same radio button text in each column\' checkbox is checked and user selects \'Yes / no\' option in default text dropdown, then the selected option text should be displayed in each column each column', () => {
522
- singleSelectionGridPage.steps.checkSameRadioButtonTextInColumnCheckbox();
523
- singleSelectionGridPage.steps.expandDefaultTextDropdown();
524
- singleSelectionGridPage.steps.selectOptionFromDefaultTextDropdown('Yes / no');
525
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
526
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 1 }, 'Yes');
527
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 2 }, 'No');
528
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, 'Yes');
529
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, 'No');
530
- };
531
- });
532
-
533
- it('When \'Same radio button text in each column\' checkbox is checked and user selects \'Agree / Disagree\' option in default text dropdown, then the selected option text should be displayed in each column each column', () => {
534
- singleSelectionGridPage.steps.expandDefaultTextDropdown();
535
- singleSelectionGridPage.steps.selectOptionFromDefaultTextDropdown('Agree / Disagree');
536
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
537
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 1 }, 'Agree');
538
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 2 }, 'Disagree');
539
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, 'Agree');
540
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, 'Disagree');
541
- };
542
- });
543
-
544
- it('When user edits the text in any column, then the updated text should be displayed in all the cells of that corresponding column and default text dropdown should displayed the custom option as selected', () => {
545
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 0, column: 2 }, 'Updated text');
546
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
547
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 1 }, 'Agree');
548
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: rowIndex, column: 2 }, 'Updated text');
549
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, 'Agree');
550
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, 'Updated text');
551
- utilities.verifyInnerText(singleSelectionGridPage.defaultTextDropdown(), 'Custom');
552
- };
553
- });
554
-
555
- it('CSS of \'Same radio button text in each column\' checkbox and label', () => {
556
- utilities.verifyCSS(singleSelectionGridPage.sameRadioButtonTextInEachColumnCheckboxLabel(), {
557
- 'color': css.color.labels,
558
- 'font-size': css.fontSize.normal,
559
- 'font-weight': css.fontWeight.regular
560
- });
561
- utilities.verifyCSS(singleSelectionGridPage.sameRadioButtonTextInEachColumnCheckbox().parent().find('g').eq(1), {
562
- 'fill': css.color.activeButtons
563
- });
564
- });
565
- });
566
-
567
- describe('Specify columns and rows - Default option dropdown, Default text dropdown, Same radio button text in each column - preview tab functionality', () => {
568
- abortEarlySetup();
569
- before(() => {
570
- singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
571
- cy.barsPreLoaderWait();
572
- });
573
-
574
- it('When default options dropdown is set to \'Radio buttons\', then the answer cells in the preview tab grid should be set to checkbox category', () => {
575
- singleSelectionGridPage.steps.switchToPreviewTab();
576
- for (let rowIndex = 1; rowIndex < 5; rowIndex++) {
577
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: rowIndex, column: 1 }, 'Radio button');
578
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: rowIndex, column: 2 }, 'Radio button');
579
- };
580
- });
581
-
582
- it('When user selects \'Radio buttons with text\' option in the default option dropdown, then the answer cells in the preview tab grid should be set to checkbox with text category', () => {
583
- singleSelectionGridPage.steps.switchToEditTab();
584
- singleSelectionGridPage.steps.expandDefaultOptionDropdown();
585
- singleSelectionGridPage.steps.selectOptionFromDefaultOptionDropdown('Radio buttons with text');
586
- singleSelectionGridPage.steps.switchToPreviewTab();
587
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
588
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: rowIndex, column: 1 }, 'Radio button with text');
589
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: rowIndex, column: 2 }, 'Radio button with text');
590
- };
591
- });
592
-
593
- it('When user has selected \'Radio buttons with text\' option in the default option dropdown, then \'Enable row heading\' checkbox should be unchecked and header row should not be displayed', () => {
594
- singleSelectionGridPage.steps.verifyRowsCountInPreviewTabTable(4);
595
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'Text');
596
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 1 }, 'Radio button with text');
597
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 2 }, 'Radio button with text');
598
- });
599
-
600
- it('When \'Same radio button text in each column\' checkbox is checked, then the cells in each column should have the same text in all preview tab grid', () => {
601
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
602
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 1 }, 'True');
603
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 2 }, 'False');
604
- };
605
- });
606
-
607
- it('When the user unchecks \'Same radio button text in each column\' checkbox, then the default text in each column cell should be removed', () => {
608
- singleSelectionGridPage.steps.switchToEditTab();
609
- singleSelectionGridPage.steps.uncheckSameRadioButtonTextInColumnCheckbox();
610
- singleSelectionGridPage.steps.switchToPreviewTab();
611
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
612
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 1 }, '');
613
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 2 }, '');
614
- };
615
- });
616
-
617
- it('When the user checks the \'Same radio button text in each column\' checkbox again, then the cells in each column should have the same text in all preview tab grid', () => {
618
- singleSelectionGridPage.steps.switchToEditTab();
619
- singleSelectionGridPage.steps.checkSameRadioButtonTextInColumnCheckbox();
620
- singleSelectionGridPage.steps.switchToPreviewTab();
621
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
622
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 1 }, 'True');
623
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 2 }, 'False');
624
- };
625
- });
626
-
627
- it('When user selects \'Radio buttons\' option in default option dropdown, then then the answer cells in the preview tab grid should be set to checkbox category', () => {
628
- singleSelectionGridPage.steps.switchToEditTab();
629
- singleSelectionGridPage.steps.expandDefaultOptionDropdown();
630
- singleSelectionGridPage.steps.selectOptionFromDefaultOptionDropdown('Radio buttons');
631
- singleSelectionGridPage.steps.switchToPreviewTab();
632
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
633
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 1 }, 'Heading');
634
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 2 }, 'Heading');
635
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 1, column: 0 }, 'Text');
636
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 2, column: 0 }, 'Text');
637
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 3, column: 0 }, 'Text');
638
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 4, column: 0 }, 'Text');
639
- for (let rowIndex = 1; rowIndex < 5; rowIndex++) {
640
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: rowIndex, column: 1 }, 'Radio button');
641
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: rowIndex, column: 2 }, 'Radio button');
642
- };
643
- });
644
-
645
- it('User should be able to select \'No radio buttons\' option in default option dropdown, then the answer cells in the preview tab grid should be set to \'No radio buttons\'', () => {
646
- singleSelectionGridPage.steps.switchToEditTab();
647
- singleSelectionGridPage.steps.expandDefaultOptionDropdown();
648
- singleSelectionGridPage.steps.selectOptionFromDefaultOptionDropdown('No radio buttons');
649
- singleSelectionGridPage.steps.switchToPreviewTab();
650
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
651
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: rowIndex, column: 1 }, 'No radio button');
652
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: rowIndex, column: 2 }, 'No radio button');
653
- };
654
- });
655
-
656
- it('When user has selected \'No radio buttons\' option in the default option dropdown, then \'Enable row heading\' checkbox should be unchecked and header row should not be displayed', () => {
657
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 0 }, 'Text');
658
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 1 }, 'No radio button');
659
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 2 }, 'No radio button');
660
- });
661
-
662
- it('When user has selected \'No radio buttons\' option in the default option dropdown, then there should be a blank text field in each answer cell', () => {
663
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
664
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 1 }, '');
665
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 2 }, '');
666
- };
667
- });
668
-
669
- it('When the user checks the \'Same radio button text in each column\' checkbox, then the cells in each column should have the same default text in all preview tab grid', () => {
670
- singleSelectionGridPage.steps.switchToEditTab();
671
- singleSelectionGridPage.steps.checkSameRadioButtonTextInColumnCheckbox();
672
- singleSelectionGridPage.steps.switchToPreviewTab();
673
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
674
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 1 }, 'True');
675
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 2 }, 'False');
676
- };
677
- });
678
-
679
- it('When the user unchecks \'Same radio button text in each column\' checkbox, then the default text in each column cell should be removed', () => {
680
- singleSelectionGridPage.steps.switchToEditTab();
681
- singleSelectionGridPage.steps.uncheckSameRadioButtonTextInColumnCheckbox();
682
- singleSelectionGridPage.steps.switchToPreviewTab();
683
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
684
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 1 }, '');
685
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 2 }, '');
686
- };
687
- });
688
-
689
- it('When \'Same radio button text in each column\' checkbox is checked and user selects \'Yes / no\' option in default text dropdown, then the selected option text should be displayed in each column each column', () => {
690
- singleSelectionGridPage.steps.switchToEditTab();
691
- singleSelectionGridPage.steps.checkSameRadioButtonTextInColumnCheckbox();
692
- singleSelectionGridPage.steps.expandDefaultTextDropdown();
693
- singleSelectionGridPage.steps.selectOptionFromDefaultTextDropdown('Yes / no');
694
- singleSelectionGridPage.steps.switchToPreviewTab();
695
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
696
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 1 }, 'Yes');
697
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 2 }, 'No');
698
- };
699
- });
700
-
701
- it('When \'Same radio button text in each column\' checkbox is checked and user selects \'Agree / Disagree\' option in default text dropdown, then the selected option text should be displayed in each column each column', () => {
702
- singleSelectionGridPage.steps.switchToEditTab();
703
- singleSelectionGridPage.steps.expandDefaultTextDropdown();
704
- singleSelectionGridPage.steps.selectOptionFromDefaultTextDropdown('Agree / Disagree');
705
- singleSelectionGridPage.steps.switchToPreviewTab();
706
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
707
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 1 }, 'Agree');
708
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 2 }, 'Disagree');
709
- };
710
- });
711
-
712
- it('When user edits the text in any column, then the updated text should be displayed in all the cells of that corresponding column in preview tab', () => {
713
- singleSelectionGridPage.steps.switchToEditTab();
714
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 0, column: 2 }, 'Updated text');
715
- singleSelectionGridPage.steps.switchToPreviewTab();
716
- for (let rowIndex = 0; rowIndex < 4; rowIndex++) {
717
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 1 }, 'Agree');
718
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: rowIndex, column: 2 }, 'Updated text');
719
- };
720
- });
721
- });
722
-
723
- describe('Specify columns and rows - table cell property menu - Contents, specify columns and rows section and specify correct answer section', () => {
724
- abortEarlySetup();
725
- before(() => {
726
- singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
727
- cy.barsPreLoaderWait();
728
- });
729
-
730
- it('\'You can add the question(s) in the first column.\' help text should be displayed above the table', () => {
731
- utilities.verifyInnerText(singleSelectionGridPage.specifyRowsAndColumnsTableHelpText(), 'You can add the question(s) in the first column.');
732
- utilities.verifyElementVisibilityState(singleSelectionGridPage.specifyRowsAndColumnsTableHelpText(), 'visible');
733
- });
734
-
735
- //Default states
736
- it('A table based on the default settings of columns and rows should be displayed in the \'Specify columns and rows\' section', () => {
737
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 0 }, 'None');
738
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 1 }, 'Heading');
739
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 2 }, 'Heading');
740
- for (let rowIndex = 1; rowIndex < 5; rowIndex++) {
741
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: rowIndex, column: 0 }, 'Text');
742
- }
743
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 0, column: 1 }, 'True');
744
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 0, column: 2 }, 'False');
745
- for (let rowIndex = 1; rowIndex < 5; rowIndex++) {
746
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: rowIndex, column: 1 }, 'Radio button');
747
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: rowIndex, column: 2 }, 'Radio button');
748
- };
749
- });
750
-
751
- it('A table based on the default settings of columns and rows should be displayed in the \'Specify correct answer\' section', () => {
752
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 0 }, 'None');
753
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 1 }, 'Heading');
754
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 2 }, 'Heading');
755
- for (let rowIndex = 1; rowIndex < 5; rowIndex++) {
756
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: rowIndex, column: 0 }, 'Text');
757
- }
758
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: 0, column: 1 }, 'True');
759
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: 0, column: 2 }, 'False');
760
- for (let rowIndex = 1; rowIndex < 5; rowIndex++) {
761
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, 'Radio button');
762
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, 'Radio button');
763
- };
764
- });
765
-
766
- singleSelectionGridPage.tests.verifyHeaderRowCellPropertyMenu();
767
-
768
- singleSelectionGridPage.tests.verifyFirstColumnCellPropertyMenu();
769
-
770
- singleSelectionGridPage.tests.verifyOptionCellPropertyMenu();
771
-
772
- it('When user sets a cell as \'Heading\' then, empty input field should be displayed in the cell with placeholder text \'Enter text here...\' and user should be able to give input in the cell', () => {
773
- singleSelectionGridPage.steps.modifyTableCellProperty({ row: 0, column: 0 }, 'Heading');
774
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 0 }, 'Heading');
775
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 0, column: 0 }, '');
776
- singleSelectionGridPage.steps.verifyPlaceholderTextInCellPropertyInputField({ row: 0, column: 0 }, 'Enter text here...');
777
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 0, column: 0 }, 'Heading');
778
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 0, column: 0 }, 'Heading');
779
- });
780
-
781
- it('When user sets a cell as \'Subheading\' then, empty input field should be displayed in the cell with placeholder text \'Enter text here...\' and user should be able to give input in the cell', () => {
782
- singleSelectionGridPage.steps.modifyTableCellProperty({ row: 1, column: 0 }, 'Subheading');
783
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 1, column: 0 }, 'Subheading');
784
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 1, column: 0 }, '');
785
- singleSelectionGridPage.steps.verifyPlaceholderTextInCellPropertyInputField({ row: 1, column: 0 }, 'Enter text here...');
786
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 1, column: 0 }, 'Subheading');
787
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 1, column: 0 }, 'Subheading');
788
- });
789
-
790
- it('When user sets a cell as \'Text\' then, empty input field should be displayed in the cell with placeholder text \'Enter text here...\' and user should be able to give input in the cell', () => {
791
- singleSelectionGridPage.steps.modifyTableCellProperty({ row: 2, column: 0 }, 'Text');
792
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 2, column: 0 }, 'Text');
793
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 2, column: 0 }, '');
794
- singleSelectionGridPage.steps.verifyPlaceholderTextInCellPropertyInputField({ row: 2, column: 0 }, 'Enter text here...');
795
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 2, column: 0 }, 'Text');
796
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 2, column: 0 }, 'Text');
797
- });
798
-
799
- it('When user sets a cell as \'None\' then, input field should not be displayed in the cell', () => {
800
- singleSelectionGridPage.steps.modifyTableCellProperty({ row: 0, column: 1 }, 'None');
801
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 0, column: 1 }, 'None');
802
- singleSelectionGridPage.steps.verifyCellPropertyInputFieldNotExists({ row: 0, column: 1 });
803
- });
804
-
805
- it('When user sets a cell as \'Radio button\' then, input field should not be displayed in the cell', () => {
806
- singleSelectionGridPage.steps.modifyTableCellPropertyForOptionCells({ row: 1, column: 1 }, 'Radio button');
807
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 1, column: 1 }, 'Radio button');
808
- singleSelectionGridPage.steps.verifyCellPropertyInputFieldNotExists({ row: 1, column: 1 });
809
- });
810
-
811
- it('When user sets a cell as \'Radio button with text\' then, empty input field should be displayed in the cell with placeholder text \'Option text or image...\', user should be able to give input in the cell', () => {
812
- singleSelectionGridPage.steps.modifyTableCellPropertyForOptionCells({ row: 1, column: 2 }, 'Radio button with text');
813
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 1, column: 2 }, 'Radio button with text');
814
- singleSelectionGridPage.steps.verifyPlaceholderTextInCellPropertyInputField({ row: 1, column: 2 }, 'Option text or image...');
815
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 1, column: 2 }, 'Radio button with text');
816
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 1, column: 2 }, 'Radio button with text');
817
- });
818
-
819
- it('When user sets a cell as \'No radio button\' then, empty input field should be displayed in the cell with placeholder text \'Enter text here...\', user should be able to give input in the cell', () => {
820
- singleSelectionGridPage.steps.modifyTableCellPropertyForOptionCells({ row: 2, column: 1 }, 'No radio button');
821
- singleSelectionGridPage.steps.verifyEditCellCategoryTableCellProperty({ row: 2, column: 1 }, 'No radio button');
822
- singleSelectionGridPage.steps.verifyPlaceholderTextInCellPropertyInputField({ row: 2, column: 1 }, 'Option text or image...');
823
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 2, column: 1 }, 'No radio button');
824
- singleSelectionGridPage.steps.verifyTextInCellPropertyInputField({ row: 2, column: 1 }, 'No radio button');
825
- });
826
-
827
- it('The updated cell properties should be reflected in the specify correct answer table', () => {
828
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 0 }, 'Heading');
829
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: 0, column: 0 }, 'Heading');
830
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 1, column: 0 }, 'Subheading');
831
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: 1, column: 0 }, 'Subheading');
832
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 2, column: 0 }, 'Text');
833
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: 2, column: 0 }, 'Text');
834
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 1 }, 'None');
835
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 1, column: 1 }, 'Radio button');
836
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 1, column: 2 }, 'Radio button with text');
837
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: 1, column: 2 }, 'Radio button with text');
838
- singleSelectionGridPage.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 2, column: 1 }, 'No radio button');
839
- singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: 2, column: 1 }, 'No radio button');
840
- singleSelectionGridPage.steps.verifyAnswerOptionButtonIsNotDisplayedInCellSpecifyCorrectAnswerSection({ row: 2, column: 1 });
841
- });
842
-
843
- it('CSS of table in \'Specify columns and rows\' section', { tags: 'css' }, () => {
844
- utilities.verifyCSS(singleSelectionGridPage.specifyRowsAndColumnsTableHelpText(), {
845
- 'color': css.color.labels,
846
- 'font-size': css.fontSize.normal,
847
- 'font-weight': css.fontWeight.regular
848
- });
849
- utilities.getNthElement(singleSelectionGridPage.editCellPropertyRow(), 0)
850
- .within(() => {
851
- //Heading cell
852
- utilities.verifyCSS(singleSelectionGridPage.tableCell().eq(0).parent(), {
853
- 'background-color': css.color.matrixHeadingCellBg,
854
- 'border-color': css.color.figDefaultComponentBorder
855
- });
856
- utilities.verifyCSS(singleSelectionGridPage.cellPropertyInputField().eq(0), {
857
- 'color': css.color.text,
858
- 'font-size': css.fontSize.default,
859
- 'font-weight': css.fontWeight.regular
860
- });
861
- //None cell
862
- utilities.verifyCSS(singleSelectionGridPage.tableCell().eq(1).parent(), {
863
- 'background-color': css.color.defaultBackground,
864
- 'border-color': css.color.figDefaultComponentBorder
865
- });
866
- utilities.verifyCSS(singleSelectionGridPage.tableCell().eq(1).find('path').eq(0), {
867
- 'stroke': css.color.cellIcon
868
- });
869
- });
870
- utilities.getNthElement(singleSelectionGridPage.editCellPropertyRow(), 1)
871
- .within(() => {
872
- //Subheading cell
873
- utilities.verifyCSS(singleSelectionGridPage.tableCell().eq(0).parent(), {
874
- 'background-color': css.color.matrixSubheadingCellBg,
875
- 'border-color': css.color.figDefaultComponentBorder
876
- });
877
- utilities.verifyCSS(singleSelectionGridPage.cellPropertyInputField().eq(0), {
878
- 'color': css.color.text,
879
- 'font-size': css.fontSize.default,
880
- 'font-weight': css.fontWeight.regular
881
- });
882
- //Radio button cell
883
- utilities.verifyCSS(singleSelectionGridPage.tableCell().eq(1).parent(), {
884
- 'background-color': css.color.defaultBackground,
885
- 'border-color': css.color.figDefaultComponentBorder
886
- });
887
- utilities.verifyCSS(singleSelectionGridPage.tableCell().eq(1).find('g').eq(2), {
888
- 'fill': css.color.cellIcon
889
- });
890
- //Radio button with text cell
891
- utilities.verifyCSS(singleSelectionGridPage.tableCell().eq(2).parent(), {
892
- 'background-color': css.color.defaultBackground,
893
- 'border-color': css.color.figDefaultComponentBorder
894
- });
895
- utilities.verifyCSS(singleSelectionGridPage.tableCell().eq(2).find('g').eq(2), {
896
- 'fill': css.color.cellIcon
897
- });
898
- utilities.verifyCSS(singleSelectionGridPage.cellPropertyInputField().eq(2), {
899
- 'color': css.color.text,
900
- 'font-size': css.fontSize.default,
901
- 'font-weight': css.fontWeight.regular
902
- });
903
- });
904
- utilities.getNthElement(singleSelectionGridPage.editCellPropertyRow(), 2)
905
- .within(() => {
906
- //Text cell
907
- utilities.verifyCSS(singleSelectionGridPage.tableCell().eq(0).parent(), {
908
- 'background-color': css.color.defaultBackground,
909
- 'border-color': css.color.figDefaultComponentBorder
910
- });
911
- utilities.verifyCSS(singleSelectionGridPage.cellPropertyInputField().eq(0), {
912
- 'color': css.color.text,
913
- 'font-size': css.fontSize.default,
914
- 'font-weight': css.fontWeight.regular
915
- });
916
- //No radio button cell
917
- utilities.verifyCSS(singleSelectionGridPage.tableCell().eq(1).parent(), {
918
- 'background-color': css.color.defaultBackground,
919
- 'border-color': css.color.figDefaultComponentBorder
920
- });
921
- utilities.verifyCSS(singleSelectionGridPage.cellPropertyInputField().eq(1), {
922
- 'color': css.color.text,
923
- 'font-size': css.fontSize.default,
924
- 'font-weight': css.fontWeight.regular
925
- });
926
- });
927
- });
928
-
929
- //A11y is covered in above describes
930
- });
931
-
932
- describe('Specify columns and rows - \'Set first row cells as heading\', \'Set first column cells as heading\' and table cell type menu - Preview tab', () => {
933
- abortEarlySetup();
934
- before(() => {
935
- singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
936
- cy.barsPreLoaderWait();
937
- singleSelectionGridPage.steps.switchToPreviewTab();
938
- });
939
-
940
- it('A table based on the default settings of specify columns and rows section should be displayed in the preview tab', () => {
941
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
942
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 1 }, 'Heading');
943
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 2 }, 'Heading');
944
- for (let rowIndex = 1; rowIndex < 5; rowIndex++) {
945
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: rowIndex, column: 0 }, 'Text');
946
- }
947
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 0, column: 1 }, 'True');
948
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 0, column: 2 }, 'False');
949
- for (let rowIndex = 1; rowIndex < 5; rowIndex++) {
950
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: rowIndex, column: 1 }, 'Radio button');
951
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: rowIndex, column: 2 }, 'Radio button');
952
- };
953
- });
954
-
955
- it('When user sets a cell as \'Heading\' and gives an input in its input field, then these changes should be reflected in the preview tab table cell', () => {
956
- singleSelectionGridPage.steps.switchToEditTab();
957
- singleSelectionGridPage.steps.modifyTableCellProperty({ row: 0, column: 0 }, 'Heading');
958
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 0, column: 0 }, 'Heading');
959
- singleSelectionGridPage.steps.switchToPreviewTab();
960
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'Heading');
961
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 0, column: 0 }, 'Heading');
962
- });
963
-
964
- it('When user sets a cell as \'Subheading\' and gives an input in its input field, then these changes should be reflected in the preview tab table cell', () => {
965
- singleSelectionGridPage.steps.switchToEditTab();
966
- singleSelectionGridPage.steps.modifyTableCellProperty({ row: 1, column: 0 }, 'Subheading');
967
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 1, column: 0 }, 'Subheading');
968
- singleSelectionGridPage.steps.switchToPreviewTab();
969
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 1, column: 0 }, 'Subheading');
970
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 1, column: 0 }, 'Subheading');
971
- });
972
-
973
- it('When user sets a cell as \'Text\' and gives an input in its input field, then these changes should be reflected in the preview tab table cell', () => {
974
- singleSelectionGridPage.steps.switchToEditTab();
975
- singleSelectionGridPage.steps.modifyTableCellProperty({ row: 2, column: 0 }, 'Text');
976
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 2, column: 0 }, 'Text');
977
- singleSelectionGridPage.steps.switchToPreviewTab();
978
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 2, column: 0 }, 'Text');
979
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 2, column: 0 }, 'Text');
980
- });
981
-
982
- it('When user sets a cell as \'None\' then this should be reflected in the preview tab table cell', () => {
983
- singleSelectionGridPage.steps.switchToEditTab();
984
- singleSelectionGridPage.steps.modifyTableCellProperty({ row: 0, column: 1 }, 'None');
985
- singleSelectionGridPage.steps.switchToPreviewTab();
986
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 1 }, 'None');
987
- });
988
-
989
- it('When user sets a cell as \'Radio button\' then this should be reflected in the preview tab table cell', () => {
990
- singleSelectionGridPage.steps.switchToEditTab();
991
- singleSelectionGridPage.steps.modifyTableCellPropertyForOptionCells({ row: 1, column: 1 }, 'Radio button');
992
- singleSelectionGridPage.steps.switchToPreviewTab();
993
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 1, column: 1 }, 'Radio button');
994
- });
995
-
996
- it('When user sets a cell as \'Radio button with text\' and gives an input in its input field, then these changes should be reflected in the preview tab table cell', () => {
997
- singleSelectionGridPage.steps.switchToEditTab();
998
- singleSelectionGridPage.steps.modifyTableCellPropertyForOptionCells({ row: 1, column: 2 }, 'Radio button with text');
999
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 1, column: 2 }, 'Radio button with text');
1000
- singleSelectionGridPage.steps.switchToPreviewTab();
1001
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 1, column: 2 }, 'Radio button with text');
1002
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 1, column: 2 }, 'Radio button with text');
1003
- });
1004
-
1005
- it('When user sets a cell as \'No radio button\' and gives an input in its input field, then these changes should be reflected in the preview tab table cell', () => {
1006
- singleSelectionGridPage.steps.switchToEditTab();
1007
- singleSelectionGridPage.steps.modifyTableCellPropertyForOptionCells({ row: 2, column: 1 }, 'No radio button');
1008
- singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 2, column: 1 }, 'No radio button');
1009
- singleSelectionGridPage.steps.switchToPreviewTab();
1010
- singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 2, column: 1 }, 'No radio button');
1011
- singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 2, column: 1 }, 'No radio button');
1012
- });
1013
- });
1014
- });