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,195 @@
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 sentenceTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water.', 'As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology.', 'Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.', 'Birds are creatures with feathers, beaks, and the ability to lay eggs.'];
7
+
8
+ describe('Create item page - Text selection - Selection mode - Sentence: Partial equal with alternative answers', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Question preview: Auto scored - Partial equal 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.setQuestionAndOptionsInEditTabForSentence();
19
+ textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
20
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[0]);
21
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[1]);
22
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[2]);
23
+ textSelectionPage.steps.allotPoints(15);
24
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
25
+ textSelectionPage.steps.allotPoints(15);
26
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[2]);
27
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[3]);
28
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[4]);
29
+ textSelectionPage.steps.switchToPreviewTab();
30
+ });
31
+
32
+ it('When the user selects \'Grading view\' without attempting the question, incorrect status message should 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(sentenceTextArray[0]);
36
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
37
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[2]);
38
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[3]);
39
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
40
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
41
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
42
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
43
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[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(sentenceTextArray[0]);
49
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[1]);
50
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[2]);
51
+ textSelectionPage.steps.verifyPreviewScore(15, 15);
52
+ textSelectionPage.steps.switchToGradingView();
53
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[0]);
54
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[1]);
55
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[2]);
56
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[3]);
57
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
58
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[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(sentenceTextArray[2]);
67
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[3]);
68
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[4]);
69
+ textSelectionPage.steps.verifyPreviewScore(15, 15);
70
+ textSelectionPage.steps.switchToGradingView();
71
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
72
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
73
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[2]);
74
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[3]);
75
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[4]);
76
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[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(sentenceTextArray[0]);
85
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[1]);
86
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
87
+ textSelectionPage.steps.switchToGradingView();
88
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[0]);
89
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[1]);
90
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[2]);
91
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[3]);
92
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
93
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[5]);
94
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
95
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
96
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
97
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[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(sentenceTextArray[3]);
104
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[4]);
105
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
106
+ textSelectionPage.steps.switchToGradingView();
107
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
108
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
109
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[2]);
110
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[3]);
111
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[4]);
112
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[5]);
113
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
114
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
115
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
116
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[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(sentenceTextArray[2]);
123
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[3]);
124
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
125
+ textSelectionPage.steps.switchToGradingView();
126
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
127
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
128
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[2]);
129
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[3]);
130
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
131
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[5]);
132
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
133
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
134
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
135
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[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 correctly attempted response 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(sentenceTextArray[1]);
142
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[2]);
143
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[3]);
144
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
145
+ textSelectionPage.steps.switchToGradingView();
146
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
147
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[1]);
148
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[2]);
149
+ textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[3]);
150
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
151
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[5]);
152
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
153
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
154
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
155
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[2]);
156
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
157
+ });
158
+
159
+ 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 correct accordion should be displayed', () => {
160
+ textSelectionPage.steps.resetQuestionPreview();
161
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[2]);
162
+ textSelectionPage.steps.verifyPreviewScore(5, 15);
163
+ textSelectionPage.steps.switchToGradingView();
164
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
165
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
166
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[2]);
167
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[3]);
168
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
169
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[5]);
170
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
171
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
172
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
173
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[2]);
174
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
175
+ });
176
+
177
+ 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', () => {
178
+ textSelectionPage.steps.resetQuestionPreview();
179
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[5]);
180
+ textSelectionPage.steps.verifyPreviewScore(0, 15);
181
+ textSelectionPage.steps.switchToGradingView();
182
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
183
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
184
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[2]);
185
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[3]);
186
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
187
+ textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[5]);
188
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
189
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
190
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
191
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[2]);
192
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
193
+ });
194
+ });
195
+ });
@@ -0,0 +1,224 @@
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 sentenceTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water.', 'As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology.', 'Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.', 'Birds are creatures with feathers, beaks, and the ability to lay eggs.'];
7
+
8
+ describe('Create item page - Text selection - Selection mode - Sentence: Partial equal with alternative answers', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
17
+ cy.barsPreLoaderWait();
18
+ textSelectionPage.steps.setQuestionAndOptionsInEditTabForSentence();
19
+ textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
20
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[0]);
21
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[1]);
22
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[2]);
23
+ textSelectionPage.steps.allotPoints(15);
24
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
25
+ textSelectionPage.steps.allotPoints(9);
26
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[2]);
27
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[3]);
28
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[4]);
29
+ textSelectionPage.steps.switchToPreviewTab();
30
+ });
31
+
32
+ it('When the user selects \'Grading view\' without attempting the question, incorrect status message should 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(sentenceTextArray[0]);
36
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
37
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[2]);
38
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[3]);
39
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
40
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
41
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
42
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
43
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[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(sentenceTextArray[0]);
49
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[1]);
50
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[2]);
51
+ textSelectionPage.steps.verifyPreviewScore(15, 15);
52
+ textSelectionPage.steps.switchToGradingView();
53
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[0]);
54
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[1]);
55
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[2]);
56
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[3]);
57
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
58
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[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 points of the alternate accordion(less than 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(sentenceTextArray[2]);
67
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[3]);
68
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[4]);
69
+ textSelectionPage.steps.verifyPreviewScore(9, 15);
70
+ textSelectionPage.steps.switchToGradingView();
71
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
72
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
73
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[2]);
74
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[3]);
75
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[4]);
76
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[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(sentenceTextArray[0]);
85
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[1]);
86
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
87
+ textSelectionPage.steps.switchToGradingView();
88
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[0]);
89
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[1]);
90
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[2]);
91
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[3]);
92
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
93
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[5]);
94
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
95
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
96
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
97
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[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(sentenceTextArray[3]);
104
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[4]);
105
+ textSelectionPage.steps.verifyPreviewScore(6, 15);
106
+ textSelectionPage.steps.switchToGradingView();
107
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
108
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
109
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[2]);
110
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[3]);
111
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[4]);
112
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[5]);
113
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
114
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
115
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
116
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[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(sentenceTextArray[2]);
123
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[3]);
124
+ textSelectionPage.steps.verifyPreviewScore(6, 15);
125
+ textSelectionPage.steps.switchToGradingView();
126
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
127
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
128
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[2]);
129
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[3]);
130
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
131
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[5]);
132
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
133
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
134
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
135
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[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 correctly attempted response 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(sentenceTextArray[1]);
142
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[2]);
143
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[3]);
144
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
145
+ textSelectionPage.steps.switchToGradingView();
146
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
147
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[1]);
148
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[2]);
149
+ textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[3]);
150
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
151
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[5]);
152
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
153
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
154
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
155
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[2]);
156
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
157
+ });
158
+
159
+ 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 correct accordion should be displayed', () => {
160
+ textSelectionPage.steps.resetQuestionPreview();
161
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[2]);
162
+ textSelectionPage.steps.verifyPreviewScore(5, 15);
163
+ textSelectionPage.steps.switchToGradingView();
164
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
165
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
166
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[2]);
167
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[3]);
168
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
169
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[5]);
170
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
171
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
172
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
173
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[2]);
174
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
175
+ });
176
+
177
+ 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', () => {
178
+ textSelectionPage.steps.resetQuestionPreview();
179
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[5]);
180
+ textSelectionPage.steps.verifyPreviewScore(0, 15);
181
+ textSelectionPage.steps.switchToGradingView();
182
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
183
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
184
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[2]);
185
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[3]);
186
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[4]);
187
+ textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[5]);
188
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
189
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
190
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
191
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[2]);
192
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
193
+ });
194
+
195
+ 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', () => {
196
+ 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')
197
+ textSelectionPage.steps.switchToEditTab();
198
+ textSelectionPage.steps.deleteAlternativeAnswerAccordion(0);
199
+ textSelectionPage.steps.allotPoints(23);
200
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
201
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[3]);
202
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[4]);
203
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[5]);
204
+ textSelectionPage.steps.allotPoints(5);
205
+ textSelectionPage.steps.switchToPreviewTab();
206
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[0]);
207
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[4]);
208
+ textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[5]);
209
+ textSelectionPage.steps.verifyPreviewScore(7.6667, 23);
210
+ textSelectionPage.steps.switchToGradingView();
211
+ textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[0]);
212
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
213
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[2]);
214
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[3]);
215
+ textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[4]);
216
+ textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[5]);
217
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
218
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
219
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
220
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[2]);
221
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
222
+ });
223
+ });
224
+ });
@@ -0,0 +1,161 @@
1
+ import { textSelectionPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ const wordTextArray = ['Nature','nurtures', 'life', 'and', 'brings', 'endless', 'beauty.']
4
+
5
+ describe('Create Item page - Text selection - Selection mode - Word: Preview tab Scoring Section - All or nothing scoring with alternate answer', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Question Preview: AutoScored - All or Nothing with alternate answer: When Alternate Answer points are more than Correct Answer points', () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
14
+ cy.barsPreLoaderWait();
15
+ textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
16
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
17
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
18
+ textSelectionPage.steps.allotPoints(12);
19
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
20
+ textSelectionPage.steps.allotPoints(20);
21
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
22
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
23
+ textSelectionPage.steps.switchToPreviewTab();
24
+ });
25
+
26
+ 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 should be displayed', () => {
27
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
28
+ textSelectionPage.steps.switchToGradingView();
29
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
30
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
31
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
32
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
33
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
34
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
35
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
36
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
37
+ });
38
+
39
+ it('When the user attempts the question according to the correct accordion then user should be awarded with 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 with text \'Your answer is correct\' should be displayed and the correct answer section should not be displayed', () => {
40
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
41
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
42
+ textSelectionPage.steps.verifyPreviewScore(12, 20);
43
+ textSelectionPage.steps.switchToGradingView();
44
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
45
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
46
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[2]);
47
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
48
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
49
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
50
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
51
+ });
52
+
53
+ 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\' should be displayed', () => {
54
+ textSelectionPage.steps.resetQuestionPreview();
55
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
56
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
57
+ textSelectionPage.steps.verifyPreviewScore(20, 20);
58
+ textSelectionPage.steps.switchToGradingView();
59
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[0]);
60
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
61
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
62
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
63
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
64
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
65
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
66
+ });
67
+
68
+ it('When the user attempts the question partially correct exclusively according to the correct accordion then 0 points should be awarded and on switching to \'Grading view\' correct icons should be displayed beside the correct options from the correct accordion and a status message with text \'Your answer is incorrect\' and the correct answer section with alternate accordion answers should be displayed', () => {
69
+ textSelectionPage.steps.resetQuestionPreview();
70
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
71
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
72
+ textSelectionPage.steps.switchToGradingView();
73
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
74
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
75
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[2]);
76
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
77
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
78
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
79
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
80
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
81
+ });
82
+
83
+ it('When the user attempts the question partially correct exclusively according to the alternate accordion then 0 points should be awarded and on switching to \'Grading view\' correct icons should be displayed beside the correct options from the alternate accordion and a status message with text \'Your answer is incorrect\' and the correct answer section with alternate accordion answers should be displayed', () => {
84
+ textSelectionPage.steps.resetQuestionPreview();
85
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
86
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
87
+ textSelectionPage.steps.switchToGradingView();
88
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
89
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
90
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
91
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
92
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
93
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
94
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
95
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
96
+ });
97
+
98
+ it('When the user attempts the question partially correct with equal number of options form the correct and alternate accordion then user should be awarded with 0 points and on switching to the \'Grading view\' the correct icons should be displayed beside the correct options from the alternate accordion, incorrect icons should be displayed beside the options from the correct accordion and a status message with text \'Your answer is incorrect\' and the correct answer section with alternate accordion answers should be displayed', () => {
99
+ textSelectionPage.steps.resetQuestionPreview();
100
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
101
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
102
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
103
+ textSelectionPage.steps.switchToGradingView();
104
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[0]);
105
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
106
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
107
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
108
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
109
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
110
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
111
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
112
+ });
113
+
114
+ it('Race condition 1: When the user attempts the question with the common option between correct accordion and alternate accordion then user should be awarded with 0 points and on switching to the \'Grading view\' the correct icon should be displayed beside the common option and correct accordion options and a status message with text \'Your answer is incorrect\' and the correct answer section with alternate accordion answers should be displayed', () => {
115
+ textSelectionPage.steps.resetQuestionPreview();
116
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
117
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
118
+ textSelectionPage.steps.switchToGradingView();
119
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
120
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
121
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[2]);
122
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
123
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
124
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
125
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
126
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
127
+ });
128
+
129
+ it('Race condition 2: When the user attempts the question with the all correct option from correct accordion and alternate accordion then user should be awarded with 0 points and on switching to the \'Grading view\' the correct icon should be displayed for the options of the alternate accordion and incorrect icon should be displayed beside the correct accordion option, a status message with text \'Your answer is incorrect\' and the correct answer section with alternate accordion answers should be displayed', () => {
130
+ textSelectionPage.steps.resetQuestionPreview();
131
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
132
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
133
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
134
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
135
+ textSelectionPage.steps.switchToGradingView();
136
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[0]);
137
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
138
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
139
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
140
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
141
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
142
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
143
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
144
+ });
145
+
146
+ it('When user attempts the question incorrectly then on switching to \'Grading view\', the user should be awarded 0 points and incorrect icons should be beside incorrect attempted option a status message with text \'Your answer is incorrect\' and the correct answer section with alternate accordion answers should be displayed', () => {
147
+ textSelectionPage.steps.resetQuestionPreview();
148
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
149
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
150
+ textSelectionPage.steps.switchToGradingView();
151
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
152
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
153
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[2]);
154
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[3]);
155
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
156
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
157
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
158
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
159
+ });
160
+ });
161
+ });