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,196 @@
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
+
7
+ const wordTextArray = ['Nature','nurtures', 'life', 'and', 'brings', 'endless', 'beauty.']
8
+
9
+ describe('Create item page - Text selection - Selection mode - Word: Partial equal with alternative answers', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
15
+ abortEarlySetup();
16
+ before(() => {
17
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
18
+ cy.barsPreLoaderWait();
19
+ textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
20
+ textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
21
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
22
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
23
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
24
+ textSelectionPage.steps.allotPoints(15);
25
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
26
+ textSelectionPage.steps.allotPoints(15);
27
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
28
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
29
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[4]);
30
+ textSelectionPage.steps.switchToPreviewTab();
31
+ });
32
+
33
+ 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', () => {
34
+ textSelectionPage.steps.verifyPreviewScore(0, 15);
35
+ textSelectionPage.steps.switchToGradingView();
36
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
37
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
38
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
39
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
40
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
41
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
42
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
43
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
44
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
45
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
46
+ });
47
+
48
+ 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', () => {
49
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
50
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
51
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
52
+ textSelectionPage.steps.verifyPreviewScore(15, 15);
53
+ textSelectionPage.steps.switchToGradingView();
54
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
55
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
56
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
57
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
58
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
59
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
60
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
61
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
62
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
63
+ });
64
+
65
+ 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', () => {
66
+ textSelectionPage.steps.resetQuestionPreview();
67
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
68
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
69
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
70
+ textSelectionPage.steps.verifyPreviewScore(15, 15);
71
+ textSelectionPage.steps.switchToGradingView();
72
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
73
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
74
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
75
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
76
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
77
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
78
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
79
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
80
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
81
+ });
82
+
83
+ 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', () => {
84
+ textSelectionPage.steps.resetQuestionPreview();
85
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
86
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
87
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
88
+ textSelectionPage.steps.switchToGradingView();
89
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
90
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
91
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
92
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
93
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
94
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
95
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
96
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
97
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
98
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
99
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
100
+ });
101
+
102
+ 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', () => {
103
+ textSelectionPage.steps.resetQuestionPreview();
104
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
105
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
106
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
107
+ textSelectionPage.steps.switchToGradingView();
108
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
109
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
110
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
111
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
112
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
113
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
114
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
115
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
116
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
117
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
118
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
119
+ });
120
+
121
+ 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', () => {
122
+ textSelectionPage.steps.resetQuestionPreview();
123
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
124
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
125
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
126
+ textSelectionPage.steps.switchToGradingView();
127
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
128
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
129
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
130
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
131
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
132
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
133
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
134
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
135
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
136
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
137
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
138
+ });
139
+
140
+ 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', () => {
141
+ textSelectionPage.steps.resetQuestionPreview();
142
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
143
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
144
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
145
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
146
+ textSelectionPage.steps.switchToGradingView();
147
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
148
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
149
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
150
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[3]);
151
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
152
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
153
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
154
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
155
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
156
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
157
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
158
+ });
159
+
160
+ 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', () => {
161
+ textSelectionPage.steps.resetQuestionPreview();
162
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
163
+ textSelectionPage.steps.verifyPreviewScore(5, 15);
164
+ textSelectionPage.steps.switchToGradingView();
165
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
166
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
167
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
168
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
169
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
170
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
171
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
172
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
173
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
174
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
175
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
176
+ });
177
+
178
+ 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', () => {
179
+ textSelectionPage.steps.resetQuestionPreview();
180
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[5]);
181
+ textSelectionPage.steps.verifyPreviewScore(0, 15);
182
+ textSelectionPage.steps.switchToGradingView();
183
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
184
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
185
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
186
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
187
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
188
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[5]);
189
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
190
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
191
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
192
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
193
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
194
+ });
195
+ });
196
+ });
@@ -0,0 +1,225 @@
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
+
7
+ const wordTextArray = ['Nature','nurtures', 'life', 'and', 'brings', 'endless', 'beauty.']
8
+
9
+ describe('Create item page - Text selection - Selection mode - Word: Partial equal with alternative answers', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
15
+ abortEarlySetup();
16
+ before(() => {
17
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
18
+ cy.barsPreLoaderWait();
19
+ textSelectionPage.steps.setQuestionAndOptionsInEditTabForWord();
20
+ textSelectionPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
21
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
22
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
23
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
24
+ textSelectionPage.steps.allotPoints(15);
25
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
26
+ textSelectionPage.steps.allotPoints(9);
27
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[2]);
28
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
29
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[4]);
30
+ textSelectionPage.steps.switchToPreviewTab();
31
+ });
32
+
33
+ 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', () => {
34
+ textSelectionPage.steps.verifyPreviewScore(0, 15);
35
+ textSelectionPage.steps.switchToGradingView();
36
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
37
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
38
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
39
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
40
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
41
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
42
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
43
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
44
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
45
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
46
+ });
47
+
48
+ 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', () => {
49
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
50
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
51
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
52
+ textSelectionPage.steps.verifyPreviewScore(15, 15);
53
+ textSelectionPage.steps.switchToGradingView();
54
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
55
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
56
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
57
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
58
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
59
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
60
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
61
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
62
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
63
+ });
64
+
65
+ 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', () => {
66
+ textSelectionPage.steps.resetQuestionPreview();
67
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
68
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
69
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
70
+ textSelectionPage.steps.verifyPreviewScore(9, 15);
71
+ textSelectionPage.steps.switchToGradingView();
72
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
73
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
74
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
75
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
76
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
77
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
78
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
79
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
80
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
81
+ });
82
+
83
+ 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', () => {
84
+ textSelectionPage.steps.resetQuestionPreview();
85
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
86
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
87
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
88
+ textSelectionPage.steps.switchToGradingView();
89
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
90
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
91
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
92
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
93
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
94
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
95
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
96
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
97
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
98
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
99
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
100
+ });
101
+
102
+ 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', () => {
103
+ textSelectionPage.steps.resetQuestionPreview();
104
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
105
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
106
+ textSelectionPage.steps.verifyPreviewScore(6, 15);
107
+ textSelectionPage.steps.switchToGradingView();
108
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
109
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
110
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
111
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
112
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[4]);
113
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
114
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
115
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
116
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
117
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
118
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
119
+ });
120
+
121
+ 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', () => {
122
+ textSelectionPage.steps.resetQuestionPreview();
123
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
124
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
125
+ textSelectionPage.steps.verifyPreviewScore(6, 15);
126
+ textSelectionPage.steps.switchToGradingView();
127
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
128
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
129
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
130
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[3]);
131
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
132
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
133
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
134
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
135
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
136
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
137
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
138
+ });
139
+
140
+ 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', () => {
141
+ textSelectionPage.steps.resetQuestionPreview();
142
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
143
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
144
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
145
+ textSelectionPage.steps.verifyPreviewScore(10, 15);
146
+ textSelectionPage.steps.switchToGradingView();
147
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
148
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
149
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
150
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[3]);
151
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
152
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
153
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
154
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
155
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
156
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
157
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
158
+ });
159
+
160
+ 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', () => {
161
+ textSelectionPage.steps.resetQuestionPreview();
162
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
163
+ textSelectionPage.steps.verifyPreviewScore(5, 15);
164
+ textSelectionPage.steps.switchToGradingView();
165
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
166
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
167
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
168
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
169
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
170
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[5]);
171
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
172
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
173
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
174
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
175
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
176
+ });
177
+
178
+ 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', () => {
179
+ textSelectionPage.steps.resetQuestionPreview();
180
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[5]);
181
+ textSelectionPage.steps.verifyPreviewScore(0, 15);
182
+ textSelectionPage.steps.switchToGradingView();
183
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
184
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
185
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
186
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
187
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[4]);
188
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[5]);
189
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
190
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
191
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
192
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
193
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
194
+ });
195
+
196
+ 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', () => {
197
+ 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')
198
+ textSelectionPage.steps.switchToEditTab();
199
+ textSelectionPage.steps.deleteAlternativeAnswerAccordion(0);
200
+ textSelectionPage.steps.allotPoints(23);
201
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
202
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[3]);
203
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[4]);
204
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[5]);
205
+ textSelectionPage.steps.allotPoints(5);
206
+ textSelectionPage.steps.switchToPreviewTab();
207
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
208
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[4]);
209
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[5]);
210
+ textSelectionPage.steps.verifyPreviewScore(7.6667, 23);
211
+ textSelectionPage.steps.switchToGradingView();
212
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
213
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
214
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[2]);
215
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[3]);
216
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[4]);
217
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[5]);
218
+ textSelectionPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
219
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
220
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
221
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[2]);
222
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
223
+ });
224
+ });
225
+ });
@@ -4,7 +4,7 @@ import utilities from "../../../support/helpers/utilities";
4
4
  const grepTags = Cypress.env('grepTags');
5
5
  let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
6
6
  const views = utilities.getViews(correctAnswerViews);
7
- var itemReferenceID = "";
7
+ let itemReferenceID = "";
8
8
  const css = Cypress.env('css');
9
9
 
10
10
  describe('Create Item page - Charts - Dot: All or nothing ', () => {
@@ -1,10 +1,9 @@
1
- import { chartsDotPlotPage, correctAnswerViewPage, itemPreviewPage, studentViewPage } from "../../../pages";
2
- import { gradingViewPage } from "../../../pages";
1
+ import { chartsDotPlotPage, correctAnswerViewPage, itemPreviewPage, studentViewPage, gradingViewPage } from "../../../pages";
3
2
  import abortEarlySetup from "../../../support/helpers/abortEarly";
4
3
  import utilities from "../../../support/helpers/utilities";
5
4
  let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view'];
6
5
  const views = utilities.getViews(gradingAndCorrectAnsView);
7
- var itemReferenceID = "";
6
+ let itemReferenceID = "";
8
7
  const css = Cypress.env('css');
9
8
 
10
9
  describe('Create item page - Dot plot charts : Grading view, Correct answer view contents', () => {
@@ -358,7 +358,7 @@ describe('Create item page: Charts - Dot - Preview contents in all views', () =>
358
358
  });
359
359
 
360
360
  it(`When the user reaches the initial state by performing undo actions, the \'Undo\' button should get disabled`, () => {
361
- for (var i = 0; i < 3; i++) {
361
+ for (let i = 0; i < 3; i++) {
362
362
  chartsDotPlotPage.steps.selectControlOptionPreviewTab(controlOptions[0]);
363
363
  }
364
364
  chartsDotPlotPage.steps.verifyDotCountPreviewTab(1, { point: 2, min: 1, interval: 0.25 });
@@ -367,7 +367,7 @@ describe('Create item page: Charts - Dot - Preview contents in all views', () =>
367
367
  });
368
368
 
369
369
  it('When the user reaches the latest state by performing redo actions, the \'Redo\' button should get disabled and error message should disappear', () => {
370
- for (var i = 0; i < 3; i++) {
370
+ for (let i = 0; i < 3; i++) {
371
371
  chartsDotPlotPage.steps.selectControlOptionPreviewTab(controlOptions[1]);
372
372
  }
373
373
  chartsDotPlotPage.steps.verifyDotCountPreviewTab(4, { point: 2, min: 1, interval: 0.25 });
@@ -21,7 +21,7 @@ describe('Create item page - Charts - Dot plot: Partial different with alternati
21
21
  //locked column
22
22
  chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(1, { point: 1, min: 1, interval: 1, defaultDots: 0 });
23
23
  chartsDotPlotPage.steps.lockDotColumn({ point: 1, min: 1, interval: 1 });
24
- chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });;
24
+ chartsDotPlotPage.steps.plotDotsInDotColumnSelectChartTypeSection(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
25
25
  chartsDotPlotPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
26
26
  chartsDotPlotPage.steps.allotPartialDifferentWeightsPoints({ 0: 3, 1: 4, 2: 5, 3: 2, 4: 3, 5: 3 });
27
27
  chartsDotPlotPage.steps.plotDotsInDotColumnSpecifyCorrectAnswer(2, { point: 2, min: 1, interval: 1, defaultDots: 0 });
@@ -111,7 +111,7 @@ describe('Charts - Dot plot: Select chart type section', () => {
111
111
  });
112
112
 
113
113
  it(`When the user reaches the initial state by performing undo actions, the \'Undo\' button should get disabled and \'Redo\' should be enabled`, () => {
114
- for (var i = 0; i < 4; i++) {
114
+ for (let i = 0; i < 4; i++) {
115
115
  chartsDotPlotPage.steps.selectControlOptionSelectChartTypeSection('Undo');
116
116
  }
117
117
  chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(0, { point: 2, min: -3, interval: 0.25 });
@@ -120,7 +120,7 @@ describe('Charts - Dot plot: Select chart type section', () => {
120
120
  });
121
121
 
122
122
  it('When the user reaches the latest state by performing redo actions, the \'Redo\' button should get disabled and \'Undo\' should be enabled', () => {
123
- for (var i = 0; i < 4; i++) {
123
+ for (let i = 0; i < 4; i++) {
124
124
  chartsDotPlotPage.steps.selectControlOptionSelectChartTypeSection('Redo');
125
125
  }
126
126
  chartsDotPlotPage.steps.verifyDotCountSelectChartTypeSection(4, { point: 2, min: -3, interval: 0.25 });
@@ -188,7 +188,7 @@ describe('Create Item page - Charts - Dot plot: Specify correct answer, Alternat
188
188
  });
189
189
 
190
190
  it(`When the user reaches the initial state by performing undo actions, the \'Undo\' button should get disabled and \'Redo\' should be enabled`, () => {
191
- for (var i = 0; i < 4; i++) {
191
+ for (let i = 0; i < 4; i++) {
192
192
  chartsDotPlotPage.steps.selectControlOptionSpecifyCorrectAnswer('Undo');
193
193
  }
194
194
  chartsDotPlotPage.steps.verifyDotCountSpecifyCorrectAnswer(0, { point: 2, min: 1, interval: 0.25 });
@@ -197,7 +197,7 @@ describe('Create Item page - Charts - Dot plot: Specify correct answer, Alternat
197
197
  });
198
198
 
199
199
  it('When the user reaches the latest state by performing redo actions, the \'Redo\' button should get disabled and \'Undo\' should be enabled', () => {
200
- for (var i = 0; i < 4; i++) {
200
+ for (let i = 0; i < 4; i++) {
201
201
  chartsDotPlotPage.steps.selectControlOptionSpecifyCorrectAnswer('Redo');
202
202
  }
203
203
  chartsDotPlotPage.steps.verifyDotCountSpecifyCorrectAnswer(4, { point: 2, min: 1, interval: 0.25 });
@@ -308,11 +308,6 @@ const steps = {
308
308
  .click();
309
309
  },
310
310
 
311
- stopRecordingCompactPreview: () => {
312
- audioResponsePage.compactPreviewStopRecordingButton()
313
- .click();
314
- },
315
-
316
311
  waitForRecordingToStartCompactPreview: () => {
317
312
  audioResponsePage.compactPreviewRecordingTimer()
318
313
  .should('contain', '00:01 /')
@@ -618,11 +613,6 @@ const steps = {
618
613
  .should('have.class', 'ngie-toggle-button-selected');
619
614
  },
620
615
 
621
- verifyAudioIndicatorsAudioWaveButtonSelectedState: () => {
622
- audioResponsePage.audioIndicatorsAudioWaveButton()
623
- .should('have.class', 'ngie-toggle-button-selected');
624
- },
625
-
626
616
  verifyAudioIndicatorsVolumeMeterButtonSelectedState: () => {
627
617
  audioResponsePage.audioIndicatorsVolumeMeterButton()
628
618
  .should('have.class', 'ngie-toggle-button-selected');
@@ -312,19 +312,6 @@ const steps = {
312
312
  .type('{upArrow}');
313
313
  },
314
314
 
315
- /**
316
- * Verify the bar height
317
- * @param {Object} barProperties - The properties of the bar
318
- * @param {number} barProperties.barIndex index of the bar
319
- * @param {number} barProperties.barValue Height of the bar as per the axis
320
- * @param {number} barProperties.range Maximum value of the axis on which bar value is determined
321
- */
322
- verifyBarHeightInSpecifyCorrectAnswer: ({ barIndex, barValue, range }) => {
323
- let barHeight = barValue / range
324
- utilities.getNthElement(chartsBarPage.specifyCorrectAnswerBar(), barIndex)
325
- .should('have.attr', 'height', barHeight);
326
- },
327
-
328
315
  /**
329
316
  * @description Lock the bar in select chart type section chart
330
317
  * @param {number} barIndex Index of the bar to be locked