itemengine-cypress-automation 1.0.249-repoUpdated26thSept-d6c4173.0 → 1.0.250-30SeptUpdates-a6d872b.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/additionalSettingsBasic.js +1 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -3
  3. package/cypress/e2e/ILC/AudioResponseNew/headerSection.js +1 -1
  4. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -2
  5. package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +1 -1
  6. package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -2
  7. package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +1 -2
  8. package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +1 -1
  9. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/allOrNothingScoringForAllViews.smoke.js +1 -1
  10. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +2 -3
  11. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/previewContentsForAllViews.smoke.js +1 -1
  12. package/cypress/e2e/ILC/ChartsBar/chartFunctionalitySpecifyCorrectAnswerSection.js +2 -2
  13. package/cypress/e2e/ILC/ChartsBar/gradingViewAndCorrectAnswerView.smoke.js +3 -4
  14. package/cypress/e2e/ILC/ChartsBar/headerSection.js +2 -2
  15. package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +1 -1
  16. package/cypress/e2e/ILC/ChartsBar/selectChartTypeSection.js +8 -8
  17. package/cypress/e2e/ILC/ChartsBar/studentViewSettings.js +0 -1
  18. package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +1 -1
  19. package/cypress/e2e/ILC/ChartsLine/chartFunctionalitySpecifyCorrectAnswerSection.js +2 -2
  20. package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +2 -3
  21. package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +1 -1
  22. package/cypress/e2e/ILC/Compass/compassPreviewContent.smoke.js +1 -1
  23. package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +1 -1
  24. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +1 -1
  25. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/previewContentsForAllViews.smoke.js +1 -2
  26. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +3 -5
  27. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -6
  28. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePageHeaderSection.js +1 -1
  29. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +2 -4
  30. package/cypress/e2e/ILC/EssayResponse/additionalSettings.js +4 -4
  31. package/cypress/e2e/ILC/EssayResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -3
  32. package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +1 -1
  33. package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +1 -1
  34. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +1 -1
  35. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +1 -1
  37. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +1 -1
  38. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +75 -0
  39. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAlternateAnswerPopup.js +162 -0
  40. package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +0 -2
  41. package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +1 -1
  42. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +2 -2
  43. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +1 -1
  44. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +2 -2
  45. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  46. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +1 -1
  47. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +1 -1
  48. package/cypress/e2e/ILC/MatchingDropdown/editTabBasicSection.js +1 -1
  49. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +1 -1
  50. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
  51. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
  52. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +8 -8
  53. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -8
  54. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +8 -8
  55. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
  56. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +8 -8
  57. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -8
  58. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +8 -8
  59. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +9 -9
  60. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +6 -6
  61. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
  62. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +4 -4
  63. package/cypress/e2e/ILC/TextEntryMath/customSettings.js +1373 -0
  64. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +4 -4
  65. package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingAlternatePointsMoreThanCorrectPoints.js +161 -0
  66. package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingCorrectPointsEqualToAlternatePoints.js +162 -0
  67. package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingCorrectPointsMoreThanAlternatePoints.js +161 -0
  68. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsBasic.js +420 -0
  69. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +242 -0
  70. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +242 -0
  71. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +242 -0
  72. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsBasic.js +130 -0
  73. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
  74. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +195 -0
  75. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
  76. package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingAlternatePointsMoreThanCorrectPoints.js +161 -0
  77. package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingCorrectPointsEqualToAlternatePoints.js +162 -0
  78. package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingCorrectPointsMoreThanAlternatePoints.js +161 -0
  79. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsBasic.js +420 -0
  80. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +242 -0
  81. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +242 -0
  82. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +242 -0
  83. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsBasic.js +130 -0
  84. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +225 -0
  85. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
  86. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +225 -0
  87. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +1 -1
  88. package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +2 -3
  89. package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +2 -2
  90. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  91. package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +2 -2
  92. package/cypress/e2e/ILC/chartsDotsPlot/specifyCorrectAnswerSection.js +2 -2
  93. package/cypress/pages/audioResponsePage.js +0 -10
  94. package/cypress/pages/chartsBarPage.js +0 -13
  95. package/cypress/pages/chartsDotPlotPage.js +4 -85
  96. package/cypress/pages/chartsLinePage.js +2 -2
  97. package/cypress/pages/components/allowTeachersToDownloadStudentResponseComponent.js +1 -0
  98. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +11 -30
  99. package/cypress/pages/components/barAndLineChartComponent.js +0 -10
  100. package/cypress/pages/components/chartsCommonComponent.js +1 -25
  101. package/cypress/pages/components/colorPopupComponent.js +0 -31
  102. package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +0 -1
  103. package/cypress/pages/components/createQuestionBasePage.js +2 -8
  104. package/cypress/pages/components/customizeSpecialCharacterComponent.js +1 -1
  105. package/cypress/pages/components/draggableOptionContainer.js +1 -1
  106. package/cypress/pages/components/equationEditorFlyout.js +0 -36
  107. package/cypress/pages/components/essayResponseCommonComponents.js +2 -2
  108. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +2 -15
  109. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +1 -2
  110. package/cypress/pages/components/gridQuestionCommonComponent.js +26 -34
  111. package/cypress/pages/components/imageCanvasComponent.js +7 -9
  112. package/cypress/pages/components/index.js +0 -1
  113. package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +0 -12
  114. package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -1
  115. package/cypress/pages/components/optionsWrapperComponent.js +3 -3
  116. package/cypress/pages/components/scoringSectionBaseEditTab.js +2 -2
  117. package/cypress/pages/contentBlocksPage.js +1 -1
  118. package/cypress/pages/createItemPage.js +7 -6
  119. package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -41
  120. package/cypress/pages/essayResponsePage.js +0 -1
  121. package/cypress/pages/feedbackScalePage.js +0 -1
  122. package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
  123. package/cypress/pages/fillInTheGapsDropdownPage.js +79 -0
  124. package/cypress/pages/graphingPage.js +0 -1
  125. package/cypress/pages/gridFillPage.js +45 -112
  126. package/cypress/pages/imageHighlightPage.js +0 -10
  127. package/cypress/pages/itemPreviewSettingsPage.js +1 -4
  128. package/cypress/pages/listOrderingPage.js +0 -10
  129. package/cypress/pages/matchingPage.js +5 -142
  130. package/cypress/pages/multipleSelectionPage.js +0 -13
  131. package/cypress/pages/numberLineLabelPage.js +1 -1
  132. package/cypress/pages/numberLinePage.js +1 -1
  133. package/cypress/pages/protractorPage.js +1 -3
  134. package/cypress/pages/shortTextResponsePage.js +1 -3
  135. package/cypress/pages/simpleCalculatorPage.js +2 -2
  136. package/cypress/pages/singleSelectionPage.js +0 -10
  137. package/cypress/pages/textEntryMathPage.js +1 -8
  138. package/cypress/pages/textEntryMathWithImagePage.js +16 -38
  139. package/cypress/pages/textSelectionPage.js +34 -43
  140. package/cypress/pages/videoResponsePage.js +0 -5
  141. package/package.json +1 -1
  142. package/cypress/pages/components/customizeHighlightPropertiesComponent.js +0 -318
  143. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/basicScoringForAllTextSelectionTypes.smoke.js +0 -0
  144. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/manuallyAndNonScored.js +0 -0
  145. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/singleSelectionPreviewScoring.js +0 -0
  146. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -0
  147. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -0
  148. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -0
  149. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsBasic.js +0 -0
  150. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
  151. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
  152. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
  153. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsBasic.js +0 -0
  154. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
  155. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
  156. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
@@ -0,0 +1,420 @@
1
+ import { textSelectionPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ const wordTextArray = ['Nature','nurtures', 'life', 'and', 'brings', 'endless', 'beauty.']
5
+
6
+ describe('Create item page - Text selection - Selection mode - Word: Partial different weights', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Auto scored - Partial different weights', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
15
+ cy.barsPreLoaderWait();
16
+ textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
17
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
18
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
19
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
20
+ textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
21
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['9', '6', '5']);
22
+ textSelectionPage.steps.switchToPreviewTab();
23
+ });
24
+
25
+ it('When the user selects \'Grading\' view without attempting the question, status message should not be displayed and correct answers should be displayed', () => {
26
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
27
+ textSelectionPage.steps.switchToGradingView();
28
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
29
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
30
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
31
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
32
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
33
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
34
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
35
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
36
+ });
37
+
38
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, red cross-marks should be displayed besides all incorrect responses, a status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
39
+ textSelectionPage.steps.resetQuestionPreview();
40
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
41
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
42
+ textSelectionPage.steps.switchToGradingView();
43
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
44
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
45
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
46
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[3]);
47
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
48
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
49
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
50
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
51
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
52
+ });
53
+
54
+ it('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options, then the user should be awarded points alloted to the responses and on switching to \'Grading\' view, green check-mark should be displayed besides the correct answer responses, red cross-mark should be displayed besides incorrect answer response, a status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
55
+ textSelectionPage.steps.resetQuestionPreview();
56
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
57
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
58
+ textSelectionPage.steps.verifyPreviewScore(9, 20);
59
+ textSelectionPage.steps.switchToGradingView();
60
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
61
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
62
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
63
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[3]);
64
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
65
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
66
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
67
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
68
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
69
+ });
70
+
71
+ it('When the user attempts the question partially correct with all the responses correctly attempted but one response incomplete, then the user should be awarded points of the correctly attempted responses and on switching to \'Grading\' view, green check-mark should be displayed besides the correct answer responses, red cross-mark should be displayed besides incorrect answer response, a status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
72
+ textSelectionPage.steps.resetQuestionPreview();
73
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
74
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
75
+ textSelectionPage.steps.verifyPreviewScore(11, 20);
76
+ textSelectionPage.steps.switchToGradingView();
77
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
78
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
79
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
80
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
81
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
82
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
83
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
84
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
85
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
86
+ });
87
+
88
+ it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then green check-marks should be displayed beside all the correct responses, green check-mark should be displayed besides the correct answer responses, a status message and correct answer section should not be displayed', () => {
89
+ textSelectionPage.steps.resetQuestionPreview();
90
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
91
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
92
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
93
+ textSelectionPage.steps.verifyPreviewScore(20, 20);
94
+ textSelectionPage.steps.switchToGradingView();
95
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
96
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
97
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
98
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
99
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
100
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
101
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
102
+ });
103
+ });
104
+
105
+ describe('Question preview: Auto scored - Partial different weights: Minimum scoring', () => {
106
+ abortEarlySetup();
107
+ before(() => {
108
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
109
+ cy.barsPreLoaderWait();
110
+ textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
111
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
112
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
113
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
114
+ textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
115
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['1', '6', '5']);
116
+ });
117
+
118
+ it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
119
+ textSelectionPage.steps.expandMinimumScoringDropdown();
120
+ textSelectionPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
121
+ textSelectionPage.steps.allotMinimumPoints(2);
122
+ textSelectionPage.steps.switchToPreviewTab();
123
+ textSelectionPage.steps.switchToGradingView();
124
+ textSelectionPage.steps.verifyPreviewScore(2, 12);
125
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
126
+ });
127
+
128
+ it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
129
+ textSelectionPage.steps.resetQuestionPreview();
130
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
131
+ textSelectionPage.steps.verifyPreviewScore(2, 12);
132
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
133
+ });
134
+
135
+ it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with 0 points', () => {
136
+ textSelectionPage.steps.switchToEditTab();
137
+ textSelectionPage.steps.expandMinimumScoringDropdown();
138
+ textSelectionPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
139
+ textSelectionPage.steps.allotMinimumPoints(2);
140
+ textSelectionPage.steps.switchToPreviewTab();
141
+ textSelectionPage.steps.switchToGradingView();
142
+ textSelectionPage.steps.verifyPreviewScore(0, 12);
143
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
144
+ });
145
+
146
+ it('When the user has selected \'Award minimum score only if attempted\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
147
+ textSelectionPage.steps.resetQuestionPreview();
148
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
149
+ textSelectionPage.steps.verifyPreviewScore(2, 12);
150
+ });
151
+
152
+ it('When the user attempts the question partially correct such that points of the correctly attempted option are greater than minimum points, then the user should be awarded with points as per the correctly attempted response', () => {
153
+ textSelectionPage.steps.resetQuestionPreview();
154
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
155
+ textSelectionPage.steps.verifyPreviewScore(6, 12);
156
+ });
157
+
158
+ it('When the user attempts the question partially correct such that minimum points are greater than points of the correctly attempted option, then the user should be awarded with minimum points', () => {
159
+ textSelectionPage.steps.resetQuestionPreview();
160
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
161
+ textSelectionPage.steps.verifyPreviewScore(2, 12);
162
+ });
163
+ });
164
+
165
+ describe('Question preview: Auto scored - Partial different weights: Rounding', () => {
166
+ abortEarlySetup();
167
+ before(() => {
168
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
169
+ cy.barsPreLoaderWait();
170
+ textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
171
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
172
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
173
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
174
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
175
+ textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
176
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['2.67', '1.99', '1.34', '4.5']);
177
+ });
178
+
179
+ it('When the user sets \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value greater than 0.5 and less than 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
180
+ textSelectionPage.steps.expandRoundingDropdown();
181
+ textSelectionPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
182
+ textSelectionPage.steps.switchToPreviewTab();
183
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
184
+ textSelectionPage.steps.verifyPreviewScore(2, 10.5);
185
+ });
186
+
187
+ it('When the user has set \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
188
+ textSelectionPage.steps.resetQuestionPreview();
189
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
190
+ textSelectionPage.steps.verifyPreviewScore(1, 10.5);
191
+ });
192
+
193
+ it('When the user sets \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
194
+ textSelectionPage.steps.switchToEditTab();
195
+ textSelectionPage.steps.expandRoundingDropdown();
196
+ textSelectionPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
197
+ textSelectionPage.steps.switchToPreviewTab();
198
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
199
+ textSelectionPage.steps.verifyPreviewScore(1, 10.5);
200
+ });
201
+
202
+ it('When the user has set \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
203
+ textSelectionPage.steps.resetQuestionPreview();
204
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
205
+ textSelectionPage.steps.verifyPreviewScore(4, 10.5);
206
+ });
207
+
208
+ it('When the user sets \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
209
+ textSelectionPage.steps.switchToEditTab();
210
+ textSelectionPage.steps.expandRoundingDropdown();
211
+ textSelectionPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
212
+ textSelectionPage.steps.switchToPreviewTab();
213
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
214
+ textSelectionPage.steps.verifyPreviewScore(1, 10.5);
215
+ });
216
+
217
+ it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
218
+ textSelectionPage.steps.resetQuestionPreview();
219
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
220
+ textSelectionPage.steps.verifyPreviewScore(4, 10.5);
221
+ });
222
+
223
+ it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value greater than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
224
+ textSelectionPage.steps.resetQuestionPreview();
225
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
226
+ textSelectionPage.steps.verifyPreviewScore(3, 10.5);
227
+ });
228
+
229
+ it('When \'Round negative score to zero\' is in checked state and the user attempts the question incorrectly, then the user should be awarded with 0 points', () => {
230
+ cy.log('Pre-step: Setting penalty scoring to \'Penalty points for the entire question\', allotting penalty points')
231
+ textSelectionPage.steps.switchToEditTab();
232
+ textSelectionPage.steps.expandPenaltyScoringDropdown();
233
+ textSelectionPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
234
+ textSelectionPage.steps.allotPenaltyPoints(4);
235
+ textSelectionPage.steps.switchToPreviewTab();
236
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
237
+ textSelectionPage.steps.verifyPreviewScore(0, 10.5);
238
+ });
239
+
240
+ it('When the user unchecks \'Round negative score to zero\' checkbox and the user attempts the question incorrectly, then the user should be awarded with negative points', () => {
241
+ textSelectionPage.steps.switchToEditTab();
242
+ textSelectionPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
243
+ textSelectionPage.steps.switchToPreviewTab();
244
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
245
+ textSelectionPage.steps.verifyPreviewScore(-4, 10.5);
246
+ });
247
+ });
248
+
249
+ describe('Question preview: Auto scored - Partial different weights: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
250
+ abortEarlySetup();
251
+ before(() => {
252
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
253
+ cy.barsPreLoaderWait();
254
+ textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
255
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
256
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
257
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
258
+ textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
259
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['9', '6', '5']);
260
+ });
261
+
262
+ //Penalty points for the entire question
263
+ it('When the user sets penalty scoring to \'Penalty points for the entire question\', allots penalty points and attempts the question incorrectly, then the user should be awarded with negative points', () => {
264
+ textSelectionPage.steps.expandPenaltyScoringDropdown();
265
+ textSelectionPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
266
+ textSelectionPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
267
+ textSelectionPage.steps.allotPenaltyPoints(4);
268
+ textSelectionPage.steps.switchToPreviewTab();
269
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
270
+ textSelectionPage.steps.verifyPreviewScore(-4, 20);
271
+ });
272
+
273
+ it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
274
+ textSelectionPage.steps.resetQuestionPreview();
275
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
276
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
277
+ textSelectionPage.steps.verifyPreviewScore(5, 20);
278
+ });
279
+
280
+ it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points should get deducted from the awarded points only once, the deducted penalty points should not increase as per number of attempted incorrect responses', () => {
281
+ textSelectionPage.steps.resetQuestionPreview();
282
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
283
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
284
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
285
+ textSelectionPage.steps.verifyPreviewScore(5, 20);
286
+ });
287
+
288
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
289
+ textSelectionPage.steps.switchToEditTab();
290
+ textSelectionPage.steps.expandMinimumScoringDropdown();
291
+ textSelectionPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
292
+ textSelectionPage.steps.allotMinimumPoints(3);
293
+ textSelectionPage.steps.switchToPreviewTab();
294
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
295
+ textSelectionPage.steps.verifyPreviewScore(3, 20);
296
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
297
+ textSelectionPage.steps.switchToEditTab();
298
+ textSelectionPage.steps.expandMinimumScoringDropdown();
299
+ textSelectionPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
300
+ });
301
+
302
+ // Penalty points for each incorrect answer - Specify total penalty points
303
+ it('When the user sets penalty scoring to \'Penalty points for each incorrect answer\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points of all the empty and incorrect answer', () => {
304
+ textSelectionPage.steps.expandPenaltyScoringDropdown();
305
+ textSelectionPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect answer');
306
+ textSelectionPage.steps.allotTotalPenaltyPoints(4);
307
+ textSelectionPage.steps.switchToPreviewTab();
308
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
309
+ textSelectionPage.steps.verifyPreviewScore(-1, 20);
310
+ });
311
+
312
+ it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
313
+ textSelectionPage.steps.resetQuestionPreview();
314
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
315
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
316
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
317
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
318
+ textSelectionPage.steps.verifyPreviewScore(19, 20);
319
+ });
320
+
321
+ it('When the user attempts the question correctly along with multiple incorrect options, then penalty points for each incorrect answer should get deducted from the awarded points', () => {
322
+ textSelectionPage.steps.resetQuestionPreview();
323
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
324
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
325
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
326
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
327
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
328
+ textSelectionPage.steps.verifyPreviewScore(18, 20);
329
+ });
330
+
331
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
332
+ textSelectionPage.steps.switchToEditTab();
333
+ textSelectionPage.steps.expandMinimumScoringDropdown();
334
+ textSelectionPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
335
+ textSelectionPage.steps.allotMinimumPoints(3);
336
+ textSelectionPage.steps.switchToPreviewTab();
337
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
338
+ textSelectionPage.steps.verifyPreviewScore(3, 20);
339
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
340
+ textSelectionPage.steps.switchToEditTab();
341
+ textSelectionPage.steps.expandMinimumScoringDropdown();
342
+ textSelectionPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
343
+ });
344
+
345
+ //Penalty points for each incorrect answer - Specify points for each incorrect answer
346
+ it('When the user has set penalty scoring to \'Penalty points for each incorrect answer\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points for the incorrect and empty answer', () => {
347
+ textSelectionPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify points for each incorrect option');
348
+ textSelectionPage.steps.allotPenaltyPointsForEachIncorrectOption(4);
349
+ textSelectionPage.steps.switchToPreviewTab();
350
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
351
+ textSelectionPage.steps.verifyPreviewScore(-4, 20);
352
+ });
353
+
354
+ it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
355
+ textSelectionPage.steps.resetQuestionPreview();
356
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
357
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
358
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
359
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
360
+ textSelectionPage.steps.verifyPreviewScore(16, 20);
361
+ });
362
+
363
+ it('When the user attempts the question correctly along with multiple incorrect options, then penalty points for each incorrect answer should get deducted from the awarded points', () => {
364
+ textSelectionPage.steps.resetQuestionPreview();
365
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
366
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
367
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
368
+ textSelectionPage.steps.verifyPreviewScore(1, 20);
369
+ });
370
+
371
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
372
+ textSelectionPage.steps.switchToEditTab();
373
+ textSelectionPage.steps.expandMinimumScoringDropdown();
374
+ textSelectionPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
375
+ textSelectionPage.steps.allotMinimumPoints(3);
376
+ textSelectionPage.steps.switchToPreviewTab();
377
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
378
+ textSelectionPage.steps.verifyPreviewScore(3, 20);
379
+ cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
380
+ textSelectionPage.steps.switchToEditTab();
381
+ textSelectionPage.steps.expandMinimumScoringDropdown();
382
+ textSelectionPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
383
+ });
384
+
385
+ //Penalty points for each incorrect answer - Automatically set penalty for each incorrect answer to total points / no. of incorrect answer
386
+ it('When the user has set penalty scoring to \'Penalty points for each incorrect answer\', and checks \'Automatically set penalty for each incorrect answer to total points / no. of incorrect answer\' checkbox and attempts the question incorrectly, then the user should be awarded with negative points for the incorrect and empty answer', () => {
387
+ textSelectionPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
388
+ textSelectionPage.steps.switchToPreviewTab();
389
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
390
+ textSelectionPage.steps.verifyPreviewScore(-5, 20);
391
+ });
392
+
393
+ it('When the user attempts the question correctly along with an incorrect option, then penalty points should get deducted from the awarded points', () => {
394
+ textSelectionPage.steps.resetQuestionPreview();
395
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
396
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
397
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
398
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
399
+ textSelectionPage.steps.verifyPreviewScore(15, 20);
400
+ });
401
+
402
+ it('When the user attempts the question correctly along with multiple incorrect options, then penalty points for each incorrect answer should get deducted from the awarded points', () => {
403
+ textSelectionPage.steps.resetQuestionPreview();
404
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
405
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
406
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
407
+ textSelectionPage.steps.verifyPreviewScore(10, 20);
408
+ });
409
+
410
+ it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
411
+ textSelectionPage.steps.switchToEditTab();
412
+ textSelectionPage.steps.expandMinimumScoringDropdown();
413
+ textSelectionPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
414
+ textSelectionPage.steps.allotMinimumPoints(3);
415
+ textSelectionPage.steps.switchToPreviewTab();
416
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
417
+ textSelectionPage.steps.verifyPreviewScore(3, 20);
418
+ });
419
+ });
420
+ });