itemengine-cypress-automation 1.0.30 → 1.0.32
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesAdditionalSettings.js +963 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesClickAndDrop.js +669 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesEditTabScoringTypes.js +205 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsAllOrNothing.js +143 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsPartialScoreForEachCell.js +145 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsPartialScoreForEachResponse.js +141 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsTotalScoreDividedBetweenCell.js +165 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsTotalScoreDividedBetweenResponses.js +420 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedSetCorrectAnswerCheckboxes.js +266 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesHeaderSection.js +83 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesManuallyAndNonScored.js +184 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesResponseOptionsSection.js +112 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesRowsAndCategoriesSection.js +569 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesSetCorrectAnswerSection.js +130 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardAllOrNothing.js +186 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardPartialScoreForEachCell.js +145 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardPartialScoreForEachResponse.js +140 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardSetCorrectAnswerCheckboxes.js +234 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardTotalScoreDividedBetweenCell.js +165 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardTotalScoreDividedBetweenResponse.js +420 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesSwitchingCases.js +45 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAdditionalSettings.js +1 -415
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAdditionalSettingsBasic.js +423 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAllOrNothingScoring.js +48 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownAutoScoredScoring.js → fillInTheGapsDropdownAllOrNothingScoringWithAlternateAnswer.js} +1 -37
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialDifferentWeights.js +59 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownScoringPartialDifferentWeights.js → fillInTheGapsDropdownPartialDifferentWeightsWithAlternateAnswer.js} +1 -47
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialEqualWeights.js +1 -63
- package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialEqualWeightsWithAlternateAnswer.js +73 -0
- package/package.json +1 -1
@@ -0,0 +1,234 @@
|
|
1
|
+
import { dragAndDropIntoCategoriesPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const answerResponseOptions = ['Bat', 'Eagle', 'Platypus', 'Ostrich', 'Whale', 'Parrot', 'Flying squirrel', 'Peacock', 'Falcon'];
|
4
|
+
|
5
|
+
describe('Create Item page - Drag and drop into categories: Randomize options, Reuse options, Hide drag handle functionalities for \'Standard\' response option layout', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Randomize options - Functionality : Edit tab', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
cy.log('Navigate to drag and drop into categories question type');
|
14
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
17
|
+
});
|
18
|
+
|
19
|
+
it('When the \'Randomize options\' functionality is disabled, the draggable options in the response container should be displayed in the order in which the user has set them in the \'Options for drag & drop\' section', () => {
|
20
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesSetCorrectAnswer('drag and drop into categories', answerResponseOptions);
|
21
|
+
});
|
22
|
+
|
23
|
+
it('When the user enables the \'Randomize options\' functionality, then the draggable options in the response container should be in the order in which the user has set them in the \'Options for drag & drop\' section', () => {
|
24
|
+
dragAndDropIntoCategoriesPage.steps.checkRandomizeOptionsCheckbox();
|
25
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesSetCorrectAnswer('drag and drop into categories', answerResponseOptions);
|
26
|
+
});
|
27
|
+
|
28
|
+
dragAndDropIntoCategoriesPage.tests.verifyCSSAndA11yOfCheckedStateOfRandomizeOptionsCheckbox();
|
29
|
+
});
|
30
|
+
|
31
|
+
describe('Randomize options - Functionality : Preview tab', () => {
|
32
|
+
let optionsArray = [];
|
33
|
+
abortEarlySetup();
|
34
|
+
before(() => {
|
35
|
+
cy.log('Navigate to drag and drop into categories question type');
|
36
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
37
|
+
cy.barsPreLoaderWait();
|
38
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
39
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab()
|
40
|
+
});
|
41
|
+
|
42
|
+
it('When the \'Randomize options\' functionality is disabled, then the draggable options in the response container should be displayed in the order in which the user has set them in the \'Options for drag & drop\' section', () => {
|
43
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesPreviewTab('drag and drop into categories', answerResponseOptions);
|
44
|
+
});
|
45
|
+
|
46
|
+
it('When the user enables the \'Randomize options\' functionality, then the draggable options in the response container should be displayed in a random order', () => {
|
47
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
48
|
+
dragAndDropIntoCategoriesPage.steps.checkRandomizeOptionsCheckbox();
|
49
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
50
|
+
dragAndDropIntoCategoriesPage.steps.verifyRandomizeOptionOrder(answerResponseOptions, 'drag and drop into categories');
|
51
|
+
optionsArray = dragAndDropIntoCategoriesPage.steps.getOptionsArray('drag and drop into categories');
|
52
|
+
});
|
53
|
+
|
54
|
+
it('When the user switches to \'Edit tab\' and does not modify any question properties, then the order of the draggable options should not change in the response container', () => {
|
55
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
56
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
57
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesPreviewTab('drag and drop into categories', optionsArray);
|
58
|
+
});
|
59
|
+
|
60
|
+
it('When the user switches to \'Edit tab\' and modifies any of question properties, then the order of the draggable options should change in the response container', () => {
|
61
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
62
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(5);
|
63
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
64
|
+
dragAndDropIntoCategoriesPage.steps.verifyRandomizeOptionOrder(answerResponseOptions, 'drag and drop into categories');
|
65
|
+
dragAndDropIntoCategoriesPage.steps.verifyRerandomizedOptionsOrder(optionsArray, 'drag and drop into categories')
|
66
|
+
});
|
67
|
+
|
68
|
+
it('When the user disables the \'Randomize options\' functionality, then the draggable options in the response container should be displayed in the order in which the user has set them in the \'Options for drag & drop\' section', () => {
|
69
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
70
|
+
dragAndDropIntoCategoriesPage.steps.uncheckRandomizeOptionsCheckbox();
|
71
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
72
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesPreviewTab('drag and drop into categories', answerResponseOptions);
|
73
|
+
});
|
74
|
+
});
|
75
|
+
|
76
|
+
describe('Reuse options - Functionality : Edit tab', () => {
|
77
|
+
const options = ['Bat', 'Eagle', 'Platypus', 'Ostrich']
|
78
|
+
abortEarlySetup();
|
79
|
+
before(() => {
|
80
|
+
cy.log('Navigate to drag and drop into categories question type');
|
81
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
82
|
+
cy.barsPreLoaderWait();
|
83
|
+
dragAndDropIntoCategoriesPage.steps.addOption();
|
84
|
+
dragAndDropIntoCategoriesPage.steps.addOption();
|
85
|
+
dragAndDropIntoCategoriesPage.steps.addInputToOptionsForDragAndDropFields(options);
|
86
|
+
});
|
87
|
+
|
88
|
+
it('When the \'Reuse options\' functionality is disabled, then on setting correct answer in the category cell, the draggable options should get removed from the response container', () => {
|
89
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
|
90
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesSetCorrectAnswer('drag and drop into categories', ['Eagle', 'Platypus', 'Ostrich'])
|
91
|
+
});
|
92
|
+
|
93
|
+
it('When the user enables the \'Reuse options\' functionality, then on setting correct answer in the category cell, the draggable options should persist in the response container', () => {
|
94
|
+
cy.log('Pre step: Removing the set correct answer option from the category cell')
|
95
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Bat');
|
96
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesSetCorrectAnswer('drag and drop into categories', options)
|
97
|
+
cy.log('Checking the reuse option checkbox and setting the correct answer option')
|
98
|
+
dragAndDropIntoCategoriesPage.steps.checkReuseOptionsCheckbox();
|
99
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
|
100
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesSetCorrectAnswer('drag and drop into categories', options);
|
101
|
+
});
|
102
|
+
|
103
|
+
dragAndDropIntoCategoriesPage.tests.verifyCSSAndA11yOfCheckedStateOfReuseOptionsCheckbox();
|
104
|
+
|
105
|
+
it('The user should be able to use the same draggable option for multiple category cells', () => {
|
106
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 1);
|
107
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInCategoryCellOfSetCorrectAnswerSection(0, ['Bat']);
|
108
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInCategoryCellOfSetCorrectAnswerSection(1, ['Bat']);
|
109
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesSetCorrectAnswer('drag and drop into categories', options);
|
110
|
+
});
|
111
|
+
|
112
|
+
it('When the user removes the draggable option and moves it into the response container, only one option should be displayed in the response container', () => {
|
113
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Bat');
|
114
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Bat');
|
115
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesSetCorrectAnswer('drag and drop into categories', options);
|
116
|
+
});
|
117
|
+
|
118
|
+
it('When the user disables the \'Reuse options\' functionality, the duplicate answer set as correct answer should get removed from the category cell and the draggable option should also not exist in the response container of the \'Set correct answer\' section', () => {
|
119
|
+
cy.log('Pre step: Setting identical options as correct responses')
|
120
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
|
121
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 1);
|
122
|
+
dragAndDropIntoCategoriesPage.steps.uncheckReuseOptionsCheckbox();
|
123
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInCategoryCellOfSetCorrectAnswerSection(0, ['Bat']);
|
124
|
+
dragAndDropIntoCategoriesPage.steps.verifyEmptyStateOfCategoryCellInSetCorrectAnswerSection(1);
|
125
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesSetCorrectAnswer('drag and drop into categories', ['Eagle', 'Platypus', 'Ostrich'])
|
126
|
+
});
|
127
|
+
});
|
128
|
+
|
129
|
+
describe('Reuse options - Functionality: Preview tab', () => {
|
130
|
+
const options = ['Bat', 'Eagle', 'Platypus', 'Ostrich']
|
131
|
+
abortEarlySetup();
|
132
|
+
before(() => {
|
133
|
+
cy.log('Navigate to drag and drop into categories question type');
|
134
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
135
|
+
cy.barsPreLoaderWait();
|
136
|
+
dragAndDropIntoCategoriesPage.steps.addOption();
|
137
|
+
dragAndDropIntoCategoriesPage.steps.addOption();
|
138
|
+
dragAndDropIntoCategoriesPage.steps.addInputToOptionsForDragAndDropFields(options);
|
139
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
140
|
+
});
|
141
|
+
|
142
|
+
it('When the \'Reuse options\' functionality is disabled, then on attempting the question, the draggable options should get removed from the response container', () => {
|
143
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
144
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesPreviewTab('drag and drop into categories', ['Eagle', 'Platypus', 'Ostrich'])
|
145
|
+
});
|
146
|
+
|
147
|
+
it('When the \'Reuse options\' functionality is enabled, then on attempting the question, the draggable options should persist in the response container', () => {
|
148
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
149
|
+
dragAndDropIntoCategoriesPage.steps.checkReuseOptionsCheckbox();
|
150
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
151
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
152
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesPreviewTab('drag and drop into categories', options);
|
153
|
+
});
|
154
|
+
|
155
|
+
it('The user should be able to use the same draggable option for multiple category cells', () => {
|
156
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 1);
|
157
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInCategoryCellOfPreviewTab(0, ['Bat']);
|
158
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInCategoryCellOfPreviewTab(1, ['Bat']);
|
159
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesPreviewTab('drag and drop into categories', options);
|
160
|
+
});
|
161
|
+
|
162
|
+
it('When the user removes the draggable option and moves it into the response container, only one option should be displayed in the response container', () => {
|
163
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfPreviewTab('Bat');
|
164
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfPreviewTab('Bat');
|
165
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesPreviewTab('drag and drop into categories', options);
|
166
|
+
});
|
167
|
+
|
168
|
+
it('When the user disables the \'Reuse options\' functionality, then on attempting the question, the draggable options should get removed from the response container', () => {
|
169
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
170
|
+
dragAndDropIntoCategoriesPage.steps.uncheckReuseOptionsCheckbox();
|
171
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
172
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
|
173
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInCategoryCellOfPreviewTab(0, ['Bat']);
|
174
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesPreviewTab('drag and drop into categories', ['Eagle', 'Platypus', 'Ostrich'])
|
175
|
+
});
|
176
|
+
});
|
177
|
+
|
178
|
+
describe('Reuse options - Scoring', () => {
|
179
|
+
before(() => {
|
180
|
+
cy.log('Navigate to drag and drop into categories question type');
|
181
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
182
|
+
cy.barsPreLoaderWait();
|
183
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
184
|
+
dragAndDropIntoCategoriesPage.steps.checkReuseOptionsCheckbox();
|
185
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
|
186
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 1);
|
187
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(5);
|
188
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
189
|
+
});
|
190
|
+
|
191
|
+
dragAndDropIntoCategoriesPage.tests.verifyReuseOptionScoring();
|
192
|
+
});
|
193
|
+
|
194
|
+
describe('Hide drag handle - Functionality: Edit tab', () => {
|
195
|
+
before(() => {
|
196
|
+
cy.log('Navigate to drag and drop into categories question type');
|
197
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
198
|
+
cy.barsPreLoaderWait();
|
199
|
+
});
|
200
|
+
|
201
|
+
it('When the \'Hide drag handle\' functionality is disabled, then the draggable options displayed in response container of the \'Set correct answer\' section should have a drag handle', () => {
|
202
|
+
dragAndDropIntoCategoriesPage.steps.verifyDragIconVisibleInOptionsInSetCorrectAnswerSection('drag and drop into categories');
|
203
|
+
});
|
204
|
+
|
205
|
+
it('When the user enables the \'Hide drag handle\' functionality, then the draggable options displayed in response container of the \'Set correct answer\' section should not have a drag handle', () => {
|
206
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
207
|
+
dragAndDropIntoCategoriesPage.steps.checkHideDragHandleCheckbox();
|
208
|
+
dragAndDropIntoCategoriesPage.steps.verifyDragIconNotVisibleInOptionsInSetCorrectAnswerSection('drag and drop into categories');
|
209
|
+
});
|
210
|
+
|
211
|
+
dragAndDropIntoCategoriesPage.tests.verifyCSSAndA11yOfCheckedStateOfHideDragHandleCheckbox();
|
212
|
+
});
|
213
|
+
|
214
|
+
describe('Hide drag handle - Functionality: Preview tab', () => {
|
215
|
+
before(() => {
|
216
|
+
cy.log('Navigate to drag and drop into categories question type');
|
217
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
218
|
+
cy.barsPreLoaderWait();
|
219
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
220
|
+
});
|
221
|
+
|
222
|
+
it('When the \'Hide drag handle\' functionality is disabled, then the draggable options displayed in response container of the preview tab should have a drag handle', () => {
|
223
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
224
|
+
dragAndDropIntoCategoriesPage.steps.verifyDragIconVisibleInOptionsInPreviewTab('drag and drop into categories');
|
225
|
+
});
|
226
|
+
|
227
|
+
it('When the \'Hide drag handle\' functionality is enabled, then the draggable options displayed in response container of the preview tab should not have a drag handle', () => {
|
228
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
229
|
+
dragAndDropIntoCategoriesPage.steps.checkHideDragHandleCheckbox();
|
230
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
231
|
+
dragAndDropIntoCategoriesPage.steps.verifyDragIconNotVisibleInOptionsInPreviewTab('drag and drop into categories');
|
232
|
+
});
|
233
|
+
});
|
234
|
+
});
|
@@ -0,0 +1,165 @@
|
|
1
|
+
import { dragAndDropIntoCategoriesCellsScoring } from "../../../pages/dragAndDropIntoCategoriesCellsScoring";
|
2
|
+
import { dragAndDropIntoCategoriesPage } from "../../../pages/dragAndDropIntoCategoriesPage";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
|
5
|
+
describe('Create Item page - drag and drop into categories: Preview tab Scoring Section', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Question preview: AutoScored: Total score divided between each cell', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
cy.log('Navigating to drag and drop into categories question type');
|
14
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
17
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
18
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
19
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
20
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each cell');
|
21
|
+
dragAndDropIntoCategoriesPage.steps.uncheckRoundDownScoreCheckbox();
|
22
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
23
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
24
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
25
|
+
});
|
26
|
+
|
27
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
|
28
|
+
|
29
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnClickingCheckAnswerWithoutAttempting();
|
30
|
+
|
31
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCell('Total score divided between each cell');
|
32
|
+
|
33
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(10);
|
34
|
+
|
35
|
+
//TODO: Need to update penalty points cases after https://redmine.zeuslearning.com/issues/536492
|
36
|
+
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(2, 10);
|
37
|
+
|
38
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 1, 6], 6, 10);
|
39
|
+
});
|
40
|
+
|
41
|
+
describe('Question preview: AutoScored - Total score divided between each cell with alternate answer: When \'Correct answer\' points are more than \'Alternate answer\' points', () => {
|
42
|
+
abortEarlySetup();
|
43
|
+
before(() => {
|
44
|
+
cy.log('Navigating to drag and drop into categories question type');
|
45
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
46
|
+
cy.barsPreLoaderWait();
|
47
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
48
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
49
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
50
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
51
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each cell');
|
52
|
+
dragAndDropIntoCategoriesPage.steps.uncheckRoundDownScoreCheckbox();
|
53
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
54
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
55
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
|
56
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
|
57
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
|
58
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
59
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
60
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(8);
|
61
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
62
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
63
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
64
|
+
});
|
65
|
+
|
66
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
|
67
|
+
|
68
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(10, 10);
|
69
|
+
|
70
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(8, 10);
|
71
|
+
|
72
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithCorrectAnswerPointsMoreThanAlternateAnswerPoints('Total score divided between each cell');
|
73
|
+
});
|
74
|
+
|
75
|
+
describe('Question preview: AutoScored - Total score divided between each cell with alternate answer: When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
|
76
|
+
abortEarlySetup();
|
77
|
+
before(() => {
|
78
|
+
cy.log('Navigating to drag and drop into categories question type');
|
79
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
80
|
+
cy.barsPreLoaderWait();
|
81
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
82
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(8);
|
83
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
84
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
85
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each cell');
|
86
|
+
dragAndDropIntoCategoriesPage.steps.uncheckRoundDownScoreCheckbox();
|
87
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
88
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
89
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
|
90
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
|
91
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
|
92
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
93
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
94
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
95
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
96
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
97
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
98
|
+
});
|
99
|
+
|
100
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
|
101
|
+
|
102
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(8, 10);
|
103
|
+
|
104
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(10, 10);
|
105
|
+
|
106
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithAlternateAnswerPointsMoreThanCorrectAnswerPoints('Total score divided between each cell');
|
107
|
+
});
|
108
|
+
|
109
|
+
describe('Question preview: AutoScored - Total score divided between each cell with alternate answer: When \'Alternate answer\' points is equal to \'Correct answer\' points', () => {
|
110
|
+
abortEarlySetup();
|
111
|
+
before(() => {
|
112
|
+
cy.log('Navigating to drag and drop into categories question type');
|
113
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
114
|
+
cy.barsPreLoaderWait();
|
115
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
116
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
117
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
118
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
119
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each cell');
|
120
|
+
dragAndDropIntoCategoriesPage.steps.uncheckRoundDownScoreCheckbox();
|
121
|
+
dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
|
122
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
|
123
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
|
124
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
|
125
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
|
126
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
|
127
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
|
128
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10);
|
129
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
|
130
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
131
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
132
|
+
});
|
133
|
+
|
134
|
+
dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
|
135
|
+
|
136
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(10, 10);
|
137
|
+
|
138
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(10, 10);
|
139
|
+
|
140
|
+
dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithAlternateAnswerPointsEqualToCorrectAnswerPoints('Total score divided between each cell');
|
141
|
+
|
142
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(10);
|
143
|
+
|
144
|
+
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(2, 10);
|
145
|
+
|
146
|
+
dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 1, 6], 6, 10);
|
147
|
+
});
|
148
|
+
|
149
|
+
describe('Question preview: AutoScored - Total score divided between each cell: Round down score - standard options layout', () => {
|
150
|
+
abortEarlySetup();
|
151
|
+
before(() => {
|
152
|
+
cy.log('Navigating to drag and drop into categories question type');
|
153
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
154
|
+
cy.barsPreLoaderWait();
|
155
|
+
dragAndDropIntoCategoriesPage.steps.setQuestion();
|
156
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(10.5);
|
157
|
+
dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
|
158
|
+
dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
|
159
|
+
dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each cell');
|
160
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
161
|
+
});
|
162
|
+
|
163
|
+
dragAndDropIntoCategoriesPage.tests.verifyRoundDownScoreFunctionality([2, 10, 2.63], 10.5)
|
164
|
+
});
|
165
|
+
});
|