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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/additionalSettingsBasic.js +1 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -3
  3. package/cypress/e2e/ILC/AudioResponseNew/headerSection.js +1 -1
  4. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -2
  5. package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +1 -1
  6. package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -2
  7. package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +1 -2
  8. package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +1 -1
  9. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/allOrNothingScoringForAllViews.smoke.js +1 -1
  10. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +2 -3
  11. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/previewContentsForAllViews.smoke.js +1 -1
  12. package/cypress/e2e/ILC/ChartsBar/chartFunctionalitySpecifyCorrectAnswerSection.js +2 -2
  13. package/cypress/e2e/ILC/ChartsBar/gradingViewAndCorrectAnswerView.smoke.js +3 -4
  14. package/cypress/e2e/ILC/ChartsBar/headerSection.js +2 -2
  15. package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +1 -1
  16. package/cypress/e2e/ILC/ChartsBar/selectChartTypeSection.js +8 -8
  17. package/cypress/e2e/ILC/ChartsBar/studentViewSettings.js +0 -1
  18. package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +1 -1
  19. package/cypress/e2e/ILC/ChartsLine/chartFunctionalitySpecifyCorrectAnswerSection.js +2 -2
  20. package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +2 -3
  21. package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +1 -1
  22. package/cypress/e2e/ILC/Compass/compassPreviewContent.smoke.js +1 -1
  23. package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +1 -1
  24. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +1 -1
  25. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/previewContentsForAllViews.smoke.js +1 -2
  26. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +3 -5
  27. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -6
  28. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePageHeaderSection.js +1 -1
  29. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +2 -4
  30. package/cypress/e2e/ILC/EssayResponse/additionalSettings.js +4 -4
  31. package/cypress/e2e/ILC/EssayResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -3
  32. package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +1 -1
  33. package/cypress/e2e/ILC/EssayResponseBasic/previewContentsForAllViews.smoke.js +1 -1
  34. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +1 -1
  35. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +1 -1
  37. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +1 -1
  38. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +75 -0
  39. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAlternateAnswerPopup.js +162 -0
  40. package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +0 -2
  41. package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +1 -1
  42. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +2 -2
  43. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialDifferentWeightsBasic.js +1 -1
  44. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +2 -2
  45. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  46. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +1 -1
  47. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +1 -1
  48. package/cypress/e2e/ILC/MatchingDropdown/editTabBasicSection.js +1 -1
  49. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +1 -1
  50. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
  51. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
  52. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +8 -8
  53. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -8
  54. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +8 -8
  55. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
  56. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +8 -8
  57. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -8
  58. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +8 -8
  59. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +9 -9
  60. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +6 -6
  61. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
  62. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +4 -4
  63. package/cypress/e2e/ILC/TextEntryMath/customSettings.js +1373 -0
  64. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +4 -4
  65. package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingAlternatePointsMoreThanCorrectPoints.js +161 -0
  66. package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingCorrectPointsEqualToAlternatePoints.js +162 -0
  67. package/cypress/e2e/ILC/TextSelection/ScoringSentence/allOrNothingCorrectPointsMoreThanAlternatePoints.js +161 -0
  68. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsBasic.js +420 -0
  69. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +242 -0
  70. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +242 -0
  71. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +242 -0
  72. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsBasic.js +130 -0
  73. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
  74. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +195 -0
  75. package/cypress/e2e/ILC/TextSelection/ScoringSentence/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
  76. package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingAlternatePointsMoreThanCorrectPoints.js +161 -0
  77. package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingCorrectPointsEqualToAlternatePoints.js +162 -0
  78. package/cypress/e2e/ILC/TextSelection/ScoringWord/allOrNothingCorrectPointsMoreThanAlternatePoints.js +161 -0
  79. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsBasic.js +420 -0
  80. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +242 -0
  81. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +242 -0
  82. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +242 -0
  83. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsBasic.js +130 -0
  84. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +225 -0
  85. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
  86. package/cypress/e2e/ILC/TextSelection/ScoringWord/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +225 -0
  87. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +1 -1
  88. package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +2 -3
  89. package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +2 -2
  90. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  91. package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +2 -2
  92. package/cypress/e2e/ILC/chartsDotsPlot/specifyCorrectAnswerSection.js +2 -2
  93. package/cypress/pages/audioResponsePage.js +0 -10
  94. package/cypress/pages/chartsBarPage.js +0 -13
  95. package/cypress/pages/chartsDotPlotPage.js +4 -85
  96. package/cypress/pages/chartsLinePage.js +2 -2
  97. package/cypress/pages/components/allowTeachersToDownloadStudentResponseComponent.js +1 -0
  98. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +11 -30
  99. package/cypress/pages/components/barAndLineChartComponent.js +0 -10
  100. package/cypress/pages/components/chartsCommonComponent.js +1 -25
  101. package/cypress/pages/components/colorPopupComponent.js +0 -31
  102. package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +0 -1
  103. package/cypress/pages/components/createQuestionBasePage.js +2 -8
  104. package/cypress/pages/components/customizeSpecialCharacterComponent.js +1 -1
  105. package/cypress/pages/components/draggableOptionContainer.js +1 -1
  106. package/cypress/pages/components/equationEditorFlyout.js +0 -36
  107. package/cypress/pages/components/essayResponseCommonComponents.js +2 -2
  108. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +2 -15
  109. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +1 -2
  110. package/cypress/pages/components/gridQuestionCommonComponent.js +26 -34
  111. package/cypress/pages/components/imageCanvasComponent.js +7 -9
  112. package/cypress/pages/components/index.js +0 -1
  113. package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +0 -12
  114. package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -1
  115. package/cypress/pages/components/optionsWrapperComponent.js +3 -3
  116. package/cypress/pages/components/scoringSectionBaseEditTab.js +2 -2
  117. package/cypress/pages/contentBlocksPage.js +1 -1
  118. package/cypress/pages/createItemPage.js +7 -6
  119. package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -41
  120. package/cypress/pages/essayResponsePage.js +0 -1
  121. package/cypress/pages/feedbackScalePage.js +0 -1
  122. package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
  123. package/cypress/pages/fillInTheGapsDropdownPage.js +79 -0
  124. package/cypress/pages/graphingPage.js +0 -1
  125. package/cypress/pages/gridFillPage.js +45 -112
  126. package/cypress/pages/imageHighlightPage.js +0 -10
  127. package/cypress/pages/itemPreviewSettingsPage.js +1 -4
  128. package/cypress/pages/listOrderingPage.js +0 -10
  129. package/cypress/pages/matchingPage.js +5 -142
  130. package/cypress/pages/multipleSelectionPage.js +0 -13
  131. package/cypress/pages/numberLineLabelPage.js +1 -1
  132. package/cypress/pages/numberLinePage.js +1 -1
  133. package/cypress/pages/protractorPage.js +1 -3
  134. package/cypress/pages/shortTextResponsePage.js +1 -3
  135. package/cypress/pages/simpleCalculatorPage.js +2 -2
  136. package/cypress/pages/singleSelectionPage.js +0 -10
  137. package/cypress/pages/textEntryMathPage.js +1 -8
  138. package/cypress/pages/textEntryMathWithImagePage.js +16 -38
  139. package/cypress/pages/textSelectionPage.js +34 -43
  140. package/cypress/pages/videoResponsePage.js +0 -5
  141. package/package.json +1 -1
  142. package/cypress/pages/components/customizeHighlightPropertiesComponent.js +0 -318
  143. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/basicScoringForAllTextSelectionTypes.smoke.js +0 -0
  144. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/manuallyAndNonScored.js +0 -0
  145. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringGeneric}/singleSelectionPreviewScoring.js +0 -0
  146. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -0
  147. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -0
  148. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -0
  149. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsBasic.js +0 -0
  150. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
  151. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
  152. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
  153. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsBasic.js +0 -0
  154. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -0
  155. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -0
  156. /package/cypress/e2e/ILC/TextSelection/{Scoring → ScoringParagraph}/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -0
@@ -0,0 +1,162 @@
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 Correct Answer points are equal to Alternate 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(20);
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 correct 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[0]);
35
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
36
+ cy.log('Post step: Unchecking the show correct answer checkbox')
37
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
38
+ });
39
+
40
+ 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 with text \'Your answer is correct\' should be displayed', () => {
41
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
42
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
43
+ textSelectionPage.steps.verifyPreviewScore(20, 20);
44
+ textSelectionPage.steps.switchToGradingView();
45
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
46
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
47
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[2]);
48
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
49
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
50
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
51
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
52
+ });
53
+
54
+ 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', () => {
55
+ textSelectionPage.steps.resetQuestionPreview();
56
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
57
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
58
+ textSelectionPage.steps.verifyPreviewScore(20, 20);
59
+ textSelectionPage.steps.switchToGradingView();
60
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[0]);
61
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
62
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
63
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
64
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
65
+ textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
66
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
67
+ });
68
+
69
+ 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 should not be displayed', () => {
70
+ textSelectionPage.steps.resetQuestionPreview();
71
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
72
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
73
+ textSelectionPage.steps.switchToGradingView();
74
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
75
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
76
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[2]);
77
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
78
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
79
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
80
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
81
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
82
+ });
83
+
84
+ 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 attempted correct options and a status message with text \'Your answer is incorrect\' and the correct answer section with correct accordion answers should be displayed', () => {
85
+ textSelectionPage.steps.resetQuestionPreview();
86
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
87
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
88
+ textSelectionPage.steps.switchToGradingView();
89
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
90
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
91
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[2]);
92
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
93
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
94
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
95
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
96
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
97
+ });
98
+
99
+ 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 correct accordion, incorrect icons should be displayed beside the options from the alternate accordion and a status message with text \'Your answer is incorrect\' and the correct answer section with correct accordion answers should be displayed', () => {
100
+ textSelectionPage.steps.resetQuestionPreview();
101
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
102
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
103
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
104
+ textSelectionPage.steps.switchToGradingView();
105
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
106
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
107
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[2]);
108
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
109
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
110
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
111
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
112
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
113
+ });
114
+
115
+ 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 correct accordion answers should be displayed', () => {
116
+ textSelectionPage.steps.resetQuestionPreview();
117
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
118
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
119
+ textSelectionPage.steps.switchToGradingView();
120
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
121
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
122
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[2]);
123
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
124
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
125
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
126
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
127
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
128
+ });
129
+
130
+ 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 correct accordion and incorrect icon should be displayed beside the alternate accordion option, a status message with text \'Your answer is incorrect\' and the correct answer section with correct accordion answers should be displayed', () => {
131
+ textSelectionPage.steps.resetQuestionPreview();
132
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
133
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
134
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
135
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
136
+ textSelectionPage.steps.switchToGradingView();
137
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
138
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
139
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[2]);
140
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
141
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
142
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
143
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
144
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
145
+ });
146
+
147
+ 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 correct accordion answers should be displayed', () => {
148
+ textSelectionPage.steps.resetQuestionPreview();
149
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
150
+ textSelectionPage.steps.verifyPreviewScore(0, 20);
151
+ textSelectionPage.steps.switchToGradingView();
152
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
153
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
154
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[2]);
155
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[3]);
156
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
157
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
158
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
159
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
160
+ });
161
+ });
162
+ });
@@ -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 Correct Answer points are more than Alternate 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(20);
19
+ textSelectionPage.steps.addAlternativeAnswerAccordion(1);
20
+ textSelectionPage.steps.allotPoints(12);
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 correct 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[0]);
35
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
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 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', () => {
40
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
41
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
42
+ textSelectionPage.steps.verifyPreviewScore(20, 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 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', () => {
54
+ textSelectionPage.steps.resetQuestionPreview();
55
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
56
+ textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
57
+ textSelectionPage.steps.verifyPreviewScore(12, 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 correct 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[0]);
79
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
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 correct accordion and a status message with text \'Your answer is incorrect\' and the correct answer section with correct 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[0]);
94
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
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 correct accordion, incorrect icons should be displayed beside the options from the alternate accordion and a status message with text \'Your answer is incorrect\' and the correct answer section with correct 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.verifyCorrectIconForOption(wordTextArray[0]);
105
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
106
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[2]);
107
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
108
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
109
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
110
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
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 correct 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[0]);
125
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
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 correct accordion and incorrect icon should be displayed beside the alternate accordion option, a status message with text \'Your answer is incorrect\' and the correct answer section with correct 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.verifyCorrectIconForOption(wordTextArray[0]);
137
+ textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
138
+ textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[2]);
139
+ textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
140
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
141
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
142
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
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 correct 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[0]);
157
+ textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
158
+ textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
159
+ });
160
+ });
161
+ });