itemengine-cypress-automation 1.0.184-e2e-execution-crash-3b9d0d0.0 → 1.0.185-repoUpdate26April-b17eb46.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +79 -0
  2. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +345 -0
  3. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +429 -0
  4. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
  5. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +489 -0
  6. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +313 -0
  7. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
  8. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  9. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  11. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +5 -8
  12. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +417 -28
  13. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  14. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  25. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  26. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
  27. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
  29. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  30. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  31. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  32. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  33. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  34. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  35. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  36. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +11 -3
  37. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  38. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  39. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +230 -0
  40. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  41. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +201 -0
  42. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
  43. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
  44. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +251 -0
  45. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  46. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +128 -0
  47. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +279 -0
  48. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +109 -0
  49. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +278 -0
  50. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +278 -0
  51. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +335 -0
  52. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +250 -0
  53. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +161 -0
  54. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +216 -0
  55. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +252 -0
  56. package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +118 -0
  57. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
  58. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  59. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +155 -0
  60. package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +195 -0
  61. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +78 -0
  62. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  63. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
  64. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +112 -0
  65. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +244 -0
  66. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  67. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
  68. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  69. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +181 -0
  70. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  71. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +57 -1
  72. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +33 -0
  73. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +46 -0
  74. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  75. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  76. package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
  77. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +696 -0
  78. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +173 -0
  79. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +183 -0
  80. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +73 -0
  81. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +204 -0
  82. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +288 -0
  83. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +153 -0
  84. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +164 -0
  85. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +120 -0
  86. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  87. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
  88. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  89. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  90. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  91. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
  92. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
  93. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
  94. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
  95. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
  96. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
  97. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +1 -2
  98. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
  99. package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
  100. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +6 -7
  101. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +179 -0
  102. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
  103. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
  104. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
  105. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
  106. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
  107. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
  108. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  109. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  110. package/cypress/fixtures/constants.js +1 -1
  111. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  112. package/cypress/fixtures/theme/ilc.json +20 -18
  113. package/cypress/pages/audioPlayerPage.js +274 -504
  114. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  115. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  116. package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
  117. package/cypress/pages/components/commonComponents.js +1 -0
  118. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  119. package/cypress/pages/components/equationEditorFlyout.js +3 -2
  120. package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
  121. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
  122. package/cypress/pages/components/imageCanvasComponent.js +2 -1
  123. package/cypress/pages/components/index.js +3 -0
  124. package/cypress/pages/components/layoutSectionComponent.js +1191 -0
  125. package/cypress/pages/components/numberLineCommonComponent.js +36 -0
  126. package/cypress/pages/components/optionsWrapperComponent.js +13 -2
  127. package/cypress/pages/components/playbackControlsBaseComponent.js +20 -13
  128. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
  129. package/cypress/pages/components/toolSettingsComponent.js +6 -0
  130. package/cypress/pages/contentBlocksPage.js +18 -2
  131. package/cypress/pages/createItemPage.js +75 -8
  132. package/cypress/pages/dialogBoxBase.js +2 -2
  133. package/cypress/pages/drawingResponsePage.js +24 -4
  134. package/cypress/pages/feedbackScalePage.js +3 -0
  135. package/cypress/pages/graphingPage.js +19 -1
  136. package/cypress/pages/gridFillPage.js +25 -8
  137. package/cypress/pages/index.js +2 -1
  138. package/cypress/pages/itemPreviewSettingsPage.js +4 -0
  139. package/cypress/pages/listOrderingPage.js +435 -557
  140. package/cypress/pages/matchingPage.js +1 -1
  141. package/cypress/pages/multipleSelectionPage.js +23 -1
  142. package/cypress/pages/numberLineLabelPage.js +333 -0
  143. package/cypress/pages/numberLinePage.js +1370 -132
  144. package/cypress/pages/rulerPage.js +6 -2
  145. package/cypress/pages/textSelectionPage.js +461 -23
  146. package/package.json +1 -1
