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,205 @@
1
+ import { dragAndDropIntoCategoriesPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ const css = Cypress.env('css');
4
+ const options = ['Bat', 'Cat']
5
+
6
+ describe('Create Item Page: drag and drop into categories: Edit tab scoring types and set correct answer section (Correct answer tab)', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Scoring Section 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
+ });
18
+
19
+ dragAndDropIntoCategoriesPage.tests.verifyScoringTypeLabelAndDropdown('autoScored');
20
+
21
+ it('CSS of Scoring section', { tags: 'css' }, () => {
22
+ dragAndDropIntoCategoriesPage.scoringSubtypeLabel()
23
+ .verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
24
+ dragAndDropIntoCategoriesPage.scoringSubtypeDropdown()
25
+ .find('.dropdown-label-text')
26
+ .verifyCSS(css.color.liText, css.fontSize.default, css.fontWeight.regular);
27
+ });
28
+
29
+ it('Accessibility of Scoring Section', { tags: 'a11y' }, () => {
30
+ cy.checkAccessibility(dragAndDropIntoCategoriesPage.scoringTypeDropdown().parents('[class*="AllocatedPointsstyles__ScoringTypeDropDownWrapper"]'));
31
+ });
32
+
33
+ it('\'Scoring subtype\' label and dropdown should be displayed and in \'Scoring subtype\' dropdown \'All or nothing\' option should be selected by default', () => {
34
+ dragAndDropIntoCategoriesPage.scoringSubtypeLabel()
35
+ .verifyInnerText('Scoring subtype')
36
+ .and('be.visible');
37
+ dragAndDropIntoCategoriesPage.scoringSubtypeDropdown()
38
+ .verifyInnerText('All or nothing')
39
+ .and('be.visible');
40
+ });
41
+
42
+ it('Clicking on \'Scoring subtype\' dropdown should open a list of scoring subtypes - All or nothing, Total scored divided between each correct response, Partial - score for each correct response, Total score divided between each cell, Partial - score for each cell and on clicking outside the \'Scoring subtype\' dropdown, menu should close', () => {
43
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
44
+ dragAndDropIntoCategoriesPage.steps.verifyListOptionsOfScoringSubtypeDropdown();
45
+ });
46
+ });
47
+
48
+ describe('Edit tab \'Scoring\' section for AutoScored: All or nothing', () => {
49
+ abortEarlySetup();
50
+ before(() => {
51
+ cy.log('Navigate to drag and drop into categories question type');
52
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
53
+ cy.barsPreLoaderWait();
54
+ });
55
+
56
+ dragAndDropIntoCategoriesPage.tests.verifyPointsLabelAndInputField();
57
+
58
+ dragAndDropIntoCategoriesPage.tests.verifyPointsFieldErrorState(10);
59
+
60
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedLabelAndInputField();
61
+ //https://redmine.zeuslearning.com/issues/538268
62
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
63
+ });
64
+
65
+ describe('Edit tab \'Scoring\' section for AutoScored: Total score divided between each correct response', () => {
66
+ abortEarlySetup();
67
+ before(() => {
68
+ cy.log('Navigate to drag and drop into categories question type');
69
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
70
+ cy.barsPreLoaderWait();
71
+ });
72
+
73
+ dragAndDropIntoCategoriesPage.tests.verifyScoringSubtypeWithRoundDownScoreContents('Total score divided between each correct response');
74
+
75
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedLabelAndInputField();
76
+
77
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
78
+
79
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsInputField();
80
+
81
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsErroredState(10, 20);
82
+
83
+ dragAndDropIntoCategoriesPage.tests.verifyCSSandA11yOfRoundDownScoreCheckboxInCheckedState();
84
+ });
85
+
86
+ describe('Edit tab \'Scoring\' section for AutoScored: Partial - score for each correct response', () => {
87
+ abortEarlySetup();
88
+ before(() => {
89
+ cy.log('Navigate to drag and drop into categories question type');
90
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
91
+ cy.barsPreLoaderWait();
92
+ dragAndDropIntoCategoriesPage.steps.addInputToOptionsForDragAndDropFields(options);
93
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
94
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Cat', 1);
95
+ });
96
+
97
+ dragAndDropIntoCategoriesPage.tests.verifyScoringSubtypeWithoutRoundDownScoreContents('Partial - score for each correct response');
98
+
99
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedLabelAndInputField();
100
+
101
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 21, 20);
102
+
103
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsInputField();
104
+
105
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsErroredState(20, 21);
106
+ });
107
+
108
+ describe('Edit tab \'Scoring\' section for AutoScored: Total score divided between each cell', () => {
109
+ abortEarlySetup();
110
+ before(() => {
111
+ cy.log('Navigate to drag and drop into categories question type');
112
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
113
+ cy.barsPreLoaderWait();
114
+ });
115
+
116
+ dragAndDropIntoCategoriesPage.tests.verifyScoringSubtypeWithRoundDownScoreContents('Total score divided between each cell');
117
+
118
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedLabelAndInputField();
119
+
120
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
121
+
122
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsInputField();
123
+
124
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsErroredState(10, 20);
125
+
126
+ dragAndDropIntoCategoriesPage.tests.verifyCSSandA11yOfRoundDownScoreCheckboxInCheckedState();
127
+ });
128
+
129
+ describe('Edit tab \'Scoring\' section for AutoScored: Partial - score for each cell', () => {
130
+ abortEarlySetup();
131
+ before(() => {
132
+ cy.log('Navigate to drag and drop into categories question type');
133
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
134
+ cy.barsPreLoaderWait();
135
+ });
136
+
137
+ dragAndDropIntoCategoriesPage.tests.verifyScoringSubtypeWithoutRoundDownScoreContents('Partial - score for each cell');
138
+
139
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedLabelAndInputField();
140
+
141
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 21, 20);
142
+
143
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsInputField();
144
+
145
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsErroredState(20, 21);
146
+ });
147
+
148
+ describe('Edit tab \'Scoring\' section for Manually Scored scoring type', () => {
149
+ abortEarlySetup();
150
+ before(() => {
151
+ cy.log('Navigate to fill in the gaps - dropdown question type');
152
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
153
+ cy.barsPreLoaderWait();
154
+ });
155
+
156
+ it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
157
+ dragAndDropIntoCategoriesPage.steps.selectAScoringTypeFromScoringTypeDropdown('Manually scored');
158
+ });
159
+
160
+ it('When the user has selected \'Manually Scored\' option from the Scoring Type dropdown then the \'Set Correct Answer\' section should not be displayed; \'Scoring subtype\' dropdown should not be displayed; \'Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed; and inside \'Additional settings\' accordion \'Check answer\' section i.e. \'Allow students to check answer\' checkbox should not be displayed', () => {
161
+ dragAndDropIntoCategoriesPage.setCorrectAnswerLabel()
162
+ .should('not.exist');
163
+ dragAndDropIntoCategoriesPage.scoringSubtypeLabel()
164
+ .should('not.exist');
165
+ dragAndDropIntoCategoriesPage.scoringSubtypeDropdown()
166
+ .should('not.exist');
167
+ dragAndDropIntoCategoriesPage.penaltyPointsInputField()
168
+ .should('not.exist');
169
+ dragAndDropIntoCategoriesPage.penaltyPointsLabel()
170
+ .should('not.exist');
171
+ dragAndDropIntoCategoriesPage.rounddownScoreCheckbox()
172
+ .should('not.exist');
173
+ dragAndDropIntoCategoriesPage.rounddownScoreCheckboxLabel()
174
+ .should('not.exist');
175
+ dragAndDropIntoCategoriesPage.steps.verifyDefaultMinimumScoreIfAttemptedLabelAndPointsField();
176
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings()
177
+ dragAndDropIntoCategoriesPage.checkAnswerLabel()
178
+ .should('not.exist');
179
+ dragAndDropIntoCategoriesPage.allowStudentsToCheckAnswerLabel()
180
+ .should('not.exist');
181
+ });
182
+
183
+ dragAndDropIntoCategoriesPage.tests.verifyPointsFieldErrorState(10);
184
+
185
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
186
+ });
187
+
188
+ describe('Edit tab \'Scoring\' section for Non Scored scoring type', () => {
189
+ abortEarlySetup();
190
+ before(() => {
191
+ cy.log('Navigate to fill in the gaps - dropdown question type');
192
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
193
+ cy.barsPreLoaderWait();
194
+ });
195
+
196
+ dragAndDropIntoCategoriesPage.tests.verifyEditTabNonScoredScoringSectionContents();
197
+
198
+ it('When the user has switched to \'Non Scored\' scoring type, scoring subtype dropdown should not be displayed', () => {
199
+ dragAndDropIntoCategoriesPage.scoringSubtypeLabel()
200
+ .should('not.exist');
201
+ dragAndDropIntoCategoriesPage.scoringSubtypeDropdown()
202
+ .should('not.exist');
203
+ });
204
+ });
205
+ });
@@ -0,0 +1,143 @@
1
+ import { dragAndDropIntoCategoriesAllOrNothingScoring } from "../../../pages/dragAndDropIntoCategoriesAllOrNothingScoring";
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 functionality - grouped options layout', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Show correct answer - grouped options layout', () => {
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.setQuestionForGroupedResponseOptions();
17
+ });
18
+
19
+ dragAndDropIntoCategoriesPage.tests.verifyShowCorrectAnswerAndPointsInPreviewTabWhenNoCorrectAnswerIsSet()
20
+
21
+ dragAndDropIntoCategoriesAllOrNothingScoring.tests.verifyShowCorrectAnswerBasicFunctionality();
22
+ });
23
+
24
+ describe('Question preview: AutoScored: All or nothing - grouped options layout', () => {
25
+ abortEarlySetup();
26
+ before(() => {
27
+ cy.log('Navigating to drag and drop into categories question type');
28
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
29
+ cy.barsPreLoaderWait();
30
+ dragAndDropIntoCategoriesPage.steps.setQuestionForGroupedResponseOptions();
31
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
32
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
33
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
34
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
35
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
36
+ });
37
+
38
+ dragAndDropIntoCategoriesAllOrNothingScoring.tests.verifyAutoScoredAllOrNothingScoring()
39
+
40
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(10);
41
+ });
42
+
43
+ describe('Question preview: AutoScored - All or nothing - grouped options layout with alternate answer', () => {
44
+ abortEarlySetup();
45
+ before(() => {
46
+ cy.log('Navigating to drag and drop into categories question type');
47
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
48
+ cy.barsPreLoaderWait();
49
+ dragAndDropIntoCategoriesPage.steps.setQuestionForGroupedResponseOptions();
50
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
51
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
52
+ dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
53
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
54
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
55
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
56
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
57
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
58
+ dragAndDropIntoCategoriesPage.steps.allotPoints(5);
59
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
60
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
61
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
62
+ });
63
+
64
+ dragAndDropIntoCategoriesAllOrNothingScoring.tests.verifyAutoScoredAllOrNothingWithAlternateAnswer();
65
+
66
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(10);
67
+ });
68
+
69
+
70
+ describe('Question Preview: AutoScored - All or Nothing - grouped options layout with identical draggable response options in preview tab', () => {
71
+ let groupedOptions = [['Bat', 'Eagle', 'Whale', 'Platypus'], ['Bat', 'Parrot', 'Ostrich', 'Flying squirrel']];
72
+ abortEarlySetup();
73
+ before(() => {
74
+ cy.log('Navigate to drag and drop into categories question type, fill the necessary details and points and switch to preview tab');
75
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
76
+ cy.barsPreLoaderWait();
77
+ dragAndDropIntoCategoriesPage.steps.selectResponseOptionsLayout('Grouped');
78
+ dragAndDropIntoCategoriesPage.steps.addGroupTitle(0, 'Group A');
79
+ dragAndDropIntoCategoriesPage.steps.addOption();
80
+ dragAndDropIntoCategoriesPage.steps.addOption();
81
+ dragAndDropIntoCategoriesPage.steps.addInputToOptionsForDragAndDropFields(groupedOptions[0]);
82
+ dragAndDropIntoCategoriesPage.steps.addGroupWithTitleAndOptionsInResponseOptionsSection(1, 'Group B', groupedOptions[1]);
83
+ dragAndDropIntoCategoriesPage.steps.allotPoints(20);
84
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Bat', 0);
85
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
86
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
87
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
88
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
89
+ });
90
+
91
+ it('Case: When user has identical options to give as input', () => {
92
+ cy.log('Both the identical options should be visible in the draggable response options section and when user clicks on \'Show correct answer\' checkbox only one of the identical options should be displayed in the correct answer section');
93
+ dragAndDropIntoCategoriesPage.steps.verifyGroupedResponseContainerContentsInPreviewTab(0, groupedOptions[0]);
94
+ dragAndDropIntoCategoriesPage.steps.verifyGroupedResponseContainerContentsInPreviewTab(1, groupedOptions[1]);
95
+ dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
96
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle']], [1, 2]);
97
+
98
+ cy.log('Post-step: Unchecking show correct answer checkbox');
99
+ dragAndDropIntoCategoriesPage.steps.uncheckShowCorrectAnswerCheckbox();
100
+
101
+ cy.log('When the user gives the correct answer inputs and user selects the show correct answer checkbox, green check-mark icon should be displayed besides both the responses, user should be awarded full points and no correct answer section should be displayed');
102
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
103
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
104
+ cy.log('User should be awarded full points')
105
+ dragAndDropIntoCategoriesPage.previewScoreText()
106
+ .verifyInnerText('20/20');
107
+ dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
108
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
109
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
110
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
111
+
112
+ dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
113
+
114
+ cy.log('When user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides correct answer responses and no correct answer section should be displayed');
115
+ dragAndDropIntoCategoriesPage.steps.checkAnswer();
116
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(0);
117
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
118
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
119
+
120
+ cy.log('When the user attempts the question with the identical option then on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides the original option set as correct responses, red cross-mark icon should be displayed against the identical option and user should be awarded 0 points');
121
+ dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
122
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
123
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Bat', 0);
124
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInGroupedResponseContainerOfPreviewTab('Bat')
125
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfPreviewTab('Eagle', 1);
126
+ cy.log('User should be awarded 0 points')
127
+ dragAndDropIntoCategoriesPage.previewScoreText()
128
+ .verifyInnerText('0/20');
129
+ dragAndDropIntoCategoriesPage.steps.checkShowCorrectAnswerCheckbox();
130
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
131
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
132
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat']], [1]);
133
+
134
+ dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
135
+
136
+ cy.log('When user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the original options set as correct responses, red cross-mark icon should be displayed against the identical option ')
137
+ dragAndDropIntoCategoriesPage.steps.checkAnswer();
138
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
139
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionCheckmarkIcon(1);
140
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotVisible();
141
+ });
142
+ });
143
+ });
@@ -0,0 +1,145 @@
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 functionality - grouped options layout', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Question preview: AutoScored: Partial - score for each cell - grouped options layout', () => {
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.setQuestionForGroupedResponseOptions();
17
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
18
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
19
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
20
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
21
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
22
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
23
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
24
+ });
25
+
26
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
27
+
28
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnClickingCheckAnswerWithoutAttempting();
29
+
30
+ dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCell('Partial - score for each cell');
31
+
32
+ //https://redmine.zeuslearning.com/issues/536492
33
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(40);
34
+
35
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(14, 40);
36
+
37
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 14, 12], 12, 10);
38
+ });
39
+
40
+ describe('Question preview: AutoScored - Partial - score for each cell - grouped options layout with alternate answer: When \'Correct answer\' points are more than \'Alternate answer\' points', () => {
41
+ abortEarlySetup();
42
+ before(() => {
43
+ cy.log('Navigating to drag and drop into categories question type');
44
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
45
+ cy.barsPreLoaderWait();
46
+ dragAndDropIntoCategoriesPage.steps.setQuestionForGroupedResponseOptions();
47
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
48
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
49
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
50
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
51
+ dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
52
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
53
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
54
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
55
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
56
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
57
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
58
+ dragAndDropIntoCategoriesPage.steps.allotPoints(8);
59
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
60
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
61
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
62
+ });
63
+
64
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
65
+
66
+ dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(40, 40);
67
+
68
+ dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(32, 40);
69
+
70
+ dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithCorrectAnswerPointsMoreThanAlternateAnswerPoints('Partial - score for each cell');
71
+ });
72
+
73
+ describe('Question preview: AutoScored - Partial - score for each cell - grouped options layout with alternate answer: When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
74
+ abortEarlySetup();
75
+ before(() => {
76
+ cy.log('Navigating to drag and drop into categories question type');
77
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
78
+ cy.barsPreLoaderWait();
79
+ dragAndDropIntoCategoriesPage.steps.setQuestionForGroupedResponseOptions();
80
+ dragAndDropIntoCategoriesPage.steps.allotPoints(8);
81
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
82
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
83
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
84
+ dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
85
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
86
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
87
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
88
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
89
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
90
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
91
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
92
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
93
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
94
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
95
+ });
96
+
97
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
98
+
99
+ dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(32, 40);
100
+
101
+ dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(40, 40);
102
+
103
+ dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithAlternateAnswerPointsMoreThanCorrectAnswerPoints('Partial - score for each cell');
104
+ });
105
+
106
+ describe('Question preview: AutoScored - Partial - score for each cell - grouped options layout with alternate answer: When \'Alternate answer\' points is equal to \'Correct answer\' points', () => {
107
+ abortEarlySetup();
108
+ before(() => {
109
+ cy.log('Navigating to drag and drop into categories question type');
110
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
111
+ cy.barsPreLoaderWait();
112
+ dragAndDropIntoCategoriesPage.steps.setQuestionForGroupedResponseOptions();
113
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
114
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
115
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
116
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each cell');
117
+ dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
118
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
119
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Peacock', 1);
120
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Falcon', 1);
121
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Platypus', 2);
122
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
123
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
124
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
125
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
126
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
127
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
128
+ });
129
+
130
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(40);
131
+
132
+ dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithCorrectTabAnswerOptions(40, 40);
133
+
134
+ dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellFullyCorrectWithAlternateTabAnswerOptions(40, 40);
135
+
136
+ dragAndDropIntoCategoriesCellsScoring.tests.verifyScoringForEachCellWithAlternateAnswerPointsEqualToCorrectAnswerPoints('Partial - score for each cell');
137
+
138
+ //https://redmine.zeuslearning.com/issues/536492
139
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(40);
140
+
141
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(14, 40);
142
+
143
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 14, 12], 12, 10);
144
+ });
145
+ });
@@ -0,0 +1,141 @@
1
+
2
+ import { dragAndDropIntoCategoriesCorrectResponseScoring } from "../../../pages";
3
+ import { dragAndDropIntoCategoriesPage } from "../../../pages/dragAndDropIntoCategoriesPage";
4
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
5
+
6
+ describe('Create Item page - Drag and drop into categories: Preview tab scoring functionality - grouped options layout', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Question preview: AutoScored: Partial - score for each correct response - grouped options layout', () => {
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.setQuestionForGroupedResponseOptions();
18
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
19
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
20
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
21
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each correct response');
22
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
23
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
24
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
25
+ });
26
+
27
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(60);
28
+
29
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnClickingCheckAnswerWithoutAttempting();
30
+
31
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponse('Partial - score for each correct response');
32
+
33
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(60);
34
+
35
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(37, 60);
36
+
37
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 37, 12], 12, 60);
38
+ });
39
+
40
+ describe('Question preview: AutoScored - Partial - score for each correct response - grouped options layout with alternate answer: When \'Correct answer\' points are more than \'Alternate answer\' points', () => {
41
+ abortEarlySetup();
42
+ before(() => {
43
+ cy.log('Navigating to drag and drop into categories question type');
44
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
45
+ cy.barsPreLoaderWait();
46
+ dragAndDropIntoCategoriesPage.steps.setQuestionForGroupedResponseOptions();
47
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
48
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
49
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
50
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each correct response');
51
+ dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
52
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
53
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
54
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
55
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
56
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
57
+ dragAndDropIntoCategoriesPage.steps.allotPoints(7);
58
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
59
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
60
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
61
+ });
62
+
63
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(60);
64
+
65
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(60, 60);
66
+
67
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(35, 60);
68
+
69
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithCorrectAnswerPointsMoreThanAlternateAnswerPoints('Partial - score for each correct response');
70
+ });
71
+
72
+ describe('Question preview: AutoScored - Partial - score for each correct response - grouped options layout with alternate answer: When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
73
+ abortEarlySetup();
74
+ before(() => {
75
+ cy.log('Navigating to drag and drop into categories question type');
76
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
77
+ cy.barsPreLoaderWait();
78
+ dragAndDropIntoCategoriesPage.steps.setQuestionForGroupedResponseOptions();
79
+ dragAndDropIntoCategoriesPage.steps.allotPoints(8);
80
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
81
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
82
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each correct response');
83
+ dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
84
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
85
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
86
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
87
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
88
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
89
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
90
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
91
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
92
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
93
+ });
94
+
95
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(50);
96
+
97
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(48, 50);
98
+
99
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(50, 50);
100
+
101
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithAlternateAnswerPointsMoreThanCorrectAnswerPoints('Partial - score for each correct response');
102
+ });
103
+
104
+ describe('Question preview: AutoScored - Partial - score for each correct response - grouped options layout with alternate answer: When \'Alternate answer\' points is equal to \'Correct answer\' points', () => {
105
+ abortEarlySetup();
106
+ before(() => {
107
+ cy.log('Navigating to drag and drop into categories question type');
108
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
109
+ cy.barsPreLoaderWait();
110
+ dragAndDropIntoCategoriesPage.steps.setQuestionForGroupedResponseOptions();
111
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
112
+ dragAndDropIntoCategoriesPage.steps.setCorrectTabAnswerOptions();
113
+ dragAndDropIntoCategoriesPage.steps.clickOnScoringSubtypeDropdown();
114
+ dragAndDropIntoCategoriesPage.steps.selectScoringSubTypeDropdownOption('Partial - score for each correct response');
115
+ dragAndDropIntoCategoriesPage.steps.clickOnAddAlternateAnswerButton();
116
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Flying squirrel', 0);
117
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Eagle', 1);
118
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Whale', 2);
119
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Parrot', 2);
120
+ dragAndDropIntoCategoriesPage.steps.clickAndDropDraggableOptionInCategoryCellOfSetCorrectAnswerSection('Ostrich', 3);
121
+ dragAndDropIntoCategoriesPage.steps.allotPoints(10);
122
+ dragAndDropIntoCategoriesPage.steps.expandAdditonalSettings();
123
+ dragAndDropIntoCategoriesPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
124
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
125
+ });
126
+
127
+ dragAndDropIntoCategoriesPage.tests.verifyQuestionPreviewOnSelectingShowCorrectAnswerWithoutAttempting(60);
128
+
129
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithCorrectTabAnswerOptions(60, 60);
130
+
131
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseFullyCorrectWithAlternateTabAnswerOptions(50, 60);
132
+
133
+ dragAndDropIntoCategoriesCorrectResponseScoring.tests.verifyScoringForEachResponseWithAlternateAnswerPointsEqualToCorrectAnswerPoints('Partial - score for each correct response');
134
+
135
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(60);
136
+
137
+ dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsFunctionalityForIncorrectAnswer(37, 60);
138
+
139
+ dragAndDropIntoCategoriesPage.tests.verifyMinimumScoreIfAttemptedAndPenaltyPointsFunctionalityForIncorrectAnswer([1, 37, 12], 12, 60);
140
+ });
141
+ });