itemengine-cypress-automation 1.0.570 → 1.0.571-scoring-fix-97df000.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -143,4 +143,84 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
143
143
  fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(2, 20);
144
144
  });
145
145
  });
146
+
147
+ describe('Auto scored - Partial equal weights when response container is deleted', () => {
148
+ abortEarlySetup();
149
+ before(() => {
150
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image with dropdown');
151
+ cy.barsPreLoaderWait();
152
+ fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
153
+ fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
154
+ fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(30);
155
+ fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
156
+ fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(50);
157
+ fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
158
+ fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
159
+ fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(2, optionsForDropdown2);
160
+ fillInTheGapsOverImageDropdownPage.steps.removeResponseArea(1);
161
+ fillInTheGapsOverImageDropdownPage.steps.allotPoints(10);
162
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
163
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
164
+ fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
165
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
166
+ //fillInTheGapsOverImageDropdownPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
167
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
168
+ });
169
+
170
+ it('When the user selects \'Grading\' view without attempting the question, response area numeration should be displayed, correct answers section should be displayed with correct answers and respective response area numeration', () => {
171
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(0, 10);
172
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
173
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
174
+ fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
175
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
176
+ });
177
+
178
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect dropdowns, correct/incorrect status message should not be displayed and correct answer section with all correct answers along with numeration should be displayed', () => {
179
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
180
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(0, 10);
181
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
182
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
183
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
184
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
185
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
186
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
187
+ });
188
+
189
+ it('When the user attempts the question partially correct, then the user should be awarded points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct dropdowns, incorrect icon should be displayed besides incorrect dropdowns, correct/incorrect status message should not be displayed and correct answer section with all correct answers along with numeration should be displayed', () => {
190
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
191
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
192
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(5, 10);
193
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
194
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
195
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
196
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
197
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
198
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
199
+ /*cy.log('When the user attempts the question partially correct and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, correct/incorrect status message and correct answer section should not be displayed')
200
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
201
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
202
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
203
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
204
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();*/
205
+ });
206
+
207
+ it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
208
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
209
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
210
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(10, 10);
211
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
212
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
213
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
214
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
215
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
216
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
217
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
218
+ /*cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
219
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
220
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
221
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
222
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
223
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();*/
224
+ });
225
+ });
146
226
  });
@@ -67,61 +67,79 @@ describe('Create item page - Short text response: Conditional checkboxes', () =>
67
67
 
68
68
  describe('Only \'Validate if answer is included in the response\' checkbox checked', () => {
69
69
  abortEarlySetup();
70
- before(() => {
71
- shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
72
- shortTextResponsePage.steps.allotPoints(10);
73
- shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Flower is displayed');
74
- shortTextResponsePage.steps.checkConditionalCheckbox('Validate if answer is included in the response');
75
- shortTextResponsePage.steps.uncheckConditionalCheckbox('Ignore extra spaces');
76
- //shortTextResponsePage.steps.checkAllowStudentToCheckAnswerCheckbox();
77
- shortTextResponsePage.steps.switchToPreviewTab();
78
- });
79
-
80
- it('When user attempts the question with a sentence which includes the answer then full points should be awarded and when user switches to grading view, green check mark beside the response field should be displayed', () => {
81
- shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Flower is displayed in this image');
82
- shortTextResponsePage.steps.verifyPreviewScore(10, 10);
83
- shortTextResponsePage.steps.switchToGradingView();
84
- shortTextResponsePage.steps.verifyCorrectIcon();
85
- });
86
-
87
- it('When user attempts the question with a sentence that includes the answer with incorrect casing, then full score should be awarded and when user switches to grading view, a green check mark should be displayed beside response field', () => {
88
- shortTextResponsePage.steps.resetQuestionPreview();
89
- shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('floweR is Displayed');
90
- shortTextResponsePage.steps.verifyPreviewScore(10, 10);
91
- shortTextResponsePage.steps.switchToGradingView();
92
- shortTextResponsePage.steps.verifyCorrectIcon();
93
- });
94
-
95
- it('When user attempts the question with a sentence which includes the answer and correct casing with extra spaces in between the answer then zero points should be awarded and when user switches to grading view, red cross mark beside the response field should be displayed', () => {
96
- shortTextResponsePage.steps.resetQuestionPreview();
97
- shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Flower is displayed in the picture');
98
- shortTextResponsePage.steps.verifyPreviewScore(0, 10);
99
- shortTextResponsePage.steps.switchToGradingView();
100
- shortTextResponsePage.steps.verifyIncorrectIcon();
101
- });
102
-
103
- it('When user attempts the question with answer that has incorrect casing with extra spaces before and after correct answer then full points should be awarded and when user switches to grading view, green check mark beside the response field should be displayed', () => {
104
- shortTextResponsePage.steps.resetQuestionPreview();
105
- shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab(' flower is Displayed ');
106
- shortTextResponsePage.steps.verifyPreviewScore(10, 10);
107
- shortTextResponsePage.steps.switchToGradingView();
108
- shortTextResponsePage.steps.verifyCorrectIcon();
109
- });
110
-
111
- it('When user attempts the question with answer that has correct casing with extra spaces before and after correct answer and then full points should be awarded and when user switches to grading view, green check mark beside the correct response field should be displayed', () => {
112
- shortTextResponsePage.steps.resetQuestionPreview();
113
- shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab(' Flower is displayed ');
114
- shortTextResponsePage.steps.verifyPreviewScore(10, 10);
115
- shortTextResponsePage.steps.switchToGradingView();
116
- shortTextResponsePage.steps.verifyCorrectIcon();
117
- });
118
-
119
- it('When user attempts the question with exact answer then full points should be awarded and when user switches to grading view, green check mark beside the correct response field should be displayed', () => {
120
- shortTextResponsePage.steps.resetQuestionPreview();
121
- shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Flower is displayed');
122
- shortTextResponsePage.steps.verifyPreviewScore(10, 10);
123
- shortTextResponsePage.steps.switchToGradingView();
124
- shortTextResponsePage.steps.verifyCorrectIcon();
70
+
71
+ describe('Text Answer Tests', () => {
72
+ before(() => {
73
+ shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
74
+ shortTextResponsePage.steps.allotPoints(10);
75
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Flower is displayed');
76
+ shortTextResponsePage.steps.checkConditionalCheckbox('Validate if answer is included in the response');
77
+ shortTextResponsePage.steps.uncheckConditionalCheckbox('Ignore extra spaces');
78
+ //shortTextResponsePage.steps.checkAllowStudentToCheckAnswerCheckbox();
79
+ shortTextResponsePage.steps.switchToPreviewTab();
80
+ });
81
+
82
+ it('When user attempts the question with a sentence which includes the answer then full points should be awarded and when user switches to grading view, green check mark beside the response field should be displayed', () => {
83
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Flower is displayed in this image');
84
+ shortTextResponsePage.steps.verifyPreviewScore(10, 10);
85
+ shortTextResponsePage.steps.switchToGradingView();
86
+ shortTextResponsePage.steps.verifyCorrectIcon();
87
+ });
88
+
89
+ it('When user attempts the question with a sentence that includes the answer with incorrect casing, then full score should be awarded and when user switches to grading view, a green check mark should be displayed beside response field', () => {
90
+ shortTextResponsePage.steps.resetQuestionPreview();
91
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('floweR is Displayed');
92
+ shortTextResponsePage.steps.verifyPreviewScore(10, 10);
93
+ shortTextResponsePage.steps.switchToGradingView();
94
+ shortTextResponsePage.steps.verifyCorrectIcon();
95
+ });
96
+
97
+ it('When user attempts the question with a sentence which includes the answer and correct casing with extra spaces in between the answer then zero points should be awarded and when user switches to grading view, red cross mark beside the response field should be displayed', () => {
98
+ shortTextResponsePage.steps.resetQuestionPreview();
99
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Flower is displayed in the picture');
100
+ shortTextResponsePage.steps.verifyPreviewScore(0, 10);
101
+ shortTextResponsePage.steps.switchToGradingView();
102
+ shortTextResponsePage.steps.verifyIncorrectIcon();
103
+ });
104
+
105
+ it('When user attempts the question with answer that has incorrect casing with extra spaces before and after correct answer then full points should be awarded and when user switches to grading view, green check mark beside the response field should be displayed', () => {
106
+ shortTextResponsePage.steps.resetQuestionPreview();
107
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab(' flower is Displayed ');
108
+ shortTextResponsePage.steps.verifyPreviewScore(10, 10);
109
+ shortTextResponsePage.steps.switchToGradingView();
110
+ shortTextResponsePage.steps.verifyCorrectIcon();
111
+ });
112
+
113
+ it('When user attempts the question with answer that has correct casing with extra spaces before and after correct answer and then full points should be awarded and when user switches to grading view, green check mark beside the correct response field should be displayed', () => {
114
+ shortTextResponsePage.steps.resetQuestionPreview();
115
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab(' Flower is displayed ');
116
+ shortTextResponsePage.steps.verifyPreviewScore(10, 10);
117
+ shortTextResponsePage.steps.switchToGradingView();
118
+ shortTextResponsePage.steps.verifyCorrectIcon();
119
+ });
120
+
121
+ it('When user attempts the question with exact answer then full points should be awarded and when user switches to grading view, green check mark beside the correct response field should be displayed', () => {
122
+ shortTextResponsePage.steps.resetQuestionPreview();
123
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Flower is displayed');
124
+ shortTextResponsePage.steps.verifyPreviewScore(10, 10);
125
+ shortTextResponsePage.steps.switchToGradingView();
126
+ shortTextResponsePage.steps.verifyCorrectIcon();
127
+ });
128
+ });
129
+
130
+ describe('Mathematical Expression Tests', () => {
131
+ before(() => {
132
+ shortTextResponsePage.steps.switchToEditTab();
133
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('y=-2x+5');
134
+ shortTextResponsePage.steps.switchToPreviewTab();
135
+ });
136
+
137
+ it('When user attempts the question with exact mathematical expression then full points should be awarded and when user switches to grading view, green check mark beside the response field should be displayed', () => {
138
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('y=-2x+5');
139
+ shortTextResponsePage.steps.verifyPreviewScore(10, 10);
140
+ shortTextResponsePage.steps.switchToGradingView();
141
+ shortTextResponsePage.steps.verifyCorrectIcon();
142
+ });
125
143
  });
126
144
  });
127
145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.570",
3
+ "version": "1.0.571-scoring-fix-97df000.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {