itemengine-cypress-automation 1.0.384-task-IEI-4672-9e835ce.0 → 1.0.385-IEI-6161-IEI-6162-manualAndNonScoredScript-72a6ac7.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.
Files changed (33) hide show
  1. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/allOrNothingScoringForAllViews.smoke.js +356 -0
  2. package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +287 -0
  3. package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +247 -0
  4. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +211 -0
  5. package/cypress/e2e/ILC/Graphing/specifyCorrectAnswerSection.js +0 -28
  6. package/cypress/e2e/ILC/ListOrderingDropdown/editTabBasicSection.js +0 -2
  7. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  8. package/cypress/e2e/ILC/MatchingDropdown/Scoring/blankResponseScoring.js +0 -1
  9. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +6 -6
  10. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +0 -213
  11. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +0 -249
  12. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +0 -266
  13. package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/allOrNothingForAllViews.smoke.js +0 -268
  14. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +5 -5
  15. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +3 -3
  16. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialDifferentWeightsScoringBasic.js +1 -1
  17. package/cypress/e2e/ILC/TextEntryMath/MathTemplateScoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +2 -2
  18. package/cypress/e2e/ILC/TextEntryMath/Scoring/blankResponseScoring.js +2 -2
  19. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +0 -263
  20. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +0 -217
  21. package/cypress/e2e/ILC/TextEntryMath/equationEditor.smoke.js +1 -1
  22. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.smoke.js +3 -3
  23. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +0 -263
  24. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +1 -0
  25. package/cypress/e2e/ILC/TextEntryMathWithImage/styleAndLayoutCustomization.js +1 -1
  26. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +0 -1
  27. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +248 -0
  28. package/cypress/pages/components/chartsCommonComponent.js +15 -0
  29. package/cypress/pages/components/equationEditorSectionCommonComponent.js +4 -4
  30. package/cypress/pages/graphingPage.js +1 -2
  31. package/cypress/pages/listOrderingPage.js +1 -6
  32. package/cypress/pages/textEntryMathPage.js +7 -3
  33. package/package.json +1 -1
@@ -318,6 +318,362 @@ describe('Create item page - Charts - Bar horizontal orientation: All or nothing
318
318
  });
319
319
  });
320
320
 
321
+ views.forEach((view) => {
322
+ describe(`${view}: Charts - Bar Horizontal: Manually scored`, { tags: 'smoke' }, () => {
323
+ abortEarlySetup();
324
+ before(() => {
325
+ switch (view) {
326
+ case 'Question preview':
327
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
328
+ cy.barsPreLoaderWait();
329
+ chartsBarPage.steps.selectHorizontalDirectionRadioButton();
330
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
331
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
332
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
333
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 3, range: 10 }, 'horizontal');
334
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 }, 'horizontal');
335
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 3, range: 10 }, 'horizontal');
336
+ chartsBarPage.steps.lockBar(1);
337
+ chartsBarPage.steps.expandScoringTypeDropdown();
338
+ chartsBarPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
339
+ chartsBarPage.steps.allotPointsForManualScoring(20);
340
+ chartsBarPage.steps.switchToPreviewTab();
341
+ break;
342
+ case 'Item preview':
343
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
344
+ itemPreviewPage.steps.switchToPreviewTab();
345
+ break;
346
+ case 'Grading view':
347
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
348
+ break;
349
+ }
350
+ });
351
+
352
+ beforeEach(() => {
353
+ switch (view) {
354
+ case 'Question preview':
355
+ chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
356
+ chartsBarPage.steps.resetQuestionPreview();
357
+ break;
358
+ case 'Item preview':
359
+ itemPreviewPage.steps.switchToStudentView();
360
+ itemPreviewPage.steps.resetQuestionPreview();
361
+ break;
362
+ case 'Grading view':
363
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
364
+ break;
365
+ }
366
+ });
367
+
368
+ if (view === 'Question preview') {
369
+ after(() => {
370
+ chartsBarPage.steps.clickOnSaveQuestionButton();
371
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
372
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
373
+ });
374
+ }
375
+
376
+ it('Question instructions should be visible', () => {
377
+ chartsBarPage.steps.verifyQuestionInstructionsTextPreviewTab('Set the bar on the chart for the profits of the years');
378
+ chartsBarPage.steps.verifyVisibityOfQuestionInstructionsText();
379
+ });
380
+
381
+ 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', () => {
382
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 }, 'horizontal');
383
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 6, range: 10 }, 'horizontal');
384
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 5, range: 10 }, 'horizontal');
385
+ if (view === 'Grading view') {
386
+ studentViewPage.steps.submitResponse();
387
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
388
+ studentViewPage.steps.clickOnGoToGradingViewButton();
389
+ gradingViewPage.steps.verifyGradingViewScore('', 20);
390
+ }
391
+ if (view === 'Question preview' || view === 'Item preview') {
392
+ chartsBarPage.steps.checkManuallyScoredScoringLabel();
393
+ }
394
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(0);
395
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(2);
396
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(3);
397
+ chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
398
+ });
399
+ });
400
+ });
401
+
402
+ views.forEach((view) => {
403
+ describe(`${view}: Charts - Bar Horizontal: Non scored`, { tags: 'smoke' }, () => {
404
+ abortEarlySetup();
405
+ before(() => {
406
+ switch (view) {
407
+ case 'Question preview':
408
+ chartsBarPage.steps.navigateToCreateQuestion('charts');
409
+ cy.barsPreLoaderWait();
410
+ chartsBarPage.steps.selectHorizontalDirectionRadioButton();
411
+ chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
412
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
413
+ chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
414
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 3, range: 10 }, 'horizontal');
415
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 }, 'horizontal');
416
+ chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 3, range: 10 }, 'horizontal');
417
+ chartsBarPage.steps.lockBar(1);
418
+ chartsBarPage.steps.expandScoringTypeDropdown();
419
+ chartsBarPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
420
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 3, range: 10 }, 'horizontal');
421
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 6, range: 10 }, 'horizontal');
422
+ chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 5, range: 10 }, 'horizontal');
423
+ chartsBarPage.steps.switchToPreviewTab();
424
+ break;
425
+ case 'Item preview':
426
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
427
+ itemPreviewPage.steps.switchToPreviewTab();
428
+ break;
429
+ case 'Grading view':
430
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
431
+ break;
432
+ }
433
+ });
434
+
435
+ beforeEach(() => {
436
+ switch (view) {
437
+ case 'Question preview':
438
+ chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
439
+ chartsBarPage.steps.resetQuestionPreview();
440
+ break;
441
+ case 'Item preview':
442
+ itemPreviewPage.steps.switchToStudentView();
443
+ itemPreviewPage.steps.resetQuestionPreview();
444
+ break;
445
+ case 'Grading view':
446
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
447
+ break;
448
+ }
449
+ });
450
+
451
+ if (view === 'Question preview') {
452
+ after(() => {
453
+ chartsBarPage.steps.clickOnSaveQuestionButton();
454
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
455
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
456
+ });
457
+ }
458
+
459
+ //Need to remove skip once https://redmine.zeuslearning.com/issues/577716 is resolved
460
+ it.skip('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', () => {
461
+ if (view === 'Grading view') {
462
+ studentViewPage.steps.submitResponse();
463
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
464
+ studentViewPage.steps.clickOnGoToGradingViewButton();
465
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
466
+ };
467
+ if (view === 'Question preview' || view === 'Item preview') {
468
+ chartsBarPage.steps.checkNonScoredScoringLabel();
469
+ chartsBarPage.steps.switchToGradingView();
470
+ };
471
+ chartsBarPage.steps.checkNonScoredScoringLabel();
472
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(0);
473
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
474
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(2);
475
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(3);
476
+ chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
477
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
478
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
479
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
480
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
481
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
482
+ });
483
+
484
+ it('When the user incorrectly sets a bar which was correct by default, then non-scoring label should be displayed and on switching to grading view, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
485
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 5, range: 10 }, 'horizontal');
486
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 2, range: 10 }, 'horizontal');
487
+ if (view === 'Grading view') {
488
+ studentViewPage.steps.submitResponse();
489
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
490
+ studentViewPage.steps.clickOnGoToGradingViewButton();
491
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
492
+ };
493
+ if (view === 'Question preview' || view === 'Item preview') {
494
+ chartsBarPage.steps.checkNonScoredScoringLabel();
495
+ chartsBarPage.steps.switchToGradingView();
496
+ };
497
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
498
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
499
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
500
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
501
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
502
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
503
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
504
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
505
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
506
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
507
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
508
+ });
509
+
510
+ it('When the user incorrectly sets a bar which was set to 0 and correct by default, then non-scoring label should be displayed and on switching to grading view, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
511
+ if (view === 'Grading view') {
512
+ studentViewPage.steps.clearResponses();
513
+ }
514
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 5, range: 10 }, 'horizontal');
515
+ if (view === 'Grading view') {
516
+ studentViewPage.steps.submitResponse();
517
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
518
+ studentViewPage.steps.clickOnGoToGradingViewButton();
519
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
520
+ };
521
+ if (view === 'Question preview' || view === 'Item preview') {
522
+ chartsBarPage.steps.checkNonScoredScoringLabel();
523
+ chartsBarPage.steps.switchToGradingView();
524
+ };
525
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
526
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
527
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
528
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
529
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
530
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
531
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
532
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
533
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
534
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
535
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
536
+ });
537
+
538
+ it('When the user attempts the question partially correct by incorrectly setting a bar which was incorrect by default, then non-scoring label should be displayed and on switching to grading view, correct icons should be displayed on the correctly attempted bars, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
539
+ if (view === 'Grading view') {
540
+ studentViewPage.steps.clearResponses();
541
+ }
542
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 2, range: 10 }, 'horizontal');
543
+ if (view === 'Grading view') {
544
+ studentViewPage.steps.submitResponse();
545
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
546
+ studentViewPage.steps.clickOnGoToGradingViewButton();
547
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
548
+ };
549
+ if (view === 'Question preview' || view === 'Item preview') {
550
+ chartsBarPage.steps.checkNonScoredScoringLabel();
551
+ chartsBarPage.steps.switchToGradingView();
552
+ };
553
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
554
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
555
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
556
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
557
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
558
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
559
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
560
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
561
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
562
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
563
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
564
+ });
565
+
566
+ it('When the user attempts the question partially correct by incorrectly setting a bar to zero which was incorrect by default, then non-scoring label should be displayed and on switching to grading view, correct icons should be displayed on the correctly attempted bars, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
567
+ if (view === 'Grading view') {
568
+ studentViewPage.steps.clearResponses();
569
+ }
570
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 0, range: 10 }, 'horizontal');
571
+ if (view === 'Grading view') {
572
+ studentViewPage.steps.submitResponse();
573
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
574
+ studentViewPage.steps.clickOnGoToGradingViewButton();
575
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
576
+ };
577
+ if (view === 'Question preview' || view === 'Item preview') {
578
+ chartsBarPage.steps.checkNonScoredScoringLabel();
579
+ chartsBarPage.steps.switchToGradingView();
580
+ };
581
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
582
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
583
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
584
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
585
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
586
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
587
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
588
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
589
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
590
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
591
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
592
+ });
593
+
594
+ it('When the user attempts the question partially correct by incorrectly setting a bar which was set to zero by default, then non-scoring label should be displayed and on switching to grading view, correct icons should be displayed on the correctly attempted bars, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
595
+ if (view === 'Grading view') {
596
+ studentViewPage.steps.clearResponses();
597
+ }
598
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 9, range: 10 }, 'horizontal');
599
+ if (view === 'Grading view') {
600
+ studentViewPage.steps.submitResponse();
601
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
602
+ studentViewPage.steps.clickOnGoToGradingViewButton();
603
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
604
+ };
605
+ if (view === 'Question preview' || view === 'Item preview') {
606
+ chartsBarPage.steps.checkNonScoredScoringLabel();
607
+ chartsBarPage.steps.switchToGradingView();
608
+ };
609
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
610
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
611
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
612
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
613
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
614
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
615
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
616
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
617
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
618
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
619
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
620
+ });
621
+
622
+ it('When the user attempts the question partially correct by setting all bars correctly except 1 then non-scoring label should be displayed and on switching to grading view, correct icons should be displayed on the correctly attempted bars and incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
623
+ if (view === 'Grading view') {
624
+ studentViewPage.steps.clearResponses();
625
+ }
626
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 5, range: 10 }, 'horizontal');
627
+ if (view === 'Grading view') {
628
+ studentViewPage.steps.submitResponse();
629
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
630
+ studentViewPage.steps.clickOnGoToGradingViewButton();
631
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
632
+ };
633
+ if (view === 'Question preview' || view === 'Item preview') {
634
+ chartsBarPage.steps.checkNonScoredScoringLabel();
635
+ chartsBarPage.steps.switchToGradingView();
636
+ };
637
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
638
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
639
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
640
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
641
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
642
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
643
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
644
+ chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
645
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
646
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
647
+ chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
648
+ });
649
+
650
+ it('When the user attempts the question correctly then non-scoring label should be displayed, correct icons should be displayed on the correctly attempted bars, a status message with text "Your answer is correct" should be displayed and the correct answer section graph should not be displayed', () => {
651
+ if (view === 'Grading view') {
652
+ studentViewPage.steps.clearResponses();
653
+ }
654
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 6, range: 10 }, 'horizontal');
655
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 5, range: 10 }, 'horizontal');
656
+ if (view === 'Grading view') {
657
+ studentViewPage.steps.submitResponse();
658
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
659
+ studentViewPage.steps.clickOnGoToGradingViewButton();
660
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
661
+ };
662
+ if (view === 'Question preview' || view === 'Item preview') {
663
+ chartsBarPage.steps.checkNonScoredScoringLabel();
664
+ chartsBarPage.steps.switchToGradingView();
665
+ };
666
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
667
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
668
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
669
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
670
+ chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
671
+ chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
672
+ chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
673
+ });
674
+ });
675
+ });
676
+
321
677
  if (!grepTags || !grepTags.includes('smoke')) {
322
678
  describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
323
679
  abortEarlySetup();