itemengine-cypress-automation 1.0.583-IEI-7048-71a8251.0 → 1.0.584-IEI-7041-1da58ac.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/DragAndDropIntoCategoriesNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +123 -8
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +123 -8
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +131 -14
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +153 -10
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +138 -9
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +272 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +7 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +139 -10
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +124 -9
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +139 -10
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +124 -9
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +109 -8
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +124 -9
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +243 -2
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -77
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -78
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -78
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +9 -104
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -95
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -95
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -84
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -73
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -84
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +2 -187
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +0 -4
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +5 -209
- package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +1 -195
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -85
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -82
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -85
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +6 -109
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -103
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsBasic.js +0 -4
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -79
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -91
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +3 -203
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingGroupedScoring.js +1 -9
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -102
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -107
- package/cypress/e2e/ILC/Matching/Scoring/blankResponseScoring.js +2 -36
- package/cypress/e2e/ILC/Matching/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +0 -5
- package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +0 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +1 -10
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -128
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -115
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -128
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +1 -9
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -115
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -115
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +2 -226
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +1 -9
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +5 -32
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +0 -3
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +1 -10
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -128
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +2 -115
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +2 -128
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +1 -9
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -115
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +2 -102
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +2 -115
- package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +2 -216
- package/cypress/pages/components/correctIncorrectAnswerLabelComponent.js +1 -18
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +25 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +38 -0
- package/cypress/pages/listOrderingPage.js +1 -60
- package/cypress/pages/matchingPage.js +1 -23
- package/package.json +1 -1
|
@@ -8,7 +8,6 @@ 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');
|
|
12
11
|
|
|
13
12
|
describe('Create item page - List ordering: All or nothing ', () => {
|
|
14
13
|
before(() => {
|
|
@@ -119,11 +118,8 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
119
118
|
};
|
|
120
119
|
//Failing due to https://weldnorthed.atlassian.net/browse/IEI-2964
|
|
121
120
|
// listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
} else {
|
|
125
|
-
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
126
|
-
}
|
|
121
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
122
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
127
123
|
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
|
128
124
|
});
|
|
129
125
|
|
|
@@ -195,193 +191,11 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
195
191
|
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
|
196
192
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
197
193
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
198
|
-
if (alternativeAnswerCheck === 'true') {
|
|
199
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
200
|
-
}
|
|
201
194
|
cy.eyesCheckWindow(`List ordering -${view} view - Attempting the question correctly`);
|
|
202
195
|
});
|
|
203
196
|
});
|
|
204
197
|
});
|
|
205
198
|
|
|
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
|
-
|
|
385
199
|
views.forEach((view) => {
|
|
386
200
|
describe(`${view}: List ordering - Manually scored`, { tags: 'smoke' }, () => {
|
|
387
201
|
abortEarlySetup();
|
|
@@ -450,9 +264,6 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
450
264
|
};
|
|
451
265
|
listOrderingPage.steps.verifyCorrectIncorrectIconsNotExist();
|
|
452
266
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
453
|
-
if (alternativeAnswerCheck === 'true') {
|
|
454
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
455
|
-
}
|
|
456
267
|
});
|
|
457
268
|
});
|
|
458
269
|
});
|
|
@@ -525,11 +336,7 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
525
336
|
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
|
526
337
|
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
|
527
338
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
528
|
-
|
|
529
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '', 0);
|
|
530
|
-
} else {
|
|
531
|
-
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
532
|
-
}
|
|
339
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
533
340
|
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(['seed', 'sprout', 'plant', 'flower']);
|
|
534
341
|
});
|
|
535
342
|
|
|
@@ -551,11 +358,7 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
551
358
|
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
|
552
359
|
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
|
553
360
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
554
|
-
|
|
555
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '', 0);
|
|
556
|
-
} else {
|
|
557
|
-
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
558
|
-
}
|
|
361
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
559
362
|
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(['seed', 'sprout', 'plant', 'flower']);
|
|
560
363
|
});
|
|
561
364
|
|
|
@@ -579,11 +382,7 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
579
382
|
listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
|
|
580
383
|
listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
|
|
581
384
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
582
|
-
|
|
583
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '', 0);
|
|
584
|
-
} else {
|
|
585
|
-
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
586
|
-
}
|
|
385
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
587
386
|
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(['seed', 'sprout', 'plant', 'flower']);
|
|
588
387
|
});
|
|
589
388
|
|
|
@@ -608,9 +407,6 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
|
608
407
|
listOrderingPage.steps.verifyCorrectOptionIcon('flower');
|
|
609
408
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
610
409
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
611
|
-
if (alternativeAnswerCheck === 'true') {
|
|
612
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
613
|
-
}
|
|
614
410
|
});
|
|
615
411
|
});
|
|
616
412
|
});
|
package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js
CHANGED
|
@@ -8,8 +8,6 @@ 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');
|
|
13
11
|
|
|
14
12
|
describe('Create item page - List ordering: All or nothing for "Horizontal" option orientation', () => {
|
|
15
13
|
before(() => {
|
|
@@ -82,11 +80,7 @@ describe('Create item page - List ordering: All or nothing for "Horizontal" opti
|
|
|
82
80
|
listOrderingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
|
83
81
|
};
|
|
84
82
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
85
|
-
|
|
86
|
-
listOrderingPage.steps.verifyAnswerLabelAndPoints('Correct answer', '(20 points)', 0);
|
|
87
|
-
} else {
|
|
88
|
-
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
89
|
-
}
|
|
83
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
|
90
84
|
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
|
91
85
|
listOrderingPage.steps.verifyCorrectOptionIconsCorrectAnswerSection();
|
|
92
86
|
});
|
|
@@ -162,199 +156,11 @@ describe('Create item page - List ordering: All or nothing for "Horizontal" opti
|
|
|
162
156
|
listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('plant');
|
|
163
157
|
listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('flower');
|
|
164
158
|
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
|
165
|
-
if (alternativeAnswerCheck === 'true') {
|
|
166
|
-
listOrderingPage.steps.verifyShowAlternativeAnswersToggleNotExists();
|
|
167
|
-
}
|
|
168
159
|
listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
169
160
|
});
|
|
170
161
|
});
|
|
171
162
|
});
|
|
172
163
|
|
|
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
|
-
|
|
358
164
|
if (!grepTags || !grepTags.includes('smoke')) {
|
|
359
165
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
|
360
166
|
abortEarlySetup();
|