@@ -0,0 +1,161 @@
1
+ import { listOrderingPage } from "../../../../pages/listOrderingPage";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ let options = ['sprout', 'plant', 'flower', 'seed'];
4
+ let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
5
+
6
+ describe('Create Item page - List ordering: Partial equal weights', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Question Preview: AutoScored - Partial equal weights', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
15
+ cy.barsPreLoaderWait();
16
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
17
+ listOrderingPage.steps.addInputToOptionsInputField(options);
18
+ listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
19
+ listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
20
+ listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
21
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
22
+ listOrderingPage.steps.allotPoints(20);
23
+ listOrderingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
24
+ listOrderingPage.steps.switchToPreviewTab();
25
+ });
26
+
27
+ it('When the user switches to the \'Grading view\' without attempting the question, then correct/incorrect icons should be displayed for the default list order, correct/incorrect status message should not be displayed and correct answers section should be displayed with correct answers from the correct accordion', () => {
28
+ listOrderingPage.steps.verifyPreviewScore(0, 20);
29
+ listOrderingPage.steps.switchToGradingView();
30
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
31
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
32
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
33
+ listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
34
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
35
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
36
+ });
37
+
38
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, correct/incorrect status message should not be displayed and correct answers section should be displayed with correct answers from the correct accordion', () => {
39
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
40
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
41
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
42
+ listOrderingPage.steps.verifyPreviewScore(0, 20);
43
+ listOrderingPage.steps.switchToGradingView();
44
+ listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
45
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
46
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
47
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
48
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
49
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
50
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
51
+ cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, correct/incorrect status message and correct answer section should not be displayed')
52
+ listOrderingPage.steps.checkAnswer();
53
+ listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
54
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
55
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
56
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
57
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
58
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
59
+ });
60
+
61
+ it('When the user attempts the question partially correct, then the user should be awarded points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, correct/incorrect status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
62
+ listOrderingPage.steps.resetQuestionPreview();
63
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 3);
64
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 0);
65
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['plant', 'sprout', 'seed', 'flower']);
66
+ listOrderingPage.steps.switchToGradingView();
67
+ listOrderingPage.steps.verifyPreviewScore(10, 20);
68
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
69
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
70
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
71
+ listOrderingPage.steps.verifyCorrectOptionIcon('flower');
72
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
73
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
74
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
75
+ cy.log('When user attempts the question partially correct and clicks on \'Check Answer\' button, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, correct/incorrect status message and correct answer section should not be displayed')
76
+ listOrderingPage.steps.checkAnswer()
77
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
78
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
79
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
80
+ listOrderingPage.steps.verifyCorrectOptionIcon('flower');
81
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
82
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
83
+ });
84
+
85
+ it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
86
+ listOrderingPage.steps.resetQuestionPreview();
87
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
88
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
89
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(correctAnswerArray);
90
+ listOrderingPage.steps.verifyPreviewScore(20, 20);
91
+ listOrderingPage.steps.switchToGradingView()
92
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
93
+ listOrderingPage.steps.verifyCorrectOptionIcon('seed');
94
+ listOrderingPage.steps.verifyCorrectOptionIcon('plant');
95
+ listOrderingPage.steps.verifyCorrectOptionIcon('flower');
96
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
97
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
98
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
99
+ cy.log('When user attempts the question correctly and clicks on the \'Check Answer\' button, then correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed')
100
+ listOrderingPage.steps.checkAnswer();
101
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
102
+ listOrderingPage.steps.verifyCorrectOptionIcon('seed');
103
+ listOrderingPage.steps.verifyCorrectOptionIcon('plant');
104
+ listOrderingPage.steps.verifyCorrectOptionIcon('flower');
105
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
106
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
107
+ });
108
+ });
109
+
110
+ describe('Question preview: Auto scored - Partial equal weights: Minimum scoring', () => {
111
+ abortEarlySetup();
112
+ before(() => {
113
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
114
+ cy.barsPreLoaderWait();
115
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
116
+ listOrderingPage.steps.addInputToOptionsInputField(options);
117
+ listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
118
+ listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
119
+ listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
120
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
121
+ listOrderingPage.steps.allotPoints(20);
122
+ listOrderingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
123
+ });
124
+
125
+ it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
126
+ listOrderingPage.steps.expandMinimumScoringDropdown();
127
+ listOrderingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
128
+ listOrderingPage.steps.allotMinimumPoints(2);
129
+ listOrderingPage.steps.switchToPreviewTab();
130
+ listOrderingPage.steps.switchToGradingView();
131
+ listOrderingPage.steps.verifyPreviewScore(2, 20);
132
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
133
+ });
134
+
135
+ it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
136
+ listOrderingPage.steps.resetQuestionPreview();
137
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
138
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
139
+ listOrderingPage.steps.verifyPreviewScore(2, 20);
140
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
141
+ });
142
+
143
+ it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then considering the default list order as an incorrect attempt the user should be awarded with minimum points', () => {
144
+ listOrderingPage.steps.switchToEditTab();
145
+ listOrderingPage.steps.expandMinimumScoringDropdown();
146
+ listOrderingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
147
+ listOrderingPage.steps.allotMinimumPoints(2);
148
+ listOrderingPage.steps.switchToPreviewTab();
149
+ listOrderingPage.steps.switchToGradingView();
150
+ listOrderingPage.steps.verifyPreviewScore(2, 20);
151
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
152
+ });
153
+
154
+ it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
155
+ listOrderingPage.steps.resetQuestionPreview();
156
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
157
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
158
+ listOrderingPage.steps.verifyPreviewScore(2, 20);
159
+ });
160
+ })
161
+ });
@@ -0,0 +1,216 @@
1
+ import { listOrderingPage } from "../../../../pages/listOrderingPage";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ let options = ['sprout', 'plant', 'flower', 'seed'];
5
+ let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
6
+ let alternateCorrectAnswerArray = ['seed', 'flower', 'sprout', 'plant'];
7
+
8
+ describe('Create Item page - List ordering: Partial equal weights scoring with alternative answer - When alternative answer points are equal to correct answer points', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Question Preview: AutoScored - Partial equal weights with alternative answer: When alternative answer points are equal to correct answer points', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
17
+ cy.barsPreLoaderWait();
18
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
19
+ listOrderingPage.steps.addInputToOptionsInputField(options);
20
+ listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
21
+ listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
22
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
23
+ listOrderingPage.steps.allotPoints(20);
24
+ listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
25
+ listOrderingPage.steps.addAlternativeAnswerAccordion(1);
26
+ listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
27
+ listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('plant', 3);
28
+ listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('flower', 1);
29
+ listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(alternateCorrectAnswerArray);
30
+ listOrderingPage.steps.allotPoints(20);
31
+ listOrderingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
32
+ listOrderingPage.steps.switchToPreviewTab();
33
+ });
34
+
35
+ it('When the user switches to the \'Grading view\' without attempting the question, then correct/incorrect icons should be displayed for the default list order, correct/incorrect status message should not be displayed and correct answer section should be displayed with correct answers from the correct accordion', () => {
36
+ listOrderingPage.steps.verifyPreviewScore(0, 20);
37
+ listOrderingPage.steps.switchToGradingView();
38
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
39
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
40
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
41
+ listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
42
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
43
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
44
+ });
45
+
46
+ it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
47
+ listOrderingPage.steps.resetQuestionPreview();
48
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
49
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
50
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(correctAnswerArray);
51
+ listOrderingPage.steps.verifyPreviewScore(20, 20);
52
+ listOrderingPage.steps.switchToGradingView();
53
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
54
+ listOrderingPage.steps.verifyCorrectOptionIcon('seed');
55
+ listOrderingPage.steps.verifyCorrectOptionIcon('plant');
56
+ listOrderingPage.steps.verifyCorrectOptionIcon('flower');
57
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
58
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
59
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
60
+ cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
61
+ listOrderingPage.steps.checkAnswer();
62
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
63
+ listOrderingPage.steps.verifyCorrectOptionIcon('seed');
64
+ listOrderingPage.steps.verifyCorrectOptionIcon('plant');
65
+ listOrderingPage.steps.verifyCorrectOptionIcon('flower');
66
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
67
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
68
+ });
69
+
70
+ it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
71
+ listOrderingPage.steps.resetQuestionPreview();
72
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
73
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 3);
74
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 1);
75
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(alternateCorrectAnswerArray);
76
+ listOrderingPage.steps.verifyPreviewScore(20, 20);
77
+ listOrderingPage.steps.switchToGradingView();
78
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
79
+ listOrderingPage.steps.verifyCorrectOptionIcon('seed');
80
+ listOrderingPage.steps.verifyCorrectOptionIcon('plant');
81
+ listOrderingPage.steps.verifyCorrectOptionIcon('flower');
82
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
83
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
84
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
85
+ cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
86
+ listOrderingPage.steps.checkAnswer();
87
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
88
+ listOrderingPage.steps.verifyCorrectOptionIcon('seed');
89
+ listOrderingPage.steps.verifyCorrectOptionIcon('plant');
90
+ listOrderingPage.steps.verifyCorrectOptionIcon('flower');
91
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
92
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
93
+ });
94
+
95
+ 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, correct/incorrect status message and correct answer section with all correct answers from the correct accordion should be displayed', () => {
96
+ listOrderingPage.steps.resetQuestionPreview();
97
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
98
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
99
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['flower', 'sprout', 'plant', 'seed']);
100
+ listOrderingPage.steps.verifyPreviewScore(10, 20);
101
+ listOrderingPage.steps.switchToGradingView();
102
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
103
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
104
+ listOrderingPage.steps.verifyCorrectOptionIcon('plant');
105
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
106
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
107
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
108
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
109
+ cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
110
+ listOrderingPage.steps.checkAnswer();
111
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
112
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
113
+ listOrderingPage.steps.verifyCorrectOptionIcon('plant');
114
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
115
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
116
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
117
+ });
118
+
119
+ 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, correct/incorrect status message and correct answer section with all correct answers from the correct accordion should be displayed', () => {
120
+ listOrderingPage.steps.resetQuestionPreview();
121
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 0);
122
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 1);
123
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['plant', 'flower', 'sprout', 'seed']);
124
+ listOrderingPage.steps.verifyPreviewScore(10, 20);
125
+ listOrderingPage.steps.switchToGradingView();
126
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
127
+ listOrderingPage.steps.verifyCorrectOptionIcon('flower');
128
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
129
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
130
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
131
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
132
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
133
+ cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
134
+ listOrderingPage.steps.checkAnswer()
135
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
136
+ listOrderingPage.steps.verifyCorrectOptionIcon('flower');
137
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
138
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
139
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
140
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
141
+ });
142
+
143
+ 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, correct icon should be displayed besides response field with correct answer responses, incorrect icon should be displayed beside responses from the alternative accordion, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
144
+ listOrderingPage.steps.resetQuestionPreview();
145
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
146
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
147
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 3);
148
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'sprout', 'flower', 'plant']);
149
+ listOrderingPage.steps.verifyPreviewScore(10, 20);
150
+ listOrderingPage.steps.switchToGradingView();
151
+ listOrderingPage.steps.verifyCorrectOptionIcon('seed');
152
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
153
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
154
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
155
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
156
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
157
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
158
+ cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside incorrect responses correct/incorrect status message and correct answer section should not be displayed')
159
+ listOrderingPage.steps.checkAnswer()
160
+ listOrderingPage.steps.verifyCorrectOptionIcon('seed');
161
+ listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
162
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
163
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
164
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
165
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
166
+ });
167
+
168
+ 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, correct icon should be besides the common response, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
169
+ listOrderingPage.steps.resetQuestionPreview();
170
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
171
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
172
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'plant', 'flower', 'sprout']);
173
+ listOrderingPage.steps.verifyPreviewScore(5, 20);
174
+ listOrderingPage.steps.switchToGradingView();
175
+ listOrderingPage.steps.verifyCorrectOptionIcon('seed');
176
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
177
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
178
+ listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
179
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
180
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
181
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
182
+ cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
183
+ listOrderingPage.steps.checkAnswer();
184
+ listOrderingPage.steps.verifyCorrectOptionIcon('seed');
185
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
186
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
187
+ listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
188
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
189
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
190
+ });
191
+
192
+ 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 all incorrect responses, correct/incorrect status message and correct answer section with all correct answers should be displayed', () => {
193
+ listOrderingPage.steps.resetQuestionPreview();
194
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
195
+ listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
196
+ listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
197
+ listOrderingPage.steps.verifyPreviewScore(0, 20);
198
+ listOrderingPage.steps.switchToGradingView();
199
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
200
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
201
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
202
+ listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
203
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
204
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
205
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
206
+ cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, correct/incorrect status message and correct answer section should not be displayed')
207
+ listOrderingPage.steps.checkAnswer();
208
+ listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
209
+ listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
210
+ listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
211
+ listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
212
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
213
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists()
214
+ });
215
+ });
216
+ });