itemengine-cypress-automation 1.0.249-repoUpdated26thSept-7283964.0 → 1.0.249

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) 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/imageHighlightStyle.js +1 -1
  41. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +2 -2
  42. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +1 -1
  43. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +2 -2
  44. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  45. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +1 -1
  46. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +1 -1
  47. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +15 -2
  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/gridQuestionCommonComponent.js +26 -34
  110. package/cypress/pages/components/imageCanvasComponent.js +5 -5
  111. package/cypress/pages/components/index.js +0 -1
  112. package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +0 -12
  113. package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -1
  114. package/cypress/pages/components/optionsWrapperComponent.js +3 -3
  115. package/cypress/pages/components/scoringSectionBaseEditTab.js +2 -2
  116. package/cypress/pages/contentBlocksPage.js +1 -1
  117. package/cypress/pages/createItemPage.js +7 -6
  118. package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -41
  119. package/cypress/pages/essayResponsePage.js +0 -1
  120. package/cypress/pages/feedbackScalePage.js +0 -1
  121. package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
  122. package/cypress/pages/fillInTheGapsDropdownPage.js +79 -0
  123. package/cypress/pages/graphingPage.js +0 -1
  124. package/cypress/pages/gridFillPage.js +45 -112
  125. package/cypress/pages/imageHighlightPage.js +0 -10
  126. package/cypress/pages/itemPreviewSettingsPage.js +1 -4
  127. package/cypress/pages/listOrderingPage.js +0 -10
  128. package/cypress/pages/matchingPage.js +5 -142
  129. package/cypress/pages/multipleSelectionPage.js +0 -13
  130. package/cypress/pages/numberLineLabelPage.js +1 -1
  131. package/cypress/pages/numberLinePage.js +1 -1
  132. package/cypress/pages/protractorPage.js +1 -3
  133. package/cypress/pages/shortTextResponsePage.js +1 -3
  134. package/cypress/pages/simpleCalculatorPage.js +2 -2
  135. package/cypress/pages/singleSelectionPage.js +0 -10
  136. package/cypress/pages/textEntryMathPage.js +1 -8
  137. package/cypress/pages/textEntryMathWithImagePage.js +16 -38
  138. package/cypress/pages/textSelectionPage.js +34 -43
  139. package/cypress/pages/videoResponsePage.js +0 -5
  140. package/package.json +1 -1
  141. package/cypress/pages/components/customizeHighlightPropertiesComponent.js +0 -318
  142. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/basicScoringForAllTextSelectionTypes.smoke.js +0 -0
  143. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/manuallyAndNonScored.js +0 -0
  144. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/singleSelectionPreviewScoring.js +0 -0
  145. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -0
  146. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -0
  147. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -0
  148. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsBasic.js +0 -0
  149. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
  150. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
  151. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
  152. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsBasic.js +0 -0
  153. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
  154. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
  155. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
@@ -0,0 +1,242 @@
1
+ import { textSelectionPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ import utilities from "../../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ const wordTextArray = ['Nature','nurtures', 'life', 'and', 'brings', 'endless', 'beauty.']
7
+
8
+ describe('Create item page - Text selection - Selection mode - Word: Partial different with alternative answers', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Question preview: Auto scored - Partial different weights with alternative answer - When \'Alternate answer\' points are more than \'Correct answer\' points', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
17
+ cy.barsPreLoaderWait();
18
+ textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
19
+ textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
20
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
21
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
22
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
23
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['7', '5', '1']);
24
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
25
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
26
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
27
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[4]);
28
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['4', '6', '5']);
29
+ textSelectionPage.steps.switchToPreviewTab();
30
+ });
31
+
32
+ it('When the user selects \'Grading view\' without attempting the question, status message should not be displayed and correct answer section should be displayed with correct answers of the alternate accordion', () => {
33
+ textSelectionPage.steps.verifyPreviewScore(0, 15);
34
+ textSelectionPage.steps.switchToGradingView();
35
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
36
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
37
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
38
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
39
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
40
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
41
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
42
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
43
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
44
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
45
+ });
46
+
47
+ it('When the user attempts the question according to the correct accordion then user should be awarded points of the correct accordion (less than full points) and on switching to \'Grading view\' correct icons should be displayed besides the correct attempted options from the correct accordion and a status message should not be displayed', () => {
48
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
49
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
50
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
51
+ textSelectionPage.steps.verifyPreviewScore(13, 15);
52
+ textSelectionPage.steps.switchToGradingView();
53
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
54
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
55
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
56
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
57
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
58
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
59
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
60
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
61
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
62
+ });
63
+
64
+ it('When the user attempts the question according to the alternate accordion then user should be awarded with full points and on switching to \'Grading view\' correct icons should be displayed besides the correct attempted options from the alternate accordion and a status message with text \'Your answer is correct\' and the correct answer section should not be displayed', () => {
65
+ textSelectionPage.steps.resetQuestionPreview();
66
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
67
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
68
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
69
+ textSelectionPage.steps.verifyPreviewScore(15, 15);
70
+ textSelectionPage.steps.switchToGradingView();
71
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
72
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
73
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
74
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
75
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
76
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
77
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
78
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
79
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
80
+ });
81
+
82
+ it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
83
+ textSelectionPage.steps.resetQuestionPreview();
84
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
85
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
86
+ textSelectionPage.steps.verifyPreviewScore(12, 15);
87
+ textSelectionPage.steps.switchToGradingView();
88
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
89
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
90
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
91
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
92
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
93
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
94
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
95
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
96
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
97
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
98
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
99
+ });
100
+
101
+ it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
102
+ textSelectionPage.steps.resetQuestionPreview();
103
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
104
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
105
+ textSelectionPage.steps.verifyPreviewScore(11, 15);
106
+ textSelectionPage.steps.switchToGradingView();
107
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
108
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
109
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
110
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
111
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
112
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
113
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
114
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
115
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
116
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
117
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
118
+ });
119
+
120
+ it('When the user attempts the question partially correct with all the responses correct as per the correct accordion but one response incomplete, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
121
+ textSelectionPage.steps.resetQuestionPreview();
122
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
123
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
124
+ textSelectionPage.steps.verifyPreviewScore(6, 15);
125
+ textSelectionPage.steps.switchToGradingView();
126
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
127
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
128
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
129
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
130
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
131
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
132
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
133
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
134
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
135
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
136
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
137
+ });
138
+
139
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with points of the alternative accordion as points from the alternative accordion are more than tha correct accordion and on switching to \'Grading\' view, green check-mark icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative accordion, a status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
140
+ textSelectionPage.steps.resetQuestionPreview();
141
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
142
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
143
+ textSelectionPage.steps.verifyPreviewScore(6, 15);
144
+ textSelectionPage.steps.switchToGradingView();
145
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
146
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[1]);
147
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
148
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
149
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
150
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
151
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
152
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
153
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
154
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
155
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
156
+ });
157
+
158
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with points of the correct accordion as points from the correct accordion are more than the alternative accordion and on switching to \'Grading\' view, green check-mark icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative tab, a status message should not be displayed and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
159
+ textSelectionPage.steps.resetQuestionPreview();
160
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
161
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
162
+ textSelectionPage.steps.verifyPreviewScore(7, 15);
163
+ textSelectionPage.steps.switchToGradingView();
164
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
165
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
166
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
167
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
168
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[4]);
169
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
170
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
171
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
172
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
173
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
174
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
175
+ });
176
+
177
+ it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with points of the correctly attempted response and on switching to \'Grading\' view, green check-mark icon should be besides the common response, no icon should be displayed beside unattempted response, \'Your answer is incorrect\' and correct answer section with all correct answers from the alternate accordion should be displayed', () => {
178
+ textSelectionPage.steps.resetQuestionPreview();
179
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
180
+ textSelectionPage.steps.verifyPreviewScore(4, 15);
181
+ textSelectionPage.steps.switchToGradingView();
182
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
183
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
184
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
185
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
186
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
187
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
188
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
189
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
190
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
191
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
192
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
193
+ });
194
+
195
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides incorrect response, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all alternate answers should be displayed', () => {
196
+ textSelectionPage.steps.resetQuestionPreview();
197
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[5]);
198
+ textSelectionPage.steps.verifyPreviewScore(0, 15);
199
+ textSelectionPage.steps.switchToGradingView();
200
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
201
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
202
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
203
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
204
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
205
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[5]);
206
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
207
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
208
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
209
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
210
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
211
+ });
212
+
213
+ it('Overachiever case: When the user attempts the question with more number of correct responses from the alternate tab than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternate tab answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, green check-mark icons should be displayed for the correct accordion response, red cross-mark icon should be displayed for the alternate tab responses, status message should not be displayed and correct answer container should be displayed with correct accordion answers for the responses marked incorrect', () => {
214
+ cy.log('Pre-step: Switching to Edit tab and allotting points to alternate tab such that the difference between the points is substantial and the points per response are in decimal')
215
+ textSelectionPage.steps.switchToEditTab();
216
+ textSelectionPage.steps.deleteAlternativeAnswerAccordion(0);
217
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['1.2', '2.2', '1.6']);
218
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
219
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
220
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[4]);
221
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[5]);
222
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['11.4', '1.2', '10.4']);
223
+ textSelectionPage.steps.switchToPreviewTab();
224
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
225
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
226
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[5]);
227
+ textSelectionPage.steps.verifyPreviewScore(10.4, 23);
228
+ textSelectionPage.steps.switchToGradingView();
229
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[0]);
230
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[1]);
231
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
232
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
233
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
234
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[5]);
235
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
236
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[3]);
237
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[4]);
238
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[5]);
239
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
240
+ });
241
+ });
242
+ });
@@ -0,0 +1,242 @@
1
+ import { textSelectionPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ import utilities from "../../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ const wordTextArray = ['Nature','nurtures', 'life', 'and', 'brings', 'endless', 'beauty.']
7
+
8
+ describe('Create item page - Text selection - Selection mode - Word: Partial different with alternative answers', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Question preview: Auto scored - Partial different weights with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
17
+ cy.barsPreLoaderWait();
18
+ textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
19
+ textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
20
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
21
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
22
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
23
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['6', '5', '4']);
24
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
25
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
26
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
27
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[4]);
28
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['3', '7', '5']);
29
+ textSelectionPage.steps.switchToPreviewTab();
30
+ });
31
+
32
+ it('When the user selects \'Grading view\' without attempting the question, status message should not be displayed and correct answer section should be displayed with correct answers of the correct accordion', () => {
33
+ textSelectionPage.steps.verifyPreviewScore(0, 15);
34
+ textSelectionPage.steps.switchToGradingView();
35
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
36
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
37
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
38
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
39
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
40
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
41
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
42
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
43
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
44
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
45
+ });
46
+
47
+ it('When the user attempts the question according to the correct accordion then user should be awarded with full points and on switching to \'Grading view\' correct icons should be displayed besides the correct attempted options from the correct accordion and a status message should not be displayed', () => {
48
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
49
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
50
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
51
+ textSelectionPage.steps.verifyPreviewScore(15, 15);
52
+ textSelectionPage.steps.switchToGradingView();
53
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
54
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
55
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
56
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
57
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
58
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
59
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
60
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
61
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
62
+ });
63
+
64
+ it('When the user attempts the question according to the alternate accordion then user should be awarded with full points and on switching to \'Grading view\' correct icons should be displayed besides the correct attempted options from the alternate accordion and a status message with text \'Your answer is correct\' and the correct answer section should not be displayed', () => {
65
+ textSelectionPage.steps.resetQuestionPreview();
66
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
67
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
68
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
69
+ textSelectionPage.steps.verifyPreviewScore(15, 15);
70
+ textSelectionPage.steps.switchToGradingView();
71
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
72
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
73
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
74
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
75
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
76
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
77
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
78
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
79
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
80
+ });
81
+
82
+ it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
83
+ textSelectionPage.steps.resetQuestionPreview();
84
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
85
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
86
+ textSelectionPage.steps.verifyPreviewScore(11, 15);
87
+ textSelectionPage.steps.switchToGradingView();
88
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
89
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
90
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
91
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
92
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
93
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
94
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
95
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
96
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
97
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
98
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
99
+ });
100
+
101
+ it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
102
+ textSelectionPage.steps.resetQuestionPreview();
103
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
104
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
105
+ textSelectionPage.steps.verifyPreviewScore(12, 15);
106
+ textSelectionPage.steps.switchToGradingView();
107
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
108
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
109
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
110
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
111
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
112
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
113
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
114
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
115
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
116
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
117
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
118
+ });
119
+
120
+ it('When the user attempts the question partially correct with all the responses correct as per the alternative accordion but one response incomplete, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
121
+ textSelectionPage.steps.resetQuestionPreview();
122
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
123
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
124
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
125
+ textSelectionPage.steps.switchToGradingView();
126
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
127
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
128
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
129
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
130
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
131
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
132
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
133
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
134
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
135
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
136
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
137
+ });
138
+
139
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with points of the alternative accordion as points from the alternative accordion are more than tha correct accordion and on switching to \'Grading\' view, green check-mark icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative accordion, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
140
+ textSelectionPage.steps.resetQuestionPreview();
141
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
142
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
143
+ textSelectionPage.steps.verifyPreviewScore(7, 15);
144
+ textSelectionPage.steps.switchToGradingView();
145
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
146
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[1]);
147
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
148
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
149
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
150
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
151
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
152
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
153
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
154
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
155
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
156
+ });
157
+
158
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with points of the correct accordion as points from the correct accordion are more than the alternative accordion and on switching to \'Grading\' view, green check-mark icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative tab, a status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
159
+ textSelectionPage.steps.resetQuestionPreview();
160
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
161
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
162
+ textSelectionPage.steps.verifyPreviewScore(6, 15);
163
+ textSelectionPage.steps.switchToGradingView();
164
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
165
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
166
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
167
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
168
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[4]);
169
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
170
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
171
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
172
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
173
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
174
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
175
+ });
176
+
177
+ it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with points from the accordion with maximum points alloted to the response and on switching to \'Grading\' view, green check-mark icon should be besides the common response, no icon should be displayed beside unattempted response, \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
178
+ textSelectionPage.steps.resetQuestionPreview();
179
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
180
+ textSelectionPage.steps.verifyPreviewScore(4, 15);
181
+ textSelectionPage.steps.switchToGradingView();
182
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
183
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
184
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
185
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
186
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
187
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
188
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
189
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
190
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
191
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
192
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
193
+ });
194
+
195
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides incorrect response, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
196
+ textSelectionPage.steps.resetQuestionPreview();
197
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[5]);
198
+ textSelectionPage.steps.verifyPreviewScore(0, 15);
199
+ textSelectionPage.steps.switchToGradingView();
200
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
201
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
202
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
203
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
204
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
205
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[5]);
206
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
207
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
208
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
209
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
210
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
211
+ });
212
+
213
+ it('Overachiever case: When the user attempts the question with more number of correct responses from the alternate tab than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternate tab answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, green check-mark icons should be displayed for the correct accordion response, red cross-mark icon should be displayed for the alternate tab responses, status message should not be displayed and correct answer container should be displayed with correct accordion answers for the responses marked incorrect', () => {
214
+ cy.log('Pre-step: Switching to Edit tab and allotting points to alternate tab such that the difference between the points is substantial and the points per response are in decimal')
215
+ textSelectionPage.steps.switchToEditTab();
216
+ textSelectionPage.steps.deleteAlternativeAnswerAccordion(0);
217
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['30.5', '4.5', '2.5']);
218
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
219
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
220
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[4]);
221
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[5]);
222
+ textSelectionPage.steps.addPartialDifferentWeightsPointsInSetPointsPopup(['11.5', '12.5', '13.5']);
223
+ textSelectionPage.steps.switchToPreviewTab();
224
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
225
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
226
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[5]);
227
+ textSelectionPage.steps.verifyPreviewScore(30.5, 37.5);
228
+ textSelectionPage.steps.switchToGradingView();
229
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
230
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
231
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
232
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
233
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[4]);
234
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[5]);
235
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
236
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
237
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
238
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
239
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
240
+ });
241
+ });
242
+ });