itemengine-cypress-automation 1.0.39 → 1.0.42
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesAdditionalSettings.js +0 -669
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesAdditionalSettingsBasic.js +317 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesAdditionalSettingsRowProperties.js +372 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesRowsAndCategoriesSection.js → dragAndDropIntoCategoriesCategoriesSection.js} +1 -295
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesEditTabScoringTypes.js +0 -58
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesManuallyAndNonScoredEditTabScoring.js +68 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesRowsSection.js +304 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/{dragAndDropIntoCategoriesGroupedOptionsAllOrNothing.js → dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothing.js} +3 -30
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +33 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingCorrectPointsEqualToAlternatePoints.js +35 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsAllOrNothingCorrectPointsGreaterThanAlternatePoints.js +33 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachCell.js +39 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachCellAlternatePointsGreaterThanCorrectPoints.js +42 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachCellCorrectPointsEqualToAlternatePoints.js +49 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachCellCorrectPointsGreaterThanAlternatePoints.js +42 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachResponse.js +39 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachResponseAlternatePointsGreaterThanCorrectPoints.js +41 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachResponseCorrectPointsEqualToAlternatePoints.js +47 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsPartialScoreForEachResponseCorrectPointsGreaterThanAlternatePoints.js +41 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenCell.js +57 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenCellsAlternatePointsGreaterThanCorrectPoints.js +43 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenCellsCorrectPointsEqualToAlternatePoints.js +49 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenCellsCorrectPointsGreaterThanAlternatePoints.js +43 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoringFiles/groupedOptionsTotalScoreDividedBetweenResponses.js +57 -0
- package/package.json +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsPartialScoreForEachCell.js +0 -145
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsPartialScoreForEachResponse.js +0 -141
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsTotalScoreDividedBetweenCell.js +0 -165
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsTotalScoreDividedBetweenResponses.js +0 -420
@@ -0,0 +1,372 @@
|
|
1
|
+
import { dragAndDropIntoCategoriesPage } 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: Drag and drop into categories: Additional settings', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Additional settings: \'Row title width (px)\' - Contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
cy.log('Navigate to Drag and drop into categories question type');
|
15
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowInputField(0, 'Can fly');
|
18
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
19
|
+
});
|
20
|
+
|
21
|
+
it('\'Row title width (px)\' label and input field should be displayed. By default, the \'Row title width\' input field should be empty', () => {
|
22
|
+
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowTitleWidthLabel(), 'Row title width (px)');
|
23
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowTitleWidthLabel(), 'visible');
|
24
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowTitleWidthInputField(), 'visible');
|
25
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue('');
|
26
|
+
});
|
27
|
+
|
28
|
+
it('CSS of \'Row title width (px)\' contents', { tags: 'css' }, () => {
|
29
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowTitleWidthLabel(), {
|
30
|
+
'color': css.color.labels,
|
31
|
+
'font-size': css.fontSize.normal,
|
32
|
+
'font-weight': css.fontWeight.semibold
|
33
|
+
});
|
34
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowTitleWidthInputField(), {
|
35
|
+
'color': css.color.text,
|
36
|
+
'font-size': css.fontSize.default,
|
37
|
+
'font-weight': css.fontWeight.regular
|
38
|
+
});
|
39
|
+
});
|
40
|
+
|
41
|
+
//Note: a11y covered in verifyAdditonalSettingsAccordionProperties
|
42
|
+
|
43
|
+
it('The user should only be able to enter only numeric value in the \'Row title width\' input field', () => {
|
44
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
45
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField('a!1b#c4d0');
|
46
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(140);
|
47
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(140);
|
48
|
+
});
|
49
|
+
});
|
50
|
+
|
51
|
+
//https://redmine.zeuslearning.com/issues/547937
|
52
|
+
describe('Additional settings: \'Row title width (px)\' - Set correct answer section', () => {
|
53
|
+
abortEarlySetup();
|
54
|
+
before(() => {
|
55
|
+
cy.log('Navigate to Drag and drop into categories question type');
|
56
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
57
|
+
cy.barsPreLoaderWait();
|
58
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
59
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
60
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
61
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
62
|
+
});
|
63
|
+
|
64
|
+
it('When the user has not set any value in the \'Row title width\' input field, the width of the row title should be 64px by default', () => {
|
65
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(64);
|
66
|
+
});
|
67
|
+
|
68
|
+
it('When the user enters a numeric value in the \'Row title width\' input field, the row title width should get updated accordingly', () => {
|
69
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(100);
|
70
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(100);
|
71
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(100);
|
72
|
+
});
|
73
|
+
|
74
|
+
it('When the users adds a value greater than 400, the entered value should automatically update to 400 and the row title width should change to 400px', () => {
|
75
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
76
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(500);
|
77
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(400);
|
78
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(400);
|
79
|
+
});
|
80
|
+
|
81
|
+
it('When user clears the \'Row title width\' input field, the row title width should change back to the default value', () => {
|
82
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
83
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(64);
|
84
|
+
});
|
85
|
+
|
86
|
+
it('When the users adds a value less than 64, the entered value should automatically update to 64 and the row title width should change to 64px', () => {
|
87
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
88
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(50);
|
89
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(64);
|
90
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthSetCorrectAnswerSection(64);
|
91
|
+
});
|
92
|
+
});
|
93
|
+
|
94
|
+
describe('Additional settings: \'Row title width (px)\' - Preview tab', () => {
|
95
|
+
abortEarlySetup();
|
96
|
+
before(() => {
|
97
|
+
cy.log('Navigate to Drag and drop into categories question type');
|
98
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
99
|
+
cy.barsPreLoaderWait();
|
100
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
101
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
102
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
103
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
104
|
+
});
|
105
|
+
|
106
|
+
it('When the user has not set any value in the \'Row title width\' input field, the width of the row title should be 64px by default in the preview tab', () => {
|
107
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
108
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthPreviewTab(64);
|
109
|
+
});
|
110
|
+
|
111
|
+
it('When the user enters a numeric value in the \'Row title width\' input field, the row title width should get updated accordingly in the preview tab', () => {
|
112
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
113
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(100);
|
114
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(100);
|
115
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
116
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthPreviewTab(100);
|
117
|
+
});
|
118
|
+
|
119
|
+
it('When user clears the \'Row title width\' input field, the row title width should change back to the default value in the preview tab', () => {
|
120
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
121
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
122
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
123
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthPreviewTab(64);
|
124
|
+
});
|
125
|
+
|
126
|
+
it('When the users adds a value greater than 400, the entered value should automatically update to 400 and the row title width should change to 400px in the preview tab', () => {
|
127
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
128
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
129
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(500);
|
130
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(400);
|
131
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
132
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthPreviewTab(400);
|
133
|
+
});
|
134
|
+
|
135
|
+
it('When the users adds a value less than 64, the entered value should automatically update to 64 and the row title width should change to 64px in the preview tab', () => {
|
136
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
137
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowTitleWidthInputField();
|
138
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowTitleWidthInputField(50);
|
139
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthInputFieldValue(64);
|
140
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
141
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowTitleWidthPreviewTab(64);
|
142
|
+
});
|
143
|
+
});
|
144
|
+
|
145
|
+
describe('Additional settings: \'Row minimum height (px)\' - Contents', () => {
|
146
|
+
abortEarlySetup();
|
147
|
+
before(() => {
|
148
|
+
cy.log('Navigate to Drag and drop into categories question type');
|
149
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
150
|
+
cy.barsPreLoaderWait();
|
151
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
152
|
+
});
|
153
|
+
|
154
|
+
it('\'Row minimum height (px)\' label and input field should be displayed. By default, the \'Row minimum height\' input field should be empty', () => {
|
155
|
+
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowMinHeightLabel(), 'Row minimum height (px)');
|
156
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowMinHeightLabel(), 'visible');
|
157
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowMinHeightInputField(), 'visible');
|
158
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue('');
|
159
|
+
});
|
160
|
+
|
161
|
+
it('CSS of \'Row minimum height (px)\' contents', { tags: 'css' }, () => {
|
162
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowMinHeightLabel(), {
|
163
|
+
'color': css.color.labels,
|
164
|
+
'font-size': css.fontSize.normal,
|
165
|
+
'font-weight': css.fontWeight.semibold
|
166
|
+
});
|
167
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowMinHeightInputField(), {
|
168
|
+
'color': css.color.text,
|
169
|
+
'font-size': css.fontSize.default,
|
170
|
+
'font-weight': css.fontWeight.regular
|
171
|
+
});
|
172
|
+
});
|
173
|
+
|
174
|
+
//Note: a11y covered in verifyAdditonalSettingsAccordionProperties
|
175
|
+
|
176
|
+
it('The user should only be able to enter only numeric value in the \'Row minimum height\' input field', () => {
|
177
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
178
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField('a!1b#c4d0');
|
179
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(140);
|
180
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(140);
|
181
|
+
});
|
182
|
+
});
|
183
|
+
|
184
|
+
describe('Additional settings: \'Row minimum height (px)\' - Set correct answer section', () => {
|
185
|
+
abortEarlySetup();
|
186
|
+
before(() => {
|
187
|
+
cy.log('Navigate to Drag and drop into categories question type');
|
188
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
189
|
+
cy.barsPreLoaderWait();
|
190
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
191
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
192
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
193
|
+
});
|
194
|
+
|
195
|
+
it('\'Row minimum height (px)\' label and input field should be displayed. By default, the \'Row minimum height\' input field should be empty', () => {
|
196
|
+
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowMinHeightLabel(), 'Row minimum height (px)');
|
197
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowMinHeightLabel(), 'visible');
|
198
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowMinHeightInputField(), 'visible');
|
199
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue('');
|
200
|
+
});
|
201
|
+
|
202
|
+
it('When the user has not set any value in the \'Row minimum height\' input field, the minimum row height should be 100px by default', () => {
|
203
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(100);
|
204
|
+
});
|
205
|
+
|
206
|
+
it('When the user enters a numeric value in the \'Row minimum height\' input field, the minimum row height should get updated accordingly', () => {
|
207
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(200);
|
208
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(200);
|
209
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(200);
|
210
|
+
});
|
211
|
+
|
212
|
+
it('When user clears the \'Row minimum height\' input field, the minimum row height should change back to the default value', () => {
|
213
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
214
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(100);
|
215
|
+
});
|
216
|
+
|
217
|
+
it('When the users adds a value greater than 400, the entered value should automatically update to 400 and the minimum row height should change to 400px', () => {
|
218
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
219
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(500);
|
220
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(400);
|
221
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(400);
|
222
|
+
});
|
223
|
+
|
224
|
+
it('When the users adds a value less than 50, the entered value should automatically update to 50 and the minimum row height should change to 50px', () => {
|
225
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
226
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(40);
|
227
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(50);
|
228
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightSetCorrectAnswerSection(50);
|
229
|
+
});
|
230
|
+
});
|
231
|
+
|
232
|
+
describe('Additional settings: \'Row minimum height (px)\' - Preview tab', () => {
|
233
|
+
abortEarlySetup();
|
234
|
+
before(() => {
|
235
|
+
cy.log('Navigate to Drag and drop into categories question type');
|
236
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
237
|
+
cy.barsPreLoaderWait();
|
238
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
239
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
240
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
241
|
+
});
|
242
|
+
|
243
|
+
it('When the user has not set any value in the \'Row minimum height\' input field, the minimum row height should be 100px by default in the preview tab', () => {
|
244
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
245
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightPreviewTab(100);
|
246
|
+
});
|
247
|
+
|
248
|
+
it('When the user enters a numeric value in the \'Row minimum height\' input field, the minimum row height should get updated accordingly in the preview tab', () => {
|
249
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
250
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(200);
|
251
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
252
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightPreviewTab(200);
|
253
|
+
});
|
254
|
+
|
255
|
+
it('When user clears the \'Row minimum height\' input field, the minimum row height should change back to the default value in the preview tab', () => {
|
256
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
257
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
258
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
259
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightPreviewTab(100);
|
260
|
+
});
|
261
|
+
|
262
|
+
it('When the users adds a value greater than 400, the entered value should automatically update to 400 and the minimum row height should change to 400px in the preview tab', () => {
|
263
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
264
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
265
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(500);
|
266
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(400);
|
267
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
268
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightPreviewTab(400);
|
269
|
+
});
|
270
|
+
|
271
|
+
it('When the users adds a value less than 50, the entered value should automatically update to 50 and the minimum row height should change to 50px in the preview tab', () => {
|
272
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
273
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowMinHeightInputField();
|
274
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowMinHeightInputField(40);
|
275
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightInputFieldValue(50);
|
276
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
277
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowMinHeightPreviewTab(50);
|
278
|
+
});
|
279
|
+
});
|
280
|
+
|
281
|
+
describe('Additional settings: \'Row heading\' - Contents', () => {
|
282
|
+
abortEarlySetup();
|
283
|
+
before(() => {
|
284
|
+
cy.log('Navigate to Drag and drop into categories question type');
|
285
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
286
|
+
cy.barsPreLoaderWait();
|
287
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
288
|
+
});
|
289
|
+
|
290
|
+
it('\'Row heading\' label and input field should be displayed. By default, the \'Row heading\' input field should be empty', () => {
|
291
|
+
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowHeadingLabel(), 'Row heading');
|
292
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingLabel(), 'visible');
|
293
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingInputField(), 'visible');
|
294
|
+
dragAndDropIntoCategoriesPage.steps.verifyRowHeadingInputFieldValue('');
|
295
|
+
});
|
296
|
+
|
297
|
+
it('CSS of \'Row heading\' contents', { tags: 'css' }, () => {
|
298
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowHeadingLabel(), {
|
299
|
+
'color': css.color.labels,
|
300
|
+
'font-size': css.fontSize.normal,
|
301
|
+
'font-weight': css.fontWeight.semibold
|
302
|
+
});
|
303
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rowHeadingInputField(), {
|
304
|
+
'color': css.color.text,
|
305
|
+
'font-size': css.fontSize.default,
|
306
|
+
'font-weight': css.fontWeight.regular
|
307
|
+
});
|
308
|
+
});
|
309
|
+
|
310
|
+
//Note: a11y covered in verifyAdditonalSettingsAccordionProperties
|
311
|
+
});
|
312
|
+
|
313
|
+
describe('Additional settings: \'Row heading\' - Set correct answer section', () => {
|
314
|
+
abortEarlySetup();
|
315
|
+
before(() => {
|
316
|
+
cy.log('Navigate to Drag and drop into categories question type');
|
317
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
318
|
+
cy.barsPreLoaderWait();
|
319
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
320
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
321
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
322
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
323
|
+
});
|
324
|
+
|
325
|
+
it('When the user has not entered any value in the \'Row heading\' input field, Row heading should not be displayed', () => {
|
326
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingSetCorrectAnswerSection(), 'notExist');
|
327
|
+
});
|
328
|
+
|
329
|
+
it('When the user enters text in the \'Row heading\' input field, a Row heading should be displayed', () => {
|
330
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowHeadingInputField('Row heading');
|
331
|
+
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowHeadingSetCorrectAnswerSection(), 'Row heading');
|
332
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingSetCorrectAnswerSection(), 'visible');
|
333
|
+
});
|
334
|
+
|
335
|
+
it('When user clears the \'Row heading\' input field, the Row heading should disappear', () => {
|
336
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowHeadingInputField();
|
337
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingSetCorrectAnswerSection(), 'notExist');
|
338
|
+
});
|
339
|
+
});
|
340
|
+
|
341
|
+
describe('Additional settings: \'Row heading\' - Preview tab', () => {
|
342
|
+
abortEarlySetup();
|
343
|
+
before(() => {
|
344
|
+
cy.log('Navigate to Drag and drop into categories question type');
|
345
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
346
|
+
cy.barsPreLoaderWait();
|
347
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
348
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints('20');
|
349
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
350
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
351
|
+
});
|
352
|
+
|
353
|
+
it('When the user has not entered any value in the \'Row heading\' input field, Row heading should not be displayed in the preview tab', () => {
|
354
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingPreviewTab(), 'notExist');
|
355
|
+
});
|
356
|
+
|
357
|
+
it('When the user enters text in the \'Row heading\' input field, a Row heading should be displayed in the preview tab', () => {
|
358
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
359
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInRowHeadingInputField('Row heading');
|
360
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
361
|
+
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.rowHeadingPreviewTab(), 'Row heading');
|
362
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingPreviewTab(), 'visible');
|
363
|
+
});
|
364
|
+
|
365
|
+
it('When user clears the \'Row heading\' input field, the Row heading should disappear from the preview tab', () => {
|
366
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
367
|
+
dragAndDropIntoCategoriesPage.steps.clearTextInRowHeadingInputField();
|
368
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
369
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rowHeadingPreviewTab(), 'notExist');
|
370
|
+
});
|
371
|
+
});
|
372
|
+
});
|