itemengine-cypress-automation 1.0.602-IEI-7279-fe9422d.0 → 1.0.602-IEI-7053-f14f91b.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.
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -100
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -100
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -104
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -115
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -115
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -115
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -102
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -88
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -106
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +2 -382
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +108 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAddEvaluation.js +58 -5
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingBasicForAlternateAnswer.js +25 -2
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +108 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +108 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/blankResponseScoring.js +93 -10
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +123 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +123 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +47 -4
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +123 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +123 -8
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +234 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +235 -0
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +1 -24
- package/cypress/pages/matchingPage.js +2 -2
- package/cypress/pages/textEntryMathPage.js +41 -3
- package/package.json +1 -1
|
@@ -10,10 +10,6 @@ const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
|
|
10
10
|
const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
|
11
11
|
const correctAnswerArray = ['Flower', 'Leaf'];
|
|
12
12
|
const incorrectAnswerArray = ['Branch', 'Seed'];
|
|
13
|
-
const alternateAnswerArray = ['Petal', 'Leaves'];
|
|
14
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
15
|
-
const correctAnswerLabel = 'Correct answer';
|
|
16
|
-
const alternativeAnswerLabel = 'Alternative answer';
|
|
17
13
|
|
|
18
14
|
describe('Create item page - Fill in the gaps over image - dropdown: All or nothing ', () => {
|
|
19
15
|
before(() => {
|
|
@@ -120,12 +116,8 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
|
120
116
|
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
121
117
|
};
|
|
122
118
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
119
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.correctAnswersLabel(), 'Correct answers');
|
|
123
120
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
124
|
-
if(alternativeAnswerCheck === 'true') {
|
|
125
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
126
|
-
} else {
|
|
127
|
-
utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.correctAnswersLabel(), 'Correct answers');
|
|
128
|
-
}
|
|
129
121
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
130
122
|
});
|
|
131
123
|
|
|
@@ -145,9 +137,6 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
|
145
137
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
146
138
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
147
139
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
148
|
-
if (alternativeAnswerCheck === 'true') {
|
|
149
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
150
|
-
}
|
|
151
140
|
});
|
|
152
141
|
|
|
153
142
|
it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
|
@@ -169,9 +158,6 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
|
169
158
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
170
159
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
171
160
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
172
|
-
if (alternativeAnswerCheck === 'true') {
|
|
173
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
174
|
-
}
|
|
175
161
|
});
|
|
176
162
|
|
|
177
163
|
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 icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
@@ -194,188 +180,10 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
|
194
180
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
|
195
181
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
196
182
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
197
|
-
if (alternativeAnswerCheck === 'true') {
|
|
198
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
199
|
-
}
|
|
200
183
|
});
|
|
201
184
|
});
|
|
202
185
|
});
|
|
203
186
|
|
|
204
|
-
if (alternativeAnswerCheck === 'true') {
|
|
205
|
-
views.forEach((view) => {
|
|
206
|
-
describe(`${view}: Auto scored - All or nothing scoring with alternative answers`, { tags: 'smoke' }, () => {
|
|
207
|
-
abortEarlySetup();
|
|
208
|
-
before(() => {
|
|
209
|
-
switch (view) {
|
|
210
|
-
case 'Question preview':
|
|
211
|
-
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image with dropdown');
|
|
212
|
-
cy.barsPreLoaderWait();
|
|
213
|
-
fillInTheGapsOverImageDropdownPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
|
214
|
-
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
|
215
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
|
216
|
-
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(30);
|
|
217
|
-
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
|
|
218
|
-
fillInTheGapsOverImageDropdownPage.steps.allotPoints(20);
|
|
219
|
-
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
|
220
|
-
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
|
221
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
|
222
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
|
223
|
-
fillInTheGapsOverImageDropdownPage.steps.addAlternativeAnswerAccordion(1);
|
|
224
|
-
fillInTheGapsOverImageDropdownPage.steps.allotPoints(10);
|
|
225
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, alternateAnswerArray[0]);
|
|
226
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, alternateAnswerArray[1]);
|
|
227
|
-
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
|
228
|
-
break;
|
|
229
|
-
case 'Item preview':
|
|
230
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
231
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
232
|
-
break;
|
|
233
|
-
case 'Grading view':
|
|
234
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
235
|
-
break;
|
|
236
|
-
};
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
beforeEach(() => {
|
|
240
|
-
switch (view) {
|
|
241
|
-
case 'Question preview':
|
|
242
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
243
|
-
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
|
244
|
-
break;
|
|
245
|
-
case 'Item preview':
|
|
246
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
247
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
|
248
|
-
break;
|
|
249
|
-
case 'Grading view':
|
|
250
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
251
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploadedInPreviewTab();
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
if (view === 'Question preview') {
|
|
257
|
-
after(() => {
|
|
258
|
-
fillInTheGapsOverImageDropdownPage.steps.clickOnSaveQuestionButton();
|
|
259
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
260
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
261
|
-
});
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
|
|
265
|
-
if (view === 'Grading view') {
|
|
266
|
-
studentViewPage.steps.submitResponse();
|
|
267
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
268
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
269
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
270
|
-
};
|
|
271
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
272
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(0, 20);
|
|
273
|
-
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
274
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
275
|
-
};
|
|
276
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
277
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
278
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
279
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
280
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
281
|
-
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
282
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
283
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
284
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
285
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
286
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
287
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
288
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
289
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
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 responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
|
293
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
|
|
294
|
-
if (view === 'Grading view') {
|
|
295
|
-
studentViewPage.steps.submitResponse();
|
|
296
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
297
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
298
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
299
|
-
};
|
|
300
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
301
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(0, 20);
|
|
302
|
-
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
303
|
-
};
|
|
304
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
|
305
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
306
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
307
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
308
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
309
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
310
|
-
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
311
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
312
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
313
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
314
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
315
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
316
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
317
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
318
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
|
322
|
-
if (view === 'Grading view') {
|
|
323
|
-
studentViewPage.steps.clearResponses();
|
|
324
|
-
};
|
|
325
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
|
|
326
|
-
if (view === 'Grading view') {
|
|
327
|
-
studentViewPage.steps.submitResponse();
|
|
328
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
329
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
330
|
-
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
331
|
-
};
|
|
332
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
333
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(0, 20);
|
|
334
|
-
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
335
|
-
};
|
|
336
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
|
337
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
338
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
339
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
340
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(20 points)', 0);
|
|
341
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
342
|
-
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
343
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
344
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
345
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
346
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
347
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(10 points)', 1);
|
|
348
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
349
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
350
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
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 icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
354
|
-
if (view === 'Grading view') {
|
|
355
|
-
studentViewPage.steps.clearResponses();
|
|
356
|
-
};
|
|
357
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
|
358
|
-
if (view === 'Grading view') {
|
|
359
|
-
studentViewPage.steps.submitResponse();
|
|
360
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
361
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
362
|
-
gradingViewPage.steps.verifyGradingViewScore(20, 20);
|
|
363
|
-
};
|
|
364
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
365
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(20, 20);
|
|
366
|
-
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
367
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
|
368
|
-
};
|
|
369
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
|
370
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
|
371
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
372
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
373
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
374
|
-
});
|
|
375
|
-
});
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
|
|
379
187
|
views.forEach((view) => {
|
|
380
188
|
describe(`${view}: Manually scored`, { tags: 'smoke' }, () => {
|
|
381
189
|
abortEarlySetup();
|
|
@@ -451,9 +259,6 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
|
451
259
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
|
452
260
|
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerStatusBannerNotExist();
|
|
453
261
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExist();
|
|
454
|
-
if (alternativeAnswerCheck === 'true') {
|
|
455
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
456
|
-
}
|
|
457
262
|
});
|
|
458
263
|
});
|
|
459
264
|
});
|
|
@@ -526,12 +331,7 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
|
526
331
|
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
527
332
|
};
|
|
528
333
|
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
529
|
-
|
|
530
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(0 points)', 0);
|
|
531
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
532
|
-
} else {
|
|
533
|
-
utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.correctAnswersLabel(), 'Correct answers');
|
|
534
|
-
}
|
|
334
|
+
utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.correctAnswersLabel(), 'Correct answers');
|
|
535
335
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
536
336
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
537
337
|
});
|
|
@@ -551,9 +351,6 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
|
551
351
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
552
352
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
553
353
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
554
|
-
if (alternativeAnswerCheck === 'true') {
|
|
555
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
556
|
-
}
|
|
557
354
|
});
|
|
558
355
|
|
|
559
356
|
it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
|
@@ -574,9 +371,6 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
|
574
371
|
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
575
372
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
576
373
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
577
|
-
if (alternativeAnswerCheck === 'true') {
|
|
578
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
579
|
-
}
|
|
580
374
|
});
|
|
581
375
|
|
|
582
376
|
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 icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
@@ -597,184 +391,10 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
|
|
|
597
391
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
|
598
392
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
599
393
|
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
600
|
-
if (alternativeAnswerCheck === 'true') {
|
|
601
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
602
|
-
}
|
|
603
394
|
});
|
|
604
395
|
});
|
|
605
396
|
});
|
|
606
397
|
|
|
607
|
-
if (alternativeAnswerCheck === 'true') {
|
|
608
|
-
views.forEach((view) => {
|
|
609
|
-
describe(`${view}: Non scored with alternative answers`, { tags: 'smoke' }, () => {
|
|
610
|
-
abortEarlySetup();
|
|
611
|
-
before(() => {
|
|
612
|
-
switch (view) {
|
|
613
|
-
case 'Question preview':
|
|
614
|
-
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image with dropdown');
|
|
615
|
-
cy.barsPreLoaderWait();
|
|
616
|
-
fillInTheGapsOverImageDropdownPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
|
617
|
-
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
|
618
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
|
619
|
-
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(30);
|
|
620
|
-
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
|
|
621
|
-
fillInTheGapsOverImageDropdownPage.steps.expandScoringTypeDropdown();
|
|
622
|
-
fillInTheGapsOverImageDropdownPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
|
623
|
-
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
|
624
|
-
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
|
625
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
|
626
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
|
627
|
-
fillInTheGapsOverImageDropdownPage.steps.addAlternativeAnswerAccordion(1);
|
|
628
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, alternateAnswerArray[0]);
|
|
629
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, alternateAnswerArray[1]);
|
|
630
|
-
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
|
631
|
-
break;
|
|
632
|
-
case 'Item preview':
|
|
633
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
634
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
635
|
-
break;
|
|
636
|
-
case 'Grading view':
|
|
637
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
638
|
-
break;
|
|
639
|
-
};
|
|
640
|
-
});
|
|
641
|
-
|
|
642
|
-
beforeEach(() => {
|
|
643
|
-
switch (view) {
|
|
644
|
-
case 'Question preview':
|
|
645
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
646
|
-
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
|
647
|
-
break;
|
|
648
|
-
case 'Item preview':
|
|
649
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
650
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
|
651
|
-
break;
|
|
652
|
-
case 'Grading view':
|
|
653
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
654
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploadedInPreviewTab();
|
|
655
|
-
break;
|
|
656
|
-
}
|
|
657
|
-
});
|
|
658
|
-
|
|
659
|
-
if (view === 'Question preview') {
|
|
660
|
-
after(() => {
|
|
661
|
-
fillInTheGapsOverImageDropdownPage.steps.clickOnSaveQuestionButton();
|
|
662
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
663
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
664
|
-
});
|
|
665
|
-
};
|
|
666
|
-
|
|
667
|
-
it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
|
|
668
|
-
if (view === 'Grading view') {
|
|
669
|
-
studentViewPage.steps.submitResponse();
|
|
670
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
671
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
672
|
-
};
|
|
673
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
674
|
-
fillInTheGapsOverImageDropdownPage.steps.checkNonScoredScoringLabel();
|
|
675
|
-
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
676
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
677
|
-
};
|
|
678
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
|
679
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(0 points)', 0);
|
|
680
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
681
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
682
|
-
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
683
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
684
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
685
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
686
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
687
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(0 points)', 1);
|
|
688
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
689
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
690
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
691
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
692
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
693
|
-
});
|
|
694
|
-
|
|
695
|
-
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 responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
|
696
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
|
|
697
|
-
if (view === 'Grading view') {
|
|
698
|
-
studentViewPage.steps.submitResponse();
|
|
699
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
700
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
701
|
-
};
|
|
702
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
703
|
-
fillInTheGapsOverImageDropdownPage.steps.checkNonScoredScoringLabel();
|
|
704
|
-
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
705
|
-
};
|
|
706
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
|
707
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
708
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
709
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
710
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(0 points)', 0);
|
|
711
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
712
|
-
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
713
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
714
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
715
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
716
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
717
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(0 points)', 1);
|
|
718
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
719
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
720
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
721
|
-
});
|
|
722
|
-
|
|
723
|
-
it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
|
724
|
-
if (view === 'Grading view') {
|
|
725
|
-
studentViewPage.steps.clearResponses();
|
|
726
|
-
};
|
|
727
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
|
|
728
|
-
if (view === 'Grading view') {
|
|
729
|
-
studentViewPage.steps.submitResponse();
|
|
730
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
731
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
732
|
-
};
|
|
733
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
734
|
-
fillInTheGapsOverImageDropdownPage.steps.checkNonScoredScoringLabel();
|
|
735
|
-
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
736
|
-
};
|
|
737
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
|
738
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
|
739
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
740
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
|
741
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(correctAnswerLabel, '(0 points)', 0);
|
|
742
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
743
|
-
fillInTheGapsOverImageDropdownPage.steps.disableShowAlternativeAnswersToggle();
|
|
744
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
745
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
746
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
747
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
748
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAnswerLabelAndPoints(alternativeAnswerLabel, '(0 points)', 1);
|
|
749
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyAlternativeAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray, 1);
|
|
750
|
-
fillInTheGapsOverImageDropdownPage.steps.clickShowAlternativeAnswersToggle();
|
|
751
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
752
|
-
});
|
|
753
|
-
|
|
754
|
-
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 icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
755
|
-
if (view === 'Grading view') {
|
|
756
|
-
studentViewPage.steps.clearResponses();
|
|
757
|
-
};
|
|
758
|
-
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
|
759
|
-
if (view === 'Grading view') {
|
|
760
|
-
studentViewPage.steps.submitResponse();
|
|
761
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
762
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
763
|
-
};
|
|
764
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
765
|
-
fillInTheGapsOverImageDropdownPage.steps.checkNonScoredScoringLabel();
|
|
766
|
-
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
|
767
|
-
};
|
|
768
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
|
769
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
|
770
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
771
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
772
|
-
fillInTheGapsOverImageDropdownPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
773
|
-
});
|
|
774
|
-
});
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
|
|
778
398
|
if (!grepTags || !grepTags.includes('smoke')) {
|
|
779
399
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
|
780
400
|
abortEarlySetup();
|
package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js
CHANGED
|
@@ -2,6 +2,9 @@ import { textEntryMathPage } from "../../../../pages";
|
|
|
2
2
|
import { equationEditorFlyout } from "../../../../pages/components";
|
|
3
3
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
4
4
|
import utilities from "../../../../support/helpers/utilities";
|
|
5
|
+
import { showAlternativeAnswersComponent } from "../../../../pages/components";
|
|
6
|
+
|
|
7
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
5
8
|
|
|
6
9
|
describe('Create Item page - Text entry math: Preview scoring', () => {
|
|
7
10
|
before(() => {
|
|
@@ -52,7 +55,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
|
|
|
52
55
|
it('When the user selects \'Grading\' view without attempting the question, response numeration should be displayed, correct answers section should be displayed with correct answers from the alternative accordion and respective response numeration, no status message should be displayed', () => {
|
|
53
56
|
textEntryMathPage.steps.switchToGradingView();
|
|
54
57
|
textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
|
|
55
|
-
|
|
58
|
+
if (alternativeAnswerCheck) {
|
|
59
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
60
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
61
|
+
{
|
|
62
|
+
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
63
|
+
points: ['(20 points)']
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
67
|
+
points: ['(12 points)']
|
|
68
|
+
},
|
|
69
|
+
]);
|
|
70
|
+
} else {
|
|
71
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct', '6×π', '7.07e']);
|
|
72
|
+
}
|
|
56
73
|
textEntryMathPage.steps.switchToGradingView();
|
|
57
74
|
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
|
58
75
|
textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
|
@@ -113,7 +130,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
|
|
|
113
130
|
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
|
114
131
|
textEntryMathPage.steps.verifyCorrectResponseIcon(2);
|
|
115
132
|
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
116
|
-
|
|
133
|
+
if (alternativeAnswerCheck) {
|
|
134
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
135
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
136
|
+
{
|
|
137
|
+
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
138
|
+
points: ['(20 points)']
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
142
|
+
points: ['(12 points)']
|
|
143
|
+
},
|
|
144
|
+
]);
|
|
145
|
+
} else {
|
|
146
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct', '6×π', '7.07e']);
|
|
147
|
+
}
|
|
117
148
|
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
118
149
|
});
|
|
119
150
|
|
|
@@ -130,7 +161,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
|
|
|
130
161
|
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
|
131
162
|
textEntryMathPage.steps.verifyCorrectResponseIcon(2);
|
|
132
163
|
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
133
|
-
|
|
164
|
+
if (alternativeAnswerCheck) {
|
|
165
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
166
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
167
|
+
{
|
|
168
|
+
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
169
|
+
points: ['(20 points)']
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
173
|
+
points: ['(12 points)']
|
|
174
|
+
},
|
|
175
|
+
]);
|
|
176
|
+
} else {
|
|
177
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct', '6×π', '7.07e']);
|
|
178
|
+
}
|
|
134
179
|
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
135
180
|
});
|
|
136
181
|
|
|
@@ -147,7 +192,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
|
|
|
147
192
|
textEntryMathPage.steps.verifyCorrectResponseIcon(1);
|
|
148
193
|
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
|
149
194
|
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
150
|
-
|
|
195
|
+
if (alternativeAnswerCheck) {
|
|
196
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
197
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
198
|
+
{
|
|
199
|
+
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
200
|
+
points: ['(20 points)']
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
204
|
+
points: ['(12 points)']
|
|
205
|
+
},
|
|
206
|
+
]);
|
|
207
|
+
} else {
|
|
208
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct', '6×π', '7.07e']);
|
|
209
|
+
}
|
|
151
210
|
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
152
211
|
});
|
|
153
212
|
|
|
@@ -167,7 +226,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
|
|
|
167
226
|
textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
|
|
168
227
|
textEntryMathPage.steps.verifyCorrectResponseIcon(2);
|
|
169
228
|
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
170
|
-
|
|
229
|
+
if (alternativeAnswerCheck) {
|
|
230
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
231
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
232
|
+
{
|
|
233
|
+
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
234
|
+
points: ['(20 points)']
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
238
|
+
points: ['(12 points)']
|
|
239
|
+
},
|
|
240
|
+
]);
|
|
241
|
+
} else {
|
|
242
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct', '6×π', '7.07e']);
|
|
243
|
+
}
|
|
171
244
|
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
172
245
|
});
|
|
173
246
|
|
|
@@ -182,7 +255,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
|
|
|
182
255
|
textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
|
|
183
256
|
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
|
184
257
|
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
185
|
-
|
|
258
|
+
if (alternativeAnswerCheck) {
|
|
259
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
260
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
261
|
+
{
|
|
262
|
+
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
263
|
+
points: ['(20 points)']
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
267
|
+
points: ['(12 points)']
|
|
268
|
+
},
|
|
269
|
+
]);
|
|
270
|
+
} else {
|
|
271
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct', '6×π', '7.07e']);
|
|
272
|
+
}
|
|
186
273
|
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
187
274
|
});
|
|
188
275
|
|
|
@@ -203,7 +290,21 @@ describe('Create Item page - Text entry math: Preview scoring', () => {
|
|
|
203
290
|
textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
|
|
204
291
|
textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
|
|
205
292
|
textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
206
|
-
|
|
293
|
+
if (alternativeAnswerCheck) {
|
|
294
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
295
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSection([
|
|
296
|
+
{
|
|
297
|
+
correctAnswers: ['Correct', '6×π', '7.07e'],
|
|
298
|
+
points: ['(20 points)']
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
correctAnswers: ['Correct', '2x2y2+4xy+4', '9000%'],
|
|
302
|
+
points: ['(12 points)']
|
|
303
|
+
},
|
|
304
|
+
]);
|
|
305
|
+
} else {
|
|
306
|
+
textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct', '6×π', '7.07e']);
|
|
307
|
+
}
|
|
207
308
|
textEntryMathPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
208
309
|
});
|
|
209
310
|
});
|