itemengine-cypress-automation 1.0.369-IEI-6168-IEI-6149-IEI-6150-manualAndNonScoredScript-da757d3.0 → 1.0.369-updateCHartsDotPlot-3fc0c4b.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/GridFill/allOrNothingBasicForAllViews.smoke.js +0 -210
- package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +0 -212
- package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +29 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/allOrNothingForAllViews.smoke.js +88 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -231
- package/cypress/pages/components/colorPopupComponent.js +6 -0
- package/cypress/pages/imageHighlightPage.js +32 -0
- package/cypress/pages/listOrderingPage.js +9 -2
- package/package.json +1 -1
- /package/cypress/e2e/ILC/{ChartsDotsPlot → chartsDotsPlot}/checkAnswerFunctionalityForAllViews.js +0 -0
- /package/cypress/e2e/ILC/{ChartsDotsPlot → chartsDotsPlot}/editQuestion.smoke.js +0 -0
@@ -231,216 +231,6 @@ describe('Create item page - Grid fill: All or nothing', () => {
|
|
231
231
|
});
|
232
232
|
});
|
233
233
|
|
234
|
-
views.forEach((view) => {
|
235
|
-
describe(`${view}: Grid fill - Manually scored`, { tags: 'smoke' }, () => {
|
236
|
-
abortEarlySetup();
|
237
|
-
before(() => {
|
238
|
-
switch (view) {
|
239
|
-
case 'Question preview':
|
240
|
-
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
241
|
-
cy.barsPreLoaderWait();
|
242
|
-
gridFillPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
243
|
-
gridFillPage.steps.expandScoringTypeDropdown();
|
244
|
-
gridFillPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
245
|
-
gridFillPage.steps.allotPoints(20);
|
246
|
-
gridFillPage.steps.switchToPreviewTab();
|
247
|
-
break;
|
248
|
-
case 'Item preview':
|
249
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
250
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
251
|
-
break;
|
252
|
-
case 'Grading view':
|
253
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
254
|
-
break;
|
255
|
-
}
|
256
|
-
});
|
257
|
-
|
258
|
-
beforeEach(() => {
|
259
|
-
switch (view) {
|
260
|
-
case 'Question preview':
|
261
|
-
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
262
|
-
gridFillPage.steps.verifyCorrectIncorrectBorderNotExists();
|
263
|
-
gridFillPage.steps.resetQuestionPreview();
|
264
|
-
break;
|
265
|
-
case 'Item preview':
|
266
|
-
itemPreviewPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
267
|
-
gridFillPage.steps.verifyCorrectIncorrectBorderNotExists();
|
268
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
269
|
-
break;
|
270
|
-
case 'Grading view':
|
271
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
272
|
-
cy.wait(2000);
|
273
|
-
break;
|
274
|
-
}
|
275
|
-
});
|
276
|
-
|
277
|
-
if (view === 'Question preview') {
|
278
|
-
after(() => {
|
279
|
-
gridFillPage.steps.clickOnSaveQuestionButton();
|
280
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
281
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
282
|
-
});
|
283
|
-
}
|
284
|
-
|
285
|
-
it('Question instructions should be visible', () => {
|
286
|
-
gridFillPage.steps.verifyQuestionInstructionsTextPreviewTab('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
287
|
-
gridFillPage.steps.verifyVisibityOfQuestionInstructionsText();
|
288
|
-
});
|
289
|
-
|
290
|
-
it('User should be able to attempt the question in student view, and correct/incorrect icons, "Your answer is correct/incorrect" label, and correct answer section should not be displayed in grading view', () => {
|
291
|
-
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
292
|
-
gridFillPage.steps.selectCellPreviewTab(0, 1);
|
293
|
-
if (view === 'Grading view') {
|
294
|
-
studentViewPage.steps.submitResponse();
|
295
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
296
|
-
gridFillPage.steps.clickOnGoToGradingViewButton();
|
297
|
-
gradingViewPage.steps.verifyGradingViewScore('', 20);
|
298
|
-
}
|
299
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
300
|
-
gridFillPage.steps.checkManuallyScoredScoringLabel();
|
301
|
-
}
|
302
|
-
gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0, 0);
|
303
|
-
gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0, 1);
|
304
|
-
gridFillPage.steps.verifyCorrectAnswerSectionNotExists();
|
305
|
-
});
|
306
|
-
});
|
307
|
-
});
|
308
|
-
|
309
|
-
views.forEach((view) => {
|
310
|
-
describe(`${view}: Grid fill - Non scored`, { tags: 'smoke' }, () => {
|
311
|
-
abortEarlySetup();
|
312
|
-
before(() => {
|
313
|
-
switch (view) {
|
314
|
-
case 'Question preview':
|
315
|
-
gridFillPage.steps.navigateToCreateQuestion('grid fill');
|
316
|
-
cy.barsPreLoaderWait();
|
317
|
-
gridFillPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
318
|
-
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
|
319
|
-
gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 1);
|
320
|
-
gridFillPage.steps.expandScoringTypeDropdown();
|
321
|
-
gridFillPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
322
|
-
gridFillPage.steps.switchToPreviewTab();
|
323
|
-
break;
|
324
|
-
case 'Item preview':
|
325
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
326
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
327
|
-
break;
|
328
|
-
case 'Grading view':
|
329
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
330
|
-
break;
|
331
|
-
}
|
332
|
-
});
|
333
|
-
|
334
|
-
beforeEach(() => {
|
335
|
-
switch (view) {
|
336
|
-
case 'Question preview':
|
337
|
-
gridFillPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
338
|
-
gridFillPage.steps.verifyCorrectIncorrectBorderNotExists();
|
339
|
-
gridFillPage.steps.resetQuestionPreview();
|
340
|
-
break;
|
341
|
-
case 'Item preview':
|
342
|
-
itemPreviewPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
343
|
-
gridFillPage.steps.verifyCorrectIncorrectBorderNotExists();
|
344
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
345
|
-
break;
|
346
|
-
case 'Grading view':
|
347
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
348
|
-
cy.wait(2000);
|
349
|
-
break;
|
350
|
-
}
|
351
|
-
});
|
352
|
-
|
353
|
-
if (view === 'Question preview') {
|
354
|
-
after(() => {
|
355
|
-
gridFillPage.steps.clickOnSaveQuestionButton();
|
356
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
357
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
358
|
-
});
|
359
|
-
}
|
360
|
-
|
361
|
-
it('When the user selects "Grading" view without attempting the question then non-scoring label 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 correct/incorrect icons should not be displayed', () => {
|
362
|
-
if (view === 'Grading view') {
|
363
|
-
studentViewPage.steps.submitResponse();
|
364
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
365
|
-
gridFillPage.steps.clickOnGoToGradingViewButton();
|
366
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
367
|
-
}
|
368
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
369
|
-
gridFillPage.steps.switchToGradingView();
|
370
|
-
gridFillPage.steps.checkNonScoredScoringLabel();
|
371
|
-
}
|
372
|
-
gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0, 0);
|
373
|
-
gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0, 1);
|
374
|
-
gridFillPage.steps.verifyCorrectAnswerSectionExists();
|
375
|
-
gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
|
376
|
-
gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
|
377
|
-
gridFillPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
378
|
-
});
|
379
|
-
|
380
|
-
it('When the user attempts the question incorrectly then non-scoring label should be displayed and on switching to "Grading" view, incorrect icon should be displayed in the incorrect cell, correct icon should be displayed in the correct cell, and a status message with text "Your answer is incorrect" should be displayed', () => {
|
381
|
-
gridFillPage.steps.selectCellPreviewTab(0, 3);
|
382
|
-
if (view === 'Grading view') {
|
383
|
-
studentViewPage.steps.submitResponse();
|
384
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
385
|
-
gridFillPage.steps.clickOnGoToGradingViewButton();
|
386
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
387
|
-
}
|
388
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
389
|
-
gridFillPage.steps.switchToGradingView();
|
390
|
-
gridFillPage.steps.checkNonScoredScoringLabel();
|
391
|
-
}
|
392
|
-
gridFillPage.steps.verifyIncorrectResponseIconPreviewTab(0, 3);
|
393
|
-
gridFillPage.steps.verifyCorrectAnswerSectionExists();
|
394
|
-
gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
|
395
|
-
gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
|
396
|
-
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
397
|
-
});
|
398
|
-
|
399
|
-
it('When the user attempts the question partially correct then non-scoring label should be displayed and on switching to "Grading" view, correct icon should be displayed in the correct answer responses, and a status message with text "Your answer is incorrect" should be displayed', () => {
|
400
|
-
if (view === 'Grading view') {
|
401
|
-
studentViewPage.steps.clearResponses();
|
402
|
-
};
|
403
|
-
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
404
|
-
if (view === 'Grading view') {
|
405
|
-
studentViewPage.steps.submitResponse();
|
406
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
407
|
-
gridFillPage.steps.clickOnGoToGradingViewButton();
|
408
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
409
|
-
}
|
410
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
411
|
-
gridFillPage.steps.switchToGradingView();
|
412
|
-
gridFillPage.steps.checkNonScoredScoringLabel();
|
413
|
-
}
|
414
|
-
gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 0);
|
415
|
-
gridFillPage.steps.verifyCorrectAnswerSectionExists();
|
416
|
-
gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
|
417
|
-
gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
|
418
|
-
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
419
|
-
});
|
420
|
-
|
421
|
-
it('When the user attempts the question correctly, and on switching to "Grading" view, non-scoring label should be displayed, correct icons should be displayed in the correct cells, a status message with text "Your answer is correct" should be displayed and correct answer section should not be displayed', () => {
|
422
|
-
if (view === 'Grading view') {
|
423
|
-
studentViewPage.steps.clearResponses();
|
424
|
-
};
|
425
|
-
gridFillPage.steps.selectCellPreviewTab(0, 0);
|
426
|
-
gridFillPage.steps.selectCellPreviewTab(0, 1);
|
427
|
-
if (view === 'Grading view') {
|
428
|
-
studentViewPage.steps.submitResponse();
|
429
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
|
430
|
-
gridFillPage.steps.clickOnGoToGradingViewButton();
|
431
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
432
|
-
}
|
433
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
434
|
-
gridFillPage.steps.switchToGradingView();
|
435
|
-
gridFillPage.steps.checkNonScoredScoringLabel();
|
436
|
-
}
|
437
|
-
gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 0);
|
438
|
-
gridFillPage.steps.verifyCorrectResponseIconPreviewTab(0, 1);
|
439
|
-
gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
440
|
-
});
|
441
|
-
});
|
442
|
-
});
|
443
|
-
|
444
234
|
if (!grepTags || !grepTags.includes('smoke')) {
|
445
235
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
446
236
|
abortEarlySetup();
|
@@ -231,218 +231,6 @@ describe('Create item page - Image highlight: All or nothing ', () => {
|
|
231
231
|
});
|
232
232
|
});
|
233
233
|
|
234
|
-
views.forEach((view) => {
|
235
|
-
describe(`${view}: Image highlight - Manually scored`, { tags: 'smoke' }, () => {
|
236
|
-
abortEarlySetup();
|
237
|
-
before(() => {
|
238
|
-
switch (view) {
|
239
|
-
case 'Question preview':
|
240
|
-
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
241
|
-
imageHighlightPage.steps.addTextInQuestionInstructionsInputField('Select the appropriate highlight in the image below');
|
242
|
-
imageHighlightPage.steps.uploadFile('highlightImage.jpg');
|
243
|
-
imageHighlightPage.steps.verifyImageUploadedInSpecifyPossibleOptionsSection();
|
244
|
-
imageHighlightPage.steps.verifyImageUploadedSpecifyCorrectAnswer();
|
245
|
-
imageHighlightPage.steps.highlightRegionInImage(flowerHighlightRegion);
|
246
|
-
imageHighlightPage.steps.highlightRegionInImage(branchesHighlightRegion);
|
247
|
-
imageHighlightPage.steps.highlightRegionInImage(leafHighlightRegion);
|
248
|
-
imageHighlightPage.steps.selectMultipleSelectionToggle();
|
249
|
-
imageHighlightPage.steps.expandScoringTypeDropdown();
|
250
|
-
imageHighlightPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
251
|
-
imageHighlightPage.steps.allotPoints(20);
|
252
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
253
|
-
break;
|
254
|
-
case 'Item preview':
|
255
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
256
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
257
|
-
break;
|
258
|
-
case 'Grading view':
|
259
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
260
|
-
break;
|
261
|
-
}
|
262
|
-
});
|
263
|
-
|
264
|
-
beforeEach(() => {
|
265
|
-
switch (view) {
|
266
|
-
case 'Question preview':
|
267
|
-
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
268
|
-
imageHighlightPage.steps.resetQuestionPreview();
|
269
|
-
break;
|
270
|
-
case 'Item preview':
|
271
|
-
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
272
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
273
|
-
break;
|
274
|
-
case 'Grading view':
|
275
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
276
|
-
break;
|
277
|
-
}
|
278
|
-
});
|
279
|
-
|
280
|
-
if (view === 'Question preview') {
|
281
|
-
after(() => {
|
282
|
-
imageHighlightPage.steps.clickOnSaveQuestionButton();
|
283
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
284
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
285
|
-
});
|
286
|
-
}
|
287
|
-
|
288
|
-
it('Question instructions should be visible', () => {
|
289
|
-
imageHighlightPage.steps.verifyQuestionInstructionsTextPreviewTab('Select the appropriate highlight in the image below');
|
290
|
-
imageHighlightPage.steps.verifyVisibityOfQuestionInstructionsText();
|
291
|
-
});
|
292
|
-
|
293
|
-
it('User should be able to attempt the question in student view, and correct/incorrect icons, "Your answer is correct/incorrect" label, and correct answer section should not be displayed in grading view', () => {
|
294
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
295
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(2);
|
296
|
-
if (view === 'Grading view') {
|
297
|
-
studentViewPage.steps.submitResponse();
|
298
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
299
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
300
|
-
gradingViewPage.steps.verifyGradingViewScore('', 20);
|
301
|
-
}
|
302
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
303
|
-
imageHighlightPage.steps.checkManuallyScoredScoringLabel();
|
304
|
-
}
|
305
|
-
imageHighlightPage.steps.verifyCorrectIncorrectIconsNotExist(0);
|
306
|
-
imageHighlightPage.steps.verifyCorrectIncorrectIconsNotExist(2);
|
307
|
-
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
308
|
-
});
|
309
|
-
});
|
310
|
-
});
|
311
|
-
|
312
|
-
views.forEach((view) => {
|
313
|
-
describe(`${view}: Image highlight - Non scored`, { tags: 'smoke' }, () => {
|
314
|
-
abortEarlySetup();
|
315
|
-
before(() => {
|
316
|
-
switch (view) {
|
317
|
-
case 'Question preview':
|
318
|
-
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
319
|
-
imageHighlightPage.steps.addTextInQuestionInstructionsInputField('Select the appropriate highlight in the image below');
|
320
|
-
imageHighlightPage.steps.uploadFile('highlightImage.jpg');
|
321
|
-
imageHighlightPage.steps.verifyImageUploadedInSpecifyPossibleOptionsSection();
|
322
|
-
imageHighlightPage.steps.verifyImageUploadedSpecifyCorrectAnswer();
|
323
|
-
imageHighlightPage.steps.highlightRegionInImage(flowerHighlightRegion);
|
324
|
-
imageHighlightPage.steps.highlightRegionInImage(branchesHighlightRegion);
|
325
|
-
imageHighlightPage.steps.highlightRegionInImage(leafHighlightRegion);
|
326
|
-
imageHighlightPage.steps.selectMultipleSelectionToggle();
|
327
|
-
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(0);
|
328
|
-
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(2);
|
329
|
-
imageHighlightPage.steps.expandScoringTypeDropdown();
|
330
|
-
imageHighlightPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
331
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
332
|
-
break;
|
333
|
-
case 'Item preview':
|
334
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
335
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
336
|
-
break;
|
337
|
-
case 'Grading view':
|
338
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
339
|
-
break;
|
340
|
-
}
|
341
|
-
});
|
342
|
-
|
343
|
-
beforeEach(() => {
|
344
|
-
switch (view) {
|
345
|
-
case 'Question preview':
|
346
|
-
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
347
|
-
imageHighlightPage.steps.resetQuestionPreview();
|
348
|
-
break;
|
349
|
-
case 'Item preview':
|
350
|
-
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
351
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
352
|
-
break;
|
353
|
-
case 'Grading view':
|
354
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
355
|
-
break;
|
356
|
-
}
|
357
|
-
});
|
358
|
-
|
359
|
-
if (view === 'Question preview') {
|
360
|
-
after(() => {
|
361
|
-
imageHighlightPage.steps.clickOnSaveQuestionButton();
|
362
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
363
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
364
|
-
});
|
365
|
-
}
|
366
|
-
|
367
|
-
it('When the user selects "Grading" view without attempting the question, non-scoring label 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 correct/incorrect icons should not be displayed', () => {
|
368
|
-
if (view === 'Grading view') {
|
369
|
-
studentViewPage.steps.submitResponse();
|
370
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
371
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
372
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
373
|
-
}
|
374
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
375
|
-
imageHighlightPage.steps.switchToGradingView();
|
376
|
-
imageHighlightPage.steps.checkNonScoredScoringLabel();
|
377
|
-
}
|
378
|
-
imageHighlightPage.steps.verifyCorrectIncorrectIconsNotExist(0);
|
379
|
-
imageHighlightPage.steps.verifyCorrectIncorrectIconsNotExist(2);
|
380
|
-
imageHighlightPage.steps.verifyCorrectAnswerSectionExist();
|
381
|
-
imageHighlightPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
382
|
-
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2'], [1, 2]);
|
383
|
-
});
|
384
|
-
|
385
|
-
it('When the user attempts the question incorrectly, then non-scoring label should be displayed and on switching to "Grading" view, incorrect icon should be displayed for the incorrect region, correct icon should be displayed for the correct region, and a status message with text "Your answer is incorrect" should be displayed', () => {
|
386
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
387
|
-
if (view === 'Grading view') {
|
388
|
-
studentViewPage.steps.submitResponse();
|
389
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
390
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
391
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
392
|
-
}
|
393
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
394
|
-
imageHighlightPage.steps.switchToGradingView();
|
395
|
-
imageHighlightPage.steps.checkNonScoredScoringLabel();
|
396
|
-
}
|
397
|
-
imageHighlightPage.steps.verifyIncorrectHighlightRegion(2);
|
398
|
-
imageHighlightPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
399
|
-
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2'], [1, 2]);
|
400
|
-
});
|
401
|
-
|
402
|
-
it('When the user attempts the question partially correct, then non-scoring label should be displayed and on switching to "Grading" view, correct icon should be displayed for the correct region, and a status message with text "Your answer is incorrect" should be displayed', () => {
|
403
|
-
if (view === 'Grading view') {
|
404
|
-
studentViewPage.steps.clearResponses();
|
405
|
-
};
|
406
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
407
|
-
if (view === 'Grading view') {
|
408
|
-
studentViewPage.steps.submitResponse();
|
409
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
410
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
411
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
412
|
-
}
|
413
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
414
|
-
imageHighlightPage.steps.switchToGradingView();
|
415
|
-
imageHighlightPage.steps.checkNonScoredScoringLabel();
|
416
|
-
}
|
417
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
418
|
-
imageHighlightPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
419
|
-
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2'], [1, 2]);
|
420
|
-
});
|
421
|
-
|
422
|
-
it('When the user attempts the question correctly, and on switching to "Grading" view, non-scoring label should be displayed, correct icons should be displayed for the correct regions, a status message with text "Your answer is correct" should be displayed and correct answer section should not be displayed', () => {
|
423
|
-
if (view === 'Grading view') {
|
424
|
-
studentViewPage.steps.clearResponses();
|
425
|
-
};
|
426
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
427
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(2);
|
428
|
-
if (view === 'Grading view') {
|
429
|
-
studentViewPage.steps.submitResponse();
|
430
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
431
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
432
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
433
|
-
}
|
434
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
435
|
-
imageHighlightPage.steps.switchToGradingView();
|
436
|
-
imageHighlightPage.steps.checkNonScoredScoringLabel();
|
437
|
-
}
|
438
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
439
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
440
|
-
imageHighlightPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
441
|
-
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
442
|
-
});
|
443
|
-
});
|
444
|
-
});
|
445
|
-
|
446
234
|
if (!grepTags || !grepTags.includes('smoke')) {
|
447
235
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
448
236
|
abortEarlySetup();
|
@@ -12,6 +12,7 @@ const rootsHighlightRegion = [[45, 45], [45, 55], [57, 55], [57, 45]];
|
|
12
12
|
|
13
13
|
const defaultStateColor = 'rgb(120, 60, 60)';
|
14
14
|
const activeStateColor = 'rgb(60, 120, 120)';
|
15
|
+
const defaultStateBorderColorWithOpacity = 'rgba(120, 61, 61, 0.5)';
|
15
16
|
|
16
17
|
describe('Create Item page - Image highlight: Customize image highlight style', () => {
|
17
18
|
before(() => {
|
@@ -156,6 +157,34 @@ describe('Create Item page - Image highlight: Customize image highlight style',
|
|
156
157
|
});
|
157
158
|
});
|
158
159
|
|
160
|
+
describe('Border opacity image highlight style : Edit tab content and functionality', () => {
|
161
|
+
abortEarlySetup();
|
162
|
+
before(() => {
|
163
|
+
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
164
|
+
imageHighlightPage.steps.uploadFile('highlightImage.jpg');
|
165
|
+
imageHighlightPage.steps.verifyImageUploadedInSpecifyPossibleOptionsSection();
|
166
|
+
imageHighlightPage.steps.verifyImageUploadedSpecifyCorrectAnswer();
|
167
|
+
imageHighlightPage.steps.highlightRegionInImage(flowerHighlightRegion);
|
168
|
+
imageHighlightPage.steps.highlightRegionInImage(branchesHighlightRegion);
|
169
|
+
imageHighlightPage.steps.highlightRegionInImage(leafHighlightRegion);
|
170
|
+
imageHighlightPage.steps.highlightRegionInImage(rootsHighlightRegion);
|
171
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(0);
|
172
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(1);
|
173
|
+
});
|
174
|
+
|
175
|
+
it('When user changes the opacity in color picker the changes should be displayed', () => {
|
176
|
+
imageHighlightPage.steps.clickOnBorderColorIcon();
|
177
|
+
imageHighlightPage.steps.clickOnDefaultStateColorEditButton();
|
178
|
+
colorPopupComponent.steps.clickInColorSaturationPalette();
|
179
|
+
imageHighlightPage.steps.clickInAlphaPicker();
|
180
|
+
imageHighlightPage.steps.clickOnOkButton();
|
181
|
+
imageHighlightPage.steps.checkShowAvailableOptionsToStudentsCheckbox();
|
182
|
+
imageHighlightPage.steps.verifyEditedBorderOpacityInSpecifyCorrectAnswerSection(2, defaultStateBorderColorWithOpacity);
|
183
|
+
imageHighlightPage.steps.switchToPreviewTab();
|
184
|
+
imageHighlightPage.steps.verifyEditedBorderOpacityInPreviewtabSection(2, defaultStateBorderColorWithOpacity);
|
185
|
+
});
|
186
|
+
|
187
|
+
});
|
159
188
|
// Change 'Stroke color' to 'Border color' in the following tests after https://redmine.zeuslearning.com/issues/580697 has been resolved.
|
160
189
|
|
161
190
|
describe('Border color image highlight style : Edit tab content and functionality', () => {
|
@@ -470,4 +470,92 @@ describe('Create item page - List ordering: All or nothing ', () => {
|
|
470
470
|
});
|
471
471
|
});
|
472
472
|
};
|
473
|
+
|
474
|
+
views.forEach((view) => {
|
475
|
+
describe(`${view}: Auto scored - All or nothing scoring`, { tags: 'smoke' }, () => {
|
476
|
+
abortEarlySetup();
|
477
|
+
before(() => {
|
478
|
+
switch (view) {
|
479
|
+
case 'Question preview':
|
480
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
481
|
+
cy.barsPreLoaderWait();
|
482
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
483
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
484
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
485
|
+
listOrderingPage.steps.allotPoints(20);
|
486
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
487
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
488
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
489
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
490
|
+
listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
|
491
|
+
listOrderingPage.steps.switchToPreviewTab();
|
492
|
+
break;
|
493
|
+
case 'Item preview':
|
494
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
495
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
496
|
+
break;
|
497
|
+
case 'Grading view':
|
498
|
+
cy.wait(5000);
|
499
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
500
|
+
break;
|
501
|
+
};
|
502
|
+
});
|
503
|
+
|
504
|
+
beforeEach(() => {
|
505
|
+
switch (view) {
|
506
|
+
case 'Question preview':
|
507
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
508
|
+
listOrderingPage.steps.resetQuestionPreview();
|
509
|
+
break;
|
510
|
+
case 'Item preview':
|
511
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
512
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
513
|
+
break;
|
514
|
+
case 'Grading view':
|
515
|
+
cy.wait(5000);
|
516
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
517
|
+
break;
|
518
|
+
}
|
519
|
+
});
|
520
|
+
|
521
|
+
if (view === 'Question preview') {
|
522
|
+
after(() => {
|
523
|
+
listOrderingPage.steps.clickOnSaveQuestionButton();
|
524
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
525
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
526
|
+
});
|
527
|
+
};
|
528
|
+
|
529
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
530
|
+
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', () => {
|
531
|
+
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
532
|
+
listOrderingPage.steps.switchToGradingView();
|
533
|
+
listOrderingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
534
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
535
|
+
utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
|
536
|
+
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
537
|
+
});
|
538
|
+
};
|
539
|
+
|
540
|
+
it('When the user attempts the question partially, 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', () => {
|
541
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
542
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
543
|
+
if (view === 'Grading view') {
|
544
|
+
studentViewPage.steps.submitResponse();
|
545
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
546
|
+
studentViewPage.steps.clickOnGoToGradingViewButton();
|
547
|
+
gradingViewPage.steps.verifyGradingViewScore(0, 20);
|
548
|
+
};
|
549
|
+
if (view === 'Question preview' || view === 'Item preview') {
|
550
|
+
listOrderingPage.steps.verifyPreviewScore(0, 20);
|
551
|
+
listOrderingPage.steps.switchToGradingView();
|
552
|
+
};
|
553
|
+
listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
|
554
|
+
listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
|
555
|
+
listOrderingPage.steps.verifyNumberOfOptionsInDropzoneOrderAsSeperateList(2);
|
556
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
557
|
+
listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
|
558
|
+
});
|
559
|
+
});
|
560
|
+
});
|
473
561
|
});
|
@@ -239,237 +239,6 @@ describe('Create item page - Text selection: All or nothing ', () => {
|
|
239
239
|
});
|
240
240
|
});
|
241
241
|
|
242
|
-
views.forEach((view) => {
|
243
|
-
describe(`${view}: Text selection - Manually scored`, { tags: 'smoke' }, () => {
|
244
|
-
abortEarlySetup();
|
245
|
-
before(() => {
|
246
|
-
switch (view) {
|
247
|
-
case 'Question preview':
|
248
|
-
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
249
|
-
cy.barsPreLoaderWait();
|
250
|
-
textSelectionPage.steps.addTextInQuestionInstructionsInputField('Highlight the correct statements.');
|
251
|
-
textSelectionPage.steps.clearQuestionInputField();
|
252
|
-
paragraphTextArray.forEach((paragraphText) => {
|
253
|
-
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
254
|
-
});
|
255
|
-
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
256
|
-
textSelectionPage.steps.expandScoringTypeDropdown();
|
257
|
-
textSelectionPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
258
|
-
textSelectionPage.steps.allotPoints(20);
|
259
|
-
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
260
|
-
paragraphTextArray.forEach((text) => {
|
261
|
-
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(text);
|
262
|
-
});
|
263
|
-
textSelectionPage.steps.switchToPreviewTab();
|
264
|
-
break;
|
265
|
-
case 'Item preview':
|
266
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
267
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
268
|
-
break;
|
269
|
-
case 'Grading view':
|
270
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
271
|
-
break;
|
272
|
-
};
|
273
|
-
});
|
274
|
-
|
275
|
-
beforeEach(() => {
|
276
|
-
switch (view) {
|
277
|
-
case 'Question preview':
|
278
|
-
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
279
|
-
textSelectionPage.steps.resetQuestionPreview();
|
280
|
-
break;
|
281
|
-
case 'Item preview':
|
282
|
-
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
283
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
284
|
-
break;
|
285
|
-
case 'Grading view':
|
286
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
287
|
-
break;
|
288
|
-
}
|
289
|
-
});
|
290
|
-
|
291
|
-
if (view === 'Question preview') {
|
292
|
-
after(() => {
|
293
|
-
textSelectionPage.steps.clickOnSaveQuestionButton();
|
294
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
295
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
296
|
-
});
|
297
|
-
};
|
298
|
-
|
299
|
-
it('Question instructions should be visible', () => {
|
300
|
-
textSelectionPage.steps.verifyQuestionInstructionsTextPreviewTab('Highlight the correct statements.');
|
301
|
-
textSelectionPage.steps.verifyVisibityOfQuestionInstructionsText();
|
302
|
-
});
|
303
|
-
|
304
|
-
it('User should be able to attempt the question in student view, and correct/incorrect icons, "Your answer is correct/incorrect" label, and correct answer section should not be displayed in grading view', () => {
|
305
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
|
306
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
|
307
|
-
if (view === 'Grading view') {
|
308
|
-
studentViewPage.steps.submitResponse();
|
309
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
310
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
311
|
-
gradingViewPage.steps.verifyGradingViewScore('', 20);
|
312
|
-
};
|
313
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
314
|
-
textSelectionPage.steps.checkManuallyScoredScoringLabel();
|
315
|
-
};
|
316
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
317
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
318
|
-
textSelectionPage.steps.verifyCorrectAnswerSectionNotExist();
|
319
|
-
});
|
320
|
-
});
|
321
|
-
});
|
322
|
-
|
323
|
-
views.forEach((view) => {
|
324
|
-
describe(`${view}: Text selection - Non scored`, { tags: 'smoke' }, () => {
|
325
|
-
abortEarlySetup();
|
326
|
-
before(() => {
|
327
|
-
switch (view) {
|
328
|
-
case 'Question preview':
|
329
|
-
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
330
|
-
cy.barsPreLoaderWait();
|
331
|
-
textSelectionPage.steps.addTextInQuestionInstructionsInputField('Highlight the correct statements.');
|
332
|
-
textSelectionPage.steps.clearQuestionInputField();
|
333
|
-
paragraphTextArray.forEach((paragraphText) => {
|
334
|
-
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
335
|
-
});
|
336
|
-
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
337
|
-
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
338
|
-
paragraphTextArray.forEach((text) => {
|
339
|
-
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(text);
|
340
|
-
});
|
341
|
-
textSelectionPage.steps.expandScoringTypeDropdown();
|
342
|
-
textSelectionPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
343
|
-
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
344
|
-
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
|
345
|
-
textSelectionPage.steps.switchToPreviewTab();
|
346
|
-
break;
|
347
|
-
case 'Item preview':
|
348
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
349
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
350
|
-
break;
|
351
|
-
case 'Grading view':
|
352
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
353
|
-
break;
|
354
|
-
};
|
355
|
-
});
|
356
|
-
|
357
|
-
beforeEach(() => {
|
358
|
-
switch (view) {
|
359
|
-
case 'Question preview':
|
360
|
-
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
361
|
-
textSelectionPage.steps.resetQuestionPreview();
|
362
|
-
break;
|
363
|
-
case 'Item preview':
|
364
|
-
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
365
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
366
|
-
break;
|
367
|
-
case 'Grading view':
|
368
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
369
|
-
break;
|
370
|
-
}
|
371
|
-
});
|
372
|
-
|
373
|
-
if (view === 'Question preview') {
|
374
|
-
after(() => {
|
375
|
-
textSelectionPage.steps.clickOnSaveQuestionButton();
|
376
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
377
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
378
|
-
});
|
379
|
-
};
|
380
|
-
|
381
|
-
it('When the user selects "Grading" view without attempting the question non-scoring label 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 correct/incorrect icons should not be displayed', () => {
|
382
|
-
if (view === 'Grading view') {
|
383
|
-
studentViewPage.steps.submitResponse();
|
384
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
385
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
386
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
387
|
-
};
|
388
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
389
|
-
textSelectionPage.steps.checkNonScoredScoringLabel();
|
390
|
-
textSelectionPage.steps.switchToGradingView();
|
391
|
-
};
|
392
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
393
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
394
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[2]);
|
395
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[3]);
|
396
|
-
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
397
|
-
utilities.verifyInnerText(textSelectionPage.correctAnswersLabel(), 'Correct answers:');
|
398
|
-
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
399
|
-
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
400
|
-
});
|
401
|
-
|
402
|
-
it('When the user attempts the question incorrectly then non-scoring label should be displayed and on switching to "Grading" view, incorrect icons should be displayed beside all incorrect responses, a status message with text "Your answer is incorrect" and correct answer section with all correct answers should be displayed', () => {
|
403
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
|
404
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
|
405
|
-
if (view === 'Grading view') {
|
406
|
-
studentViewPage.steps.submitResponse();
|
407
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
408
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
409
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
410
|
-
};
|
411
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
412
|
-
textSelectionPage.steps.checkNonScoredScoringLabel();
|
413
|
-
textSelectionPage.steps.switchToGradingView();
|
414
|
-
};
|
415
|
-
textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[2]);
|
416
|
-
textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[3]);
|
417
|
-
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
418
|
-
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
419
|
-
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
420
|
-
});
|
421
|
-
|
422
|
-
it('When the user attempts the question partially correct (some correct and some incorrect), non-scoring label should be displayed and on switching to "Grading" view, correct icon should be displayed beside the correct answer response, incorrect icon should be displayed beside the incorrect answer response, a status message with text "Your answer is incorrect" and correct answer section with all correct answers should be displayed', () => {
|
423
|
-
if (view === 'Grading view') {
|
424
|
-
studentViewPage.steps.clearResponses();
|
425
|
-
};
|
426
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
|
427
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
|
428
|
-
if (view === 'Grading view') {
|
429
|
-
studentViewPage.steps.submitResponse();
|
430
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
431
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
432
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
433
|
-
};
|
434
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
435
|
-
textSelectionPage.steps.checkNonScoredScoringLabel();
|
436
|
-
textSelectionPage.steps.switchToGradingView();
|
437
|
-
};
|
438
|
-
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[0]);
|
439
|
-
textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[2]);
|
440
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
441
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[3]);
|
442
|
-
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
443
|
-
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
444
|
-
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
445
|
-
});
|
446
|
-
|
447
|
-
it('When the user attempts the question correctly, and on switching to "Grading" view, non-scoring label should be displayed, correct icons should be displayed beside the correct responses, a status message with text "Your answer is correct" should be displayed and correct answer section should not be displayed', () => {
|
448
|
-
if (view === 'Grading view') {
|
449
|
-
studentViewPage.steps.clearResponses();
|
450
|
-
};
|
451
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
|
452
|
-
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
|
453
|
-
if (view === 'Grading view') {
|
454
|
-
studentViewPage.steps.submitResponse();
|
455
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
456
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
457
|
-
gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
|
458
|
-
};
|
459
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
460
|
-
textSelectionPage.steps.checkNonScoredScoringLabel();
|
461
|
-
textSelectionPage.steps.switchToGradingView();
|
462
|
-
};
|
463
|
-
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[0]);
|
464
|
-
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[1]);
|
465
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[2]);
|
466
|
-
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[3]);
|
467
|
-
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
468
|
-
textSelectionPage.steps.verifyCorrectAnswerSectionNotExist();
|
469
|
-
});
|
470
|
-
});
|
471
|
-
});
|
472
|
-
|
473
242
|
if (!grepTags || !grepTags.includes('smoke')) {
|
474
243
|
describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
|
475
244
|
abortEarlySetup();
|
@@ -6,6 +6,7 @@ const selectors = {
|
|
6
6
|
...dialogBoxBase,
|
7
7
|
colorBlock: () => cy.get('.color-picker-block'),
|
8
8
|
colorSaturationPalette: () => cy.get('.react-colorful__saturation'),
|
9
|
+
alphaPicker : () => cy.get('.react-colorful__alpha'),
|
9
10
|
colorSaturationPicker: () => cy.get('.react-colorful__saturation-pointer .react-colorful__pointer-fill'),
|
10
11
|
colorHuePalette: () => cy.get('.react-colorful__hue'),
|
11
12
|
colorHuePicker: () => cy.get('.react-colorful__hue-pointer .react-colorful__pointer-fill'),
|
@@ -97,6 +98,11 @@ const steps = {
|
|
97
98
|
.click();
|
98
99
|
},
|
99
100
|
|
101
|
+
clickInAlphaPicker: () => {
|
102
|
+
colorPopupComponent.alphaPicker()
|
103
|
+
.click();
|
104
|
+
},
|
105
|
+
|
100
106
|
clickInColorHuePalette: () => {
|
101
107
|
colorPopupComponent.colorHuePalette()
|
102
108
|
.click();
|
@@ -1349,6 +1349,21 @@ const steps = {
|
|
1349
1349
|
});
|
1350
1350
|
},
|
1351
1351
|
|
1352
|
+
/**
|
1353
|
+
* @param {number} index index of highlight region
|
1354
|
+
* @param {string} colorWithOpacity color to be checked in rgba format
|
1355
|
+
* @description this function verifiies the border color of highlight regions in specify correct answer section.
|
1356
|
+
*/
|
1357
|
+
verifyEditedBorderOpacityInSpecifyCorrectAnswerSection: (index, colorWithOpacity) => {
|
1358
|
+
imageHighlightPage.specifyCorrectAnswerSectionHighlight()
|
1359
|
+
.eq(index)
|
1360
|
+
.within(() => {
|
1361
|
+
utilities.verifyCSS(imageHighlightPage.specifyCorrectAnswerSectionHighlightPolygon(), {
|
1362
|
+
'stroke': colorWithOpacity
|
1363
|
+
});
|
1364
|
+
});
|
1365
|
+
},
|
1366
|
+
|
1352
1367
|
/**
|
1353
1368
|
* @param {number} index index of highlight region
|
1354
1369
|
* @param {string} color color to be checked in rgb/rgba format
|
@@ -1366,6 +1381,23 @@ const steps = {
|
|
1366
1381
|
});
|
1367
1382
|
});
|
1368
1383
|
},
|
1384
|
+
/**
|
1385
|
+
* @param {number} index index of highlight region
|
1386
|
+
* @param {string} colorWithOpacity color to be checked in rgba format
|
1387
|
+
* @description this function verifies the border color of highlight regions in preview tab.
|
1388
|
+
*/
|
1389
|
+
verifyEditedBorderOpacityInPreviewtabSection: (index, colorWithOpacity) => {
|
1390
|
+
imageHighlightPage.previewTabQuestionWrapper()
|
1391
|
+
.within(() => {
|
1392
|
+
imageHighlightPage.previewSectionHighlight()
|
1393
|
+
.eq(index)
|
1394
|
+
.within(() => {
|
1395
|
+
utilities.verifyCSS(imageHighlightPage.specifyCorrectAnswerSectionHighlightPolygon(), {
|
1396
|
+
'stroke': colorWithOpacity
|
1397
|
+
});
|
1398
|
+
});
|
1399
|
+
});
|
1400
|
+
},
|
1369
1401
|
|
1370
1402
|
verifyBorderStyleButtonsVisible: () => {
|
1371
1403
|
utilities.verifyElementVisibilityState(imageHighlightPage.popupBorderStyleButtons().eq(0), 'visible');
|
@@ -255,7 +255,7 @@ const steps = {
|
|
255
255
|
break;
|
256
256
|
case 'none':
|
257
257
|
dragIcon
|
258
|
-
.should('not.
|
258
|
+
.should('not.be.visible');
|
259
259
|
break;
|
260
260
|
default:
|
261
261
|
throw new Error('Invalid drag handle option');
|
@@ -773,7 +773,6 @@ const steps = {
|
|
773
773
|
*/
|
774
774
|
expandPositionDropdownSpecifyCorrectAnswerSection: (dropdownIndex) => {
|
775
775
|
utilities.getNthElement(listOrderingPage.positionDropdownSpecifyCorrectAnswerSection(), dropdownIndex)
|
776
|
-
.trigger('mouseover')
|
777
776
|
.click();
|
778
777
|
},
|
779
778
|
|
@@ -1491,6 +1490,14 @@ const steps = {
|
|
1491
1490
|
utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.dropzoneSeperateList().find('[class*="MultipleDroppedItemstyles__FlexWrapper"]'), index), option);
|
1492
1491
|
});
|
1493
1492
|
},
|
1493
|
+
/**
|
1494
|
+
* Verifies the number of options in the dropzone of order as separate list.
|
1495
|
+
* @param {number} expectedCount - The expected number of options in the dropzone.
|
1496
|
+
*/
|
1497
|
+
verifyNumberOfOptionsInDropzoneOrderAsSeperateList: (expectedCount) => {
|
1498
|
+
listOrderingPage.dropzoneSeperateList().find('[class*="MultipleDroppedItemstyles__FlexWrapper"]')
|
1499
|
+
.should('have.length', expectedCount);
|
1500
|
+
},
|
1494
1501
|
|
1495
1502
|
/**
|
1496
1503
|
* Verifies the order of options in seperate list.
|
package/package.json
CHANGED
/package/cypress/e2e/ILC/{ChartsDotsPlot → chartsDotsPlot}/checkAnswerFunctionalityForAllViews.js
RENAMED
File without changes
|
File without changes
|