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.
Files changed (30) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesAdditionalSettings.js +963 -0
  2. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesClickAndDrop.js +669 -0
  3. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesEditTabScoringTypes.js +205 -0
  4. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsAllOrNothing.js +143 -0
  5. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsPartialScoreForEachCell.js +145 -0
  6. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsPartialScoreForEachResponse.js +141 -0
  7. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsTotalScoreDividedBetweenCell.js +165 -0
  8. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedOptionsTotalScoreDividedBetweenResponses.js +420 -0
  9. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesGroupedSetCorrectAnswerCheckboxes.js +266 -0
  10. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesHeaderSection.js +83 -0
  11. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesManuallyAndNonScored.js +184 -0
  12. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesResponseOptionsSection.js +112 -0
  13. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesRowsAndCategoriesSection.js +569 -0
  14. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesSetCorrectAnswerSection.js +130 -0
  15. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardAllOrNothing.js +186 -0
  16. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardPartialScoreForEachCell.js +145 -0
  17. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardPartialScoreForEachResponse.js +140 -0
  18. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardSetCorrectAnswerCheckboxes.js +234 -0
  19. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardTotalScoreDividedBetweenCell.js +165 -0
  20. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesStandardTotalScoreDividedBetweenResponse.js +420 -0
  21. package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesSwitchingCases.js +45 -0
  22. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAdditionalSettings.js +1 -415
  23. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAdditionalSettingsBasic.js +423 -0
  24. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownAllOrNothingScoring.js +48 -0
  25. package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownAutoScoredScoring.js → fillInTheGapsDropdownAllOrNothingScoringWithAlternateAnswer.js} +1 -37
  26. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialDifferentWeights.js +59 -0
  27. package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownScoringPartialDifferentWeights.js → fillInTheGapsDropdownPartialDifferentWeightsWithAlternateAnswer.js} +1 -47
  28. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialEqualWeights.js +1 -63
  29. package/cypress/e2e/ILC/FillInTheGapsDropdown/fillInTheGapsDropdownPartialEqualWeightsWithAlternateAnswer.js +73 -0
  30. package/package.json +1 -1
@@ -0,0 +1,420 @@
1
+ import { dragAndDropIntoCategoriesCorrectResponseScoring } from "../../../pages";
2
+ import { dragAndDropIntoCategoriesPage } from "../../../pages/dragAndDropIntoCategoriesPage";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ const cellNumerationArray = ['1', '2', '3', '4'];
5
+
6
+ describe('Create Item page - drag and drop into categories: Preview tab Scoring Section', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Question preview: AutoScored: Total score divided between each correct response', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ cy.log('Navigating to drag and drop into categories question type');
15
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
16
+ cy.barsPreLoaderWait();
17
+ dragAndDropIntoCategoriesPage.steps.setQuestion();
18
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
19
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
20
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
21
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each correct response');
22
+ dragAndDropIntoCategoriesPage.steps.uncheckRoundDownScoreCheckbox();
23
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
24
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
25
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
26
+ });
27
+
28
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
29
+
30
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnClickingCheckAnswerWithoutAttempting();
31
+
32
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponse('Total score divided between each correct response');
33
+
34
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(10);
35
+
36
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(3.67, 10);
37
+
38
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 3.67, 6], 6, 10);
39
+ });
40
+
41
+ describe('Question preview: AutoScored - Total score divided between each correct response 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 correct response');
52
+ dragAndDropIntoCategoriesPage.steps.uncheckRoundDownScoreCheckbox();
53
+ dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
54
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
55
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
56
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
57
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
58
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
59
+ dragAndDropIntoCategoriesPage.steps.allotPoints(6);
60
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
61
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
62
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
63
+ });
64
+
65
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
66
+
67
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(10, 10);
68
+
69
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(6, 10);
70
+
71
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithCorrectAnswerPointsMoreThanAlternateAnswerPoints('Total score divided between each correct response');
72
+
73
+ it('Pre-step: Switching to Edit tab and allotting points to correct and alternate tab such points achieved from the alternate tab mapping is more than the correct tab mapping', () => {
74
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
75
+ dragAndDropIntoCategoriesPage.steps.navigateToCorrectTab();
76
+ dragAndDropIntoCategoriesPage.steps.allotPoints(12);
77
+ dragAndDropIntoCategoriesPage.steps.navigateToAlternateTab(1);
78
+ dragAndDropIntoCategoriesPage.steps.allotPoints(11);
79
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
80
+ });
81
+
82
+ it('Overachiever case: When the user attempts the question partially correct with equal number of options from both the tabs in different cells and points achieved from the alternate tab mapping is more than the correct tab mapping then on selecting the \'Show correct answer\' checkbox, the points achieved should be according to the alternate tab mapping, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration', () => {
83
+ dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
84
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
85
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
86
+ cy.log('User should be total score obtained by each correct response')
87
+ dragAndDropIntoCategoriesPage.previewScoreText()
88
+ .verifyInnerText('2.2/12');
89
+ dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
90
+ dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
91
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
92
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
93
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale', 'Parrot'], ['Ostrich']], [2, 3, 4]);
94
+ cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
95
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
96
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
97
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
98
+
99
+ dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
100
+
101
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and no correct answer section should be displayed')
102
+ dragAndDropIntoCategoriesPage.steps.checkAnswer();
103
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
104
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
105
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
106
+ cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
107
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
108
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
109
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
110
+ });
111
+
112
+ it('Overachiever case: When the user attempts the question partially correct with equal number of options from both the tabs in the same cell and points achieved from the alternate tab mapping is more than the correct tab mapping then on selecting the \'Show correct answer\' checkbox, the points achieved should be according to the alternate tab mapping, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration', () => {
113
+ dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
114
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
115
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
116
+ cy.log('User should be total score obtained by each correct response')
117
+ dragAndDropIntoCategoriesPage.previewScoreText()
118
+ .verifyInnerText('2.2/12');
119
+ dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
120
+ dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
121
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
122
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
123
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale', 'Parrot'], ['Ostrich']], [2, 3, 4]);
124
+ cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
125
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
126
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
127
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
128
+
129
+ dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
130
+
131
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and no correct answer section should be displayed')
132
+ dragAndDropIntoCategoriesPage.steps.checkAnswer();
133
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
134
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
135
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
136
+ cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
137
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
138
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
139
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
140
+ });
141
+ });
142
+
143
+ describe('Question preview: AutoScored - Total score divided between each correct response with alternate answer: When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
144
+ abortEarlySetup();
145
+ before(() => {
146
+ cy.log('Navigating to drag and drop into categories question type');
147
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
148
+ cy.barsPreLoaderWait();
149
+ dragAndDropIntoCategoriesPage.steps.setQuestion();
150
+ dragAndDropIntoCategoriesPage.steps.allotPoints(8);
151
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
152
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
153
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each correct response');
154
+ dragAndDropIntoCategoriesPage.steps.uncheckRoundDownScoreCheckbox();
155
+ dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
156
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
157
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
158
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
159
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
160
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
161
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
162
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
163
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
164
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
165
+ });
166
+
167
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
168
+
169
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(8, 10);
170
+
171
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(10, 10);
172
+
173
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithAlternateAnswerPointsMoreThanCorrectAnswerPoints('Total score divided between each correct response');
174
+
175
+ it('Pre-step: Switching to Edit tab, setting more number of correct answer options in alternate tab than correct tab and allotting points to correct and alternate tab such that points achieved from attempting the question partially correct with correct tab mapping is more than the alternate tab mapping', () => {
176
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
177
+ dragAndDropIntoCategoriesPage.steps.navigateToCorrectTab();
178
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Platypus');
179
+ dragAndDropIntoCategoriesPage.steps.allotPoints(11);
180
+ dragAndDropIntoCategoriesPage.steps.navigateToAlternateTab(1);
181
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 3)
182
+ dragAndDropIntoCategoriesPage.steps.allotPoints(12);
183
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
184
+ });
185
+
186
+ it('Overachiever case: When the user attempts the question partially correct with equal number of options from both the tabs in different cells and points achieved from the correct tab mapping is more than the alternate tab mapping then on selecting the \'Show correct answer\' checkbox, the points achieved should be according to the correct tab mapping, green check-mark icon should be displayed besides the correct answer responses from the correct tab, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration', () => {
187
+ dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
188
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
189
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 3);
190
+ cy.log('User should be total score obtained by each correct response')
191
+ dragAndDropIntoCategoriesPage.previewScoreText()
192
+ .verifyInnerText('2.2/12');
193
+ dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
194
+ dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
195
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
196
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
197
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle', 'Parrot'], ['Whale'], ['Ostrich']], [2, 3, 4]);
198
+ cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
199
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
200
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
201
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
202
+
203
+ dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
204
+
205
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the correct tab, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab and no correct answer section should be displayed')
206
+ dragAndDropIntoCategoriesPage.steps.checkAnswer();
207
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
208
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
209
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
210
+ cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
211
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
212
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
213
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
214
+ });
215
+
216
+ it('Overachiever case: When the user attempts the question partially correct with equal number of options from both the tabs in the same cell and points achieved from the correct tab mapping is more than the alternate tab mapping then on selecting the \'Show correct answer\' checkbox, the points achieved should be according to the correct tab mapping, green check-mark icon should be displayed besides the correct answer responses from the correct tab, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab and the correct answer section should display the incorrect/not attempted options from the correct tab along with category cell numeration', () => {
217
+ dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
218
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
219
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
220
+ cy.log('User should be total score obtained by each correct response')
221
+ dragAndDropIntoCategoriesPage.previewScoreText()
222
+ .verifyInnerText('2.2/12');
223
+ dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
224
+ dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
225
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
226
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
227
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle', 'Parrot'], ['Whale'], ['Ostrich']], [2, 3, 4]);
228
+ cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
229
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
230
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
231
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
232
+
233
+ dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
234
+
235
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the correct tab, red cross-mark should be displayed besides the incorrect answer responses from the alternate tab and no correct answer section should be displayed')
236
+ dragAndDropIntoCategoriesPage.steps.checkAnswer();
237
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
238
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
239
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
240
+ cy.log('Correct/Incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
241
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
242
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
243
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
244
+ });
245
+ });
246
+
247
+ describe('Question preview: AutoScored - Total score divided between each correct response with alternate answer: When \'Alternate answer\' points is equal to \'Correct answer\' points', () => {
248
+ abortEarlySetup();
249
+ before(() => {
250
+ cy.log('Navigating to drag and drop into categories question type');
251
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
252
+ cy.barsPreLoaderWait();
253
+ dragAndDropIntoCategoriesPage.steps.setQuestion();
254
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
255
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
256
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
257
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each correct response');
258
+ dragAndDropIntoCategoriesPage.steps.uncheckRoundDownScoreCheckbox();
259
+ dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
260
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
261
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
262
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
263
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
264
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
265
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
266
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
267
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
268
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
269
+ });
270
+
271
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(10);
272
+
273
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(10, 10);
274
+
275
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(10, 10);
276
+
277
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithAlternateAnswerPointsEqualToCorrectAnswerPoints('Total score divided between each correct response');
278
+
279
+ it('Resetting the alternate correct answer options according to original mapping', () => {
280
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
281
+ dragAndDropIntoCategoriesPage.steps.navigateToAlternateTab(1);
282
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Platypus');
283
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
284
+ });
285
+
286
+ it('When the user attempts the question partially correct with equal number of correct options exclusively from the alternate tab and correct tab in the different cell then on selecting the \'Show correct answer\' checkbox, the points provided should be of the total points obtained by each correct response from the alternate tab mapping, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer response from the correct tab and the correct answer section should display the incorrect/not attempted options from the alternate tab along with category cell numeration', () => {
287
+ dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
288
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
289
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
290
+ cy.log('User should be total score obtained by each correct response')
291
+ dragAndDropIntoCategoriesPage.previewScoreText()
292
+ .verifyInnerText('2/10');
293
+ dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
294
+ dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
295
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
296
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
297
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale', 'Parrot'], ['Ostrich']], [2, 3, 4]);
298
+ cy.log('correct/incorrect border and icon for cell should not be displayed, correct answer border for the question and label should not be displayed below the question preview')
299
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
300
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
301
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
302
+
303
+ dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
304
+
305
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses and no correct answer section should be displayed')
306
+ dragAndDropIntoCategoriesPage.steps.checkAnswer();
307
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
308
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
309
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
310
+ cy.log('correct/incorrect border and icon for cell should not be displayed, correct answer border for the question and label should not be displayed below the question preview')
311
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
312
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
313
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
314
+ });
315
+
316
+ it('When the user attempts the question partially correct with equal number of correct options exclusively from the alternate tab and correct tab in the same cell then on selecting the \'Show correct answer\' checkbox, the points provided should be of the total points obtained by each correct response from the alternate tab mapping, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer response from the correct tab and the correct answer section should display the incorrect/not attempted options from the alternate tab along with category cell numeration', () => {
317
+ dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
318
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
319
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
320
+ cy.log('User should be total score obtained by each correct response')
321
+ dragAndDropIntoCategoriesPage.previewScoreText()
322
+ .verifyInnerText('2/10');
323
+ dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
324
+ dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
325
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
326
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
327
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Eagle'], ['Whale', 'Parrot'], ['Ostrich']], [2, 3, 4]);
328
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
329
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
330
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
331
+
332
+ dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
333
+
334
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer response from the correct tab and no correct answer section should be displayed')
335
+ dragAndDropIntoCategoriesPage.steps.checkAnswer();
336
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
337
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
338
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
339
+ cy.log('correct/incorrect border and icon for cell should not be displayed, correct answer border for the question and label should not be displayed below the question preview')
340
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
341
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
342
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
343
+ });
344
+
345
+ it('Pre-step: Switching to Edit tab, setting only one correct answer option in alternate tab such that points achieved from attempting the question partially correct with alternate tab mapping is more than the correct tab mapping', () => {
346
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
347
+ dragAndDropIntoCategoriesPage.steps.navigateToAlternateTab(1);
348
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Eagle');
349
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Parrot');
350
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Whale');
351
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInResponseContainerOfSetCorrectAnswerSection('Ostrich');
352
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
353
+ });
354
+
355
+ it('Overachiever case: When the user attempts the question partially correct with more number of options from the the correct tab but one option exclusively from the alternate tab and points achieved from the alternate tab mapping is more than the correct tab mapping then on selecting the \'Show correct answer\' checkbox, the points achieved should be according to the alternate tab mapping, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and no correct answer section should be displayed', () => {
356
+ dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
357
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Flying squirrel', 0);
358
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
359
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Parrot', 1);
360
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Platypus', 2);
361
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Whale', 2);
362
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Ostrich', 3);
363
+ cy.log('User should be awarded full points')
364
+ dragAndDropIntoCategoriesPage.previewScoreText()
365
+ .verifyInnerText('10/10');
366
+ dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
367
+ dragAndDropIntoCategoriesPage.steps.verifyNumerationOfCategoryCellsInQuestionPreview(cellNumerationArray);
368
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
369
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
370
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
371
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
372
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(4);
373
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(5);
374
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
375
+ cy.log('correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
376
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
377
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
378
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
379
+
380
+ dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
381
+
382
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the correct answer responses from the alternate tab, red cross-mark should be displayed besides the incorrect answer responses from the correct tab and no correct answer section should be displayed')
383
+ dragAndDropIntoCategoriesPage.steps.checkAnswer();
384
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
385
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
386
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
387
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(3);
388
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(4);
389
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(5);
390
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
391
+ cy.log('correct/incorrect border and icon for cell should not be displayed, incorrect answer border for the question and label should not be displayed below the question preview')
392
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
393
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectCellBorderNotExists();
394
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectBorderNotVisible();
395
+ });
396
+
397
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(10);
398
+
399
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(3.67, 10);
400
+
401
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 3.67, 6], 6, 10);
402
+ });
403
+
404
+ describe('Question preview: AutoScored - Total score divided between each correct response: Round down score - standard options layout', () => {
405
+ abortEarlySetup();
406
+ before(() => {
407
+ cy.log('Navigating to drag and drop into categories question type');
408
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
409
+ cy.barsPreLoaderWait();
410
+ dragAndDropIntoCategoriesPage.steps.setQuestion();
411
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10.5);
412
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
413
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
414
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Total score divided between each correct response');
415
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
416
+ });
417
+
418
+ dragAndDropIntoCategoriesPage.tests.verifyRoundDownScoreFunctionality([1, 10, 1.75], 10.5)
419
+ });
420
+ });
@@ -0,0 +1,45 @@
1
+ import { dragAndDropIntoCategoriesPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ const css = Cypress.env('css');
4
+ let optionsForResponses = ['Bat', 'Eagle'];
5
+ let optionsForResponses2 = ['Parrot', 'Whale'];
6
+ let optionsForResponses3 = ['Bat', 'Eagle', 'Parrot', 'Whale'];
7
+
8
+ describe('Create Item Page: Drag and drop into categories: Switching cases between \'Standard\' and \'Grouped\' response layouts', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Drag and drop into categories: Switching cases between \'Standard\' and \'Grouped\' response layouts: \'Response Options section\'', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
17
+ cy.barsPreLoaderWait();
18
+ dragAndDropIntoCategoriesPage.steps.addInputToOptionsForDragAndDropFields(optionsForResponses);
19
+ });
20
+
21
+ it('When the user switches from \'Standard\' response layout to \'Grouped\', all the option input fields along with text should appear in the group options', () => {
22
+ dragAndDropIntoCategoriesPage.steps.selectResponseOptionsLayout('Grouped');
23
+ dragAndDropIntoCategoriesPage.steps.verifyOptionFieldContentsInOptionsSection(optionsForResponses);
24
+ cy.log('verifying draggable options in \'Set correct answer\' section')
25
+ dragAndDropIntoCategoriesPage.steps.verifyGroupedResponseContainerContentsInSetCorrectAnswerSection(0, optionsForResponses);
26
+ });
27
+
28
+ it('When the user creates more than one group of options and switches to \'Standard\' response layout, all the option input fields along with text should appear in the standard options', () => {
29
+ cy.log('Adding a new group and adding input to the option fields')
30
+ dragAndDropIntoCategoriesPage.steps.addGroupWithTitleAndOptionsInResponseOptionsSection(1, 'Group B', optionsForResponses2);
31
+ dragAndDropIntoCategoriesPage.steps.selectResponseOptionsLayout('Standard');
32
+ dragAndDropIntoCategoriesPage.steps.verifyOptionFieldContentsInOptionsSection(optionsForResponses3);
33
+ cy.log('verifying draggable options in \'Set correct answer\' section')
34
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableResponsesSetCorrectAnswer('drag and drop into categories', optionsForResponses3);
35
+ });
36
+
37
+ it('On switching back to \'Grouped\' response layout, all option input fields should be present under Group A and no other group should exist', () => {
38
+ dragAndDropIntoCategoriesPage.steps.selectResponseOptionsLayout('Grouped');
39
+ dragAndDropIntoCategoriesPage.steps.verifyGroupInResponseOptionSectionNotExists(1);
40
+ dragAndDropIntoCategoriesPage.steps.verifyOptionFieldContentsInOptionsSection(optionsForResponses3);
41
+ cy.log('verifying draggable options in \'Set correct answer\' section')
42
+ dragAndDropIntoCategoriesPage.steps.verifyGroupedResponseContainerContentsInSetCorrectAnswerSection(0, optionsForResponses3);
43
+ });
44
+ });
45
+ });