itemengine-cypress-automation 1.0.584-IEI-7041-1da58ac.0 → 1.0.584-IEI-7048-098328c.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/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +8 -109
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +8 -109
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +8 -109
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +2 -7
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +10 -139
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +9 -124
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +10 -139
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +9 -124
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +8 -109
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +9 -124
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -243
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +77 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +78 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +78 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +104 -9
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +95 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +95 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +84 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +73 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +84 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +187 -2
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +79 -1
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +79 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +79 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +4 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +91 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +79 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +91 -0
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +209 -5
- package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +195 -1
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +85 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +82 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +85 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +109 -6
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +103 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +91 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsBasic.js +4 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +79 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +91 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +207 -3
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +9 -1
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +102 -2
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +102 -2
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +107 -2
- package/cypress/e2e/ILC/Matching/Scoring/blankResponseScoring.js +36 -2
- package/cypress/e2e/ILC/Matching/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +5 -0
- package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +1 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +10 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +128 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +115 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +128 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +9 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +102 -2
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +115 -2
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +226 -2
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +9 -1
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +102 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +102 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +102 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +32 -5
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +3 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +10 -1
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +128 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +115 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +128 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +9 -1
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +102 -2
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +115 -2
- package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +216 -2
- package/cypress/pages/components/correctIncorrectAnswerLabelComponent.js +18 -1
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +1 -25
- package/cypress/pages/listOrderingPage.js +60 -1
- package/cypress/pages/matchingPage.js +23 -1
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ const views = utilities.getViews(correctAnswerViews);
|
|
|
8
8
|
var itemReferenceID = "";
|
|
9
9
|
const options = ['sprout', 'plant', 'flower', 'seed'];
|
|
10
10
|
const correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
|
11
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
11
12
|
|
|
12
13
|
describe('Create item page - List ordering: All or nothing ', () => {
|
|
13
14
|
before(() => {
|
|
@@ -118,8 +119,11 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
118
119
|
};
|
|
119
120
|
//Failing due to https://weldnorthed.atlassian.net/browse/IEI-2964
|
|
120
121
|
// listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
if (alternativeAnswerCheck === 'true') {
|
|
123
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
124
|
+
} else {
|
|
125
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
126
|
+
}
|
|
123
127
|
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
|
124
128
|
});
|
|
125
129
|
|
|
@@ -191,11 +195,193 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
191
195
|
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
|
192
196
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
193
197
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
198
|
+
if (alternativeAnswerCheck === 'true') {
|
|
199
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
200
|
+
}
|
|
194
201
|
cy.eyesCheckWindow(`List ordering -${view} view - Attempting the question correctly`);
|
|
195
202
|
});
|
|
196
203
|
});
|
|
197
204
|
});
|
|
198
205
|
|
|
206
|
+
if (alternativeAnswerCheck === 'true') {
|
|
207
|
+
views.forEach((view) => {
|
|
208
|
+
describe.skip(`${view}: Auto scored - All or nothing scoring with alternative answer`, { tags: 'smoke' }, () => {
|
|
209
|
+
abortEarlySetup();
|
|
210
|
+
before(() => {
|
|
211
|
+
switch (view) {
|
|
212
|
+
case 'Question preview':
|
|
213
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
|
214
|
+
cy.barsPreLoaderWait();
|
|
215
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
|
216
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
|
217
|
+
listOrderingPage.steps.allotPoints(20);
|
|
218
|
+
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
|
|
219
|
+
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
|
|
220
|
+
listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
|
|
221
|
+
listOrderingPage.steps.addAlternativeAnswerAccordion(1);
|
|
222
|
+
listOrderingPage.steps.allotPoints(15);
|
|
223
|
+
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
|
|
224
|
+
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('plant', 3);
|
|
225
|
+
listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('flower', 1);
|
|
226
|
+
listOrderingPage.steps.switchToPreviewTab();
|
|
227
|
+
break;
|
|
228
|
+
case 'Item preview':
|
|
229
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
230
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
231
|
+
break;
|
|
232
|
+
case 'Grading view':
|
|
233
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
234
|
+
break;
|
|
235
|
+
};
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
beforeEach(() => {
|
|
239
|
+
switch (view) {
|
|
240
|
+
case 'Question preview':
|
|
241
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
242
|
+
listOrderingPage.steps.resetQuestionPreview();
|
|
243
|
+
break;
|
|
244
|
+
case 'Item preview':
|
|
245
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
246
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
|
247
|
+
break;
|
|
248
|
+
case 'Grading view':
|
|
249
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
if (view === 'Question preview') {
|
|
255
|
+
after(() => {
|
|
256
|
+
listOrderingPage.steps.clickOnSaveQuestionButton();
|
|
257
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
258
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
it('When the user selects \'Grading\' view without attempting the question, then correct/incorrect icons and correct incorrect status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
|
|
263
|
+
if (view === 'Grading view') {
|
|
264
|
+
studentViewPage.steps.submitResponse();
|
|
265
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
266
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
267
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
268
|
+
};
|
|
269
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
270
|
+
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
|
271
|
+
listOrderingPage.steps.switchToGradingView();
|
|
272
|
+
listOrderingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
273
|
+
};
|
|
274
|
+
//Failing due to https://weldnorthed.atlassian.net/browse/IEI-2964
|
|
275
|
+
// listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
276
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
277
|
+
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
|
278
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
279
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
|
|
280
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
281
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
282
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
283
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
284
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
285
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
286
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(15 points)', 1);
|
|
287
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant' ]);
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
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 should be displayed', () => {
|
|
291
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
|
|
292
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
|
|
293
|
+
if (view === 'Grading view') {
|
|
294
|
+
studentViewPage.steps.submitResponse();
|
|
295
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
296
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
297
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
298
|
+
};
|
|
299
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
300
|
+
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
|
301
|
+
listOrderingPage.steps.switchToGradingView();
|
|
302
|
+
};
|
|
303
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
|
304
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
|
305
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
|
|
306
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
|
|
307
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
308
|
+
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
|
309
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
310
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
|
|
311
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
312
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
313
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
314
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
315
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
316
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
317
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(15 points)', 1);
|
|
318
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant' ]);
|
|
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 should be displayed', () => {
|
|
322
|
+
if (view === 'Grading view') {
|
|
323
|
+
studentViewPage.steps.clearResponses();
|
|
324
|
+
};
|
|
325
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 3);
|
|
326
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 0);
|
|
327
|
+
if (view === 'Grading view') {
|
|
328
|
+
studentViewPage.steps.submitResponse();
|
|
329
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
330
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
331
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
332
|
+
};
|
|
333
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
334
|
+
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
|
335
|
+
listOrderingPage.steps.switchToGradingView();
|
|
336
|
+
};
|
|
337
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
|
338
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
|
|
339
|
+
listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
|
|
340
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
|
341
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
342
|
+
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
|
343
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
344
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
|
|
345
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
346
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
347
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
348
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
349
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
350
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
351
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(15 points)', 1);
|
|
352
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant' ]);
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
it(`${view}: List ordering - 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`, () => {
|
|
356
|
+
if (view === 'Grading view') {
|
|
357
|
+
studentViewPage.steps.clearResponses();
|
|
358
|
+
};
|
|
359
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
|
|
360
|
+
listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
|
|
361
|
+
if (view === 'Grading view') {
|
|
362
|
+
studentViewPage.steps.submitResponse();
|
|
363
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
364
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
365
|
+
gradingViewPage.steps.verifyGradingViewScore(20, 20);
|
|
366
|
+
};
|
|
367
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
368
|
+
listOrderingPage.steps.verifyPreviewScore(20, 20);
|
|
369
|
+
listOrderingPage.steps.switchToGradingView();
|
|
370
|
+
listOrderingPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
|
371
|
+
};
|
|
372
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('seed');
|
|
373
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
|
|
374
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('plant');
|
|
375
|
+
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
|
376
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
377
|
+
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
378
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
379
|
+
cy.eyesCheckWindow(`List ordering -${view} view - Attempting the question correctly`);
|
|
380
|
+
});
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
};
|
|
384
|
+
|
|
199
385
|
views.forEach((view) => {
|
|
200
386
|
describe(`${view}: List ordering - Manually scored`, { tags: 'smoke' }, () => {
|
|
201
387
|
abortEarlySetup();
|
|
@@ -264,6 +450,9 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
264
450
|
};
|
|
265
451
|
listOrderingPage.steps.verifyCorrectIncorrectIconsNotExist();
|
|
266
452
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
453
|
+
if (alternativeAnswerCheck === 'true') {
|
|
454
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
455
|
+
}
|
|
267
456
|
});
|
|
268
457
|
});
|
|
269
458
|
});
|
|
@@ -336,7 +525,11 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
336
525
|
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
|
337
526
|
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
|
338
527
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
339
|
-
|
|
528
|
+
if (alternativeAnswerCheck === 'true') {
|
|
529
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '', 0);
|
|
530
|
+
} else {
|
|
531
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
532
|
+
}
|
|
340
533
|
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(['seed', 'sprout', 'plant', 'flower']);
|
|
341
534
|
});
|
|
342
535
|
|
|
@@ -358,7 +551,11 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
358
551
|
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
|
359
552
|
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
|
360
553
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
361
|
-
|
|
554
|
+
if (alternativeAnswerCheck === 'true') {
|
|
555
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '', 0);
|
|
556
|
+
} else {
|
|
557
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
558
|
+
}
|
|
362
559
|
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(['seed', 'sprout', 'plant', 'flower']);
|
|
363
560
|
});
|
|
364
561
|
|
|
@@ -382,7 +579,11 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
382
579
|
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
|
383
580
|
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
|
384
581
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
385
|
-
|
|
582
|
+
if (alternativeAnswerCheck === 'true') {
|
|
583
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '', 0);
|
|
584
|
+
} else {
|
|
585
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
586
|
+
}
|
|
386
587
|
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(['seed', 'sprout', 'plant', 'flower']);
|
|
387
588
|
});
|
|
388
589
|
|
|
@@ -407,6 +608,9 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
407
608
|
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
|
408
609
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
409
610
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
611
|
+
if (alternativeAnswerCheck === 'true') {
|
|
612
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
613
|
+
}
|
|
410
614
|
});
|
|
411
615
|
});
|
|
412
616
|
});
|
package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js
CHANGED
|
@@ -8,6 +8,8 @@ const views = utilities.getViews(correctAnswerViews);
|
|
|
8
8
|
var itemReferenceID = "";
|
|
9
9
|
const options = ['sprout', 'plant', 'flower', 'seed'];
|
|
10
10
|
const correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
|
11
|
+
const alternateCorrectAnswerArray = ['seed', 'flower', 'sprout', 'plant'];
|
|
12
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
|
|
11
13
|
|
|
12
14
|
describe('Create item page - List ordering: All or nothing for "Horizontal" option orientation', () => {
|
|
13
15
|
before(() => {
|
|
@@ -80,7 +82,11 @@ describe('Create item page - List ordering: All or nothing for "Horizontal" opti
|
|
|
80
82
|
listOrderingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
81
83
|
};
|
|
82
84
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
83
|
-
|
|
85
|
+
if (alternativeAnswerCheck === 'true') {
|
|
86
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
87
|
+
} else {
|
|
88
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
89
|
+
}
|
|
84
90
|
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
|
85
91
|
listOrderingPage.steps.verifyCorrectOptionIconsCorrectAnswerSection();
|
|
86
92
|
});
|
|
@@ -156,11 +162,199 @@ describe('Create item page - List ordering: All or nothing for "Horizontal" opti
|
|
|
156
162
|
listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('plant');
|
|
157
163
|
listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('flower');
|
|
158
164
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
165
|
+
if (alternativeAnswerCheck === 'true') {
|
|
166
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
167
|
+
}
|
|
159
168
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
160
169
|
});
|
|
161
170
|
});
|
|
162
171
|
});
|
|
163
172
|
|
|
173
|
+
if (alternativeAnswerCheck === 'true') {
|
|
174
|
+
views.forEach((view) => {
|
|
175
|
+
describe(`${view}: Auto scored - All or nothing scoring with alternative answer`, { tags: 'smoke' }, () => {
|
|
176
|
+
abortEarlySetup();
|
|
177
|
+
before(() => {
|
|
178
|
+
switch (view) {
|
|
179
|
+
case 'Question preview':
|
|
180
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
|
181
|
+
cy.barsPreLoaderWait();
|
|
182
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
|
183
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
|
184
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
|
185
|
+
listOrderingPage.steps.allotPoints(20);
|
|
186
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInSpecifyCorrectAnswerSection('seed', 0);
|
|
187
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInSpecifyCorrectAnswerSection('sprout', 1);
|
|
188
|
+
listOrderingPage.steps.verifyHorizontalOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
|
|
189
|
+
listOrderingPage.steps.addAlternativeAnswerAccordion(1);
|
|
190
|
+
listOrderingPage.steps.allotPoints(15);
|
|
191
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInSpecifyCorrectAnswerSection('seed', 0);
|
|
192
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInSpecifyCorrectAnswerSection('plant', 3);
|
|
193
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInSpecifyCorrectAnswerSection('flower', 1);
|
|
194
|
+
listOrderingPage.steps.verifyHorizontalOptionsOrderInSpecifyCorrectAnswerSection(alternateCorrectAnswerArray);
|
|
195
|
+
listOrderingPage.steps.switchToPreviewTab();
|
|
196
|
+
break;
|
|
197
|
+
case 'Item preview':
|
|
198
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
199
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
200
|
+
break;
|
|
201
|
+
case 'Grading view':
|
|
202
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
203
|
+
break;
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
beforeEach(() => {
|
|
208
|
+
switch (view) {
|
|
209
|
+
case 'Question preview':
|
|
210
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
211
|
+
listOrderingPage.steps.resetQuestionPreview();
|
|
212
|
+
break;
|
|
213
|
+
case 'Item preview':
|
|
214
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
215
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
|
216
|
+
break;
|
|
217
|
+
case 'Grading view':
|
|
218
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
219
|
+
cy.wait(3000);
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
if (view === 'Question preview') {
|
|
225
|
+
after(() => {
|
|
226
|
+
listOrderingPage.steps.clickOnSaveQuestionButton();
|
|
227
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
228
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
229
|
+
});
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
it('When the user selects \'Grading\' view without attempting the question, then correct/incorrect icons and correct incorrect status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
|
|
233
|
+
if (view === 'Grading view') {
|
|
234
|
+
utilities.verifyElementVisibilityState(studentViewPage.submitButton(), 'visible');
|
|
235
|
+
studentViewPage.steps.submitResponse();
|
|
236
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
237
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
238
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
239
|
+
};
|
|
240
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
241
|
+
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
|
242
|
+
listOrderingPage.steps.switchToGradingView();
|
|
243
|
+
listOrderingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
244
|
+
};
|
|
245
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
246
|
+
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
|
247
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
248
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
|
|
249
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
250
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
251
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
252
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
253
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
254
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
255
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(15 points)', 1);
|
|
256
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant' ]);
|
|
257
|
+
listOrderingPage.steps.verifyCorrectOptionIconsCorrectAnswerSection();
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
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 should be displayed', () => {
|
|
261
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('sprout', 3);
|
|
262
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('flower', 0);
|
|
263
|
+
if (view === 'Grading view') {
|
|
264
|
+
studentViewPage.steps.submitResponse();
|
|
265
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
266
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
267
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
268
|
+
};
|
|
269
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
270
|
+
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
|
271
|
+
listOrderingPage.steps.switchToGradingView();
|
|
272
|
+
};
|
|
273
|
+
listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('sprout');
|
|
274
|
+
listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('plant');
|
|
275
|
+
listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('flower');
|
|
276
|
+
listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('seed');
|
|
277
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
278
|
+
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
|
279
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
280
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
|
|
281
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
282
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
283
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
284
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
285
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
286
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
287
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(15 points)', 1);
|
|
288
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant' ]);
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
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 should be displayed', () => {
|
|
292
|
+
if (view === 'Grading view') {
|
|
293
|
+
studentViewPage.steps.clearResponses();
|
|
294
|
+
};
|
|
295
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('plant', 0);
|
|
296
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('sprout', 1);
|
|
297
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('seed', 2);
|
|
298
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('flower', 3);
|
|
299
|
+
if (view === 'Grading view') {
|
|
300
|
+
studentViewPage.steps.submitResponse();
|
|
301
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
302
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
303
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
|
304
|
+
};
|
|
305
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
306
|
+
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
|
307
|
+
listOrderingPage.steps.switchToGradingView();
|
|
308
|
+
};
|
|
309
|
+
listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('plant');
|
|
310
|
+
listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('sprout');
|
|
311
|
+
listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('seed');
|
|
312
|
+
listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('flower');
|
|
313
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
314
|
+
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
|
315
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
316
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(0, ['seed', 'sprout', 'plant', 'flower']);
|
|
317
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
318
|
+
listOrderingPage.steps.disableShowAlternativeAnswersToggle();
|
|
319
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
320
|
+
listOrderingPage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
321
|
+
listOrderingPage.steps.clickShowAlternativeAnswersToggle();
|
|
322
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleChecked();
|
|
323
|
+
listOrderingPage.steps.verifyAnswerLabelAndPoints('Alternative answer', '(15 points)', 1);
|
|
324
|
+
listOrderingPage.steps.verifyOptionsInCorrectAndAlternativeAnswerSection(1, ['seed', 'flower', 'sprout', 'plant' ]);
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
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', () => {
|
|
328
|
+
if (view === 'Grading view') {
|
|
329
|
+
studentViewPage.steps.clearResponses();
|
|
330
|
+
};
|
|
331
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('seed', 0);
|
|
332
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('sprout', 1);
|
|
333
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('plant', 2);
|
|
334
|
+
listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('flower', 3);
|
|
335
|
+
if (view === 'Grading view') {
|
|
336
|
+
studentViewPage.steps.submitResponse();
|
|
337
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
338
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
339
|
+
gradingViewPage.steps.verifyGradingViewScore(20, 20);
|
|
340
|
+
};
|
|
341
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
|
342
|
+
listOrderingPage.steps.verifyPreviewScore(20, 20);
|
|
343
|
+
listOrderingPage.steps.switchToGradingView();
|
|
344
|
+
listOrderingPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
|
345
|
+
};
|
|
346
|
+
listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('seed');
|
|
347
|
+
listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('sprout');
|
|
348
|
+
listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('plant');
|
|
349
|
+
listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('flower');
|
|
350
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
351
|
+
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
352
|
+
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
|
|
164
358
|
if (!grepTags || !grepTags.includes('smoke')) {
|
|
165
359
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
|
166
360
|
abortEarlySetup();
|