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