itemengine-cypress-automation 1.0.185-repoUpdate26April-b17eb46.0 → 1.0.186-packageUpdate-5632086.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/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  3. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +8 -5
  6. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +28 -417
  7. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  8. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +1 -29
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  11. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  19. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  20. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -3
  21. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +0 -1
  23. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  24. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  25. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  26. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  27. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  28. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  29. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  30. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -11
  31. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  32. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  33. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  34. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +0 -1
  35. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  36. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  37. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +1 -57
  38. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  39. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  40. package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -2
  41. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  42. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -49
  43. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  44. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  45. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  46. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +1 -0
  47. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -0
  48. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +1 -0
  49. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
  50. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
  51. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +2 -1
  52. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +4 -5
  53. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +7 -6
  54. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  55. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  56. package/cypress/fixtures/constants.js +1 -1
  57. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  58. package/cypress/fixtures/theme/ilc.json +18 -20
  59. package/cypress/pages/audioPlayerPage.js +504 -274
  60. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  61. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  62. package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
  63. package/cypress/pages/components/commonComponents.js +0 -1
  64. package/cypress/pages/components/draggableOptionContainer.js +0 -1
  65. package/cypress/pages/components/equationEditorFlyout.js +2 -3
  66. package/cypress/pages/components/essayResponseCommonComponents.js +2 -8
  67. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -1
  68. package/cypress/pages/components/imageCanvasComponent.js +1 -2
  69. package/cypress/pages/components/index.js +0 -3
  70. package/cypress/pages/components/optionsWrapperComponent.js +2 -13
  71. package/cypress/pages/components/playbackControlsBaseComponent.js +13 -20
  72. package/cypress/pages/components/toolSettingsComponent.js +0 -6
  73. package/cypress/pages/contentBlocksPage.js +2 -18
  74. package/cypress/pages/createItemPage.js +8 -75
  75. package/cypress/pages/dialogBoxBase.js +2 -2
  76. package/cypress/pages/drawingResponsePage.js +4 -24
  77. package/cypress/pages/feedbackScalePage.js +0 -3
  78. package/cypress/pages/graphingPage.js +1 -19
  79. package/cypress/pages/gridFillPage.js +8 -25
  80. package/cypress/pages/index.js +1 -2
  81. package/cypress/pages/itemPreviewSettingsPage.js +0 -4
  82. package/cypress/pages/listOrderingPage.js +557 -435
  83. package/cypress/pages/matchingPage.js +1 -1
  84. package/cypress/pages/multipleSelectionPage.js +1 -23
  85. package/cypress/pages/numberLinePage.js +132 -1370
  86. package/cypress/pages/rulerPage.js +2 -6
  87. package/cypress/pages/textSelectionPage.js +23 -461
  88. package/package.json +1 -1
  89. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +0 -79
  90. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +0 -345
  91. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +0 -429
  92. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +0 -162
  93. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +0 -489
  94. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +0 -313
  95. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +0 -230
  96. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +0 -124
  97. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +0 -201
  98. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -216
  99. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -214
  100. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -251
  101. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +0 -52
  102. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +0 -128
  103. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -279
  104. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +0 -109
  105. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -278
  106. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -278
  107. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +0 -335
  108. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -250
  109. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +0 -161
  110. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -216
  111. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -252
  112. package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +0 -118
  113. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +0 -243
  114. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -128
  115. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +0 -155
  116. package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +0 -195
  117. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +0 -78
  118. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -194
  119. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +0 -176
  120. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +0 -112
  121. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +0 -244
  122. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +0 -181
  123. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +0 -33
  124. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +0 -46
  125. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +0 -696
  126. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -173
  127. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +0 -183
  128. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +0 -73
  129. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +0 -204
  130. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +0 -288
  131. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +0 -153
  132. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +0 -164
  133. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +0 -120
  134. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +0 -125
  135. package/cypress/e2e/ILC/TextSelection/headerSection.js +0 -73
  136. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +0 -179
  137. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +0 -89
  138. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +0 -436
  139. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +0 -277
  140. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +0 -222
  141. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +0 -260
  142. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +0 -380
  143. package/cypress/pages/components/layoutSectionComponent.js +0 -1191
  144. package/cypress/pages/components/numberLineCommonComponent.js +0 -36
  145. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +0 -46
  146. package/cypress/pages/numberLineLabelPage.js +0 -333
@@ -1,278 +0,0 @@
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 different 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 different 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 different weights');
23
- listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
24
- listOrderingPage.steps.allotPartialDifferentWeightsPoints({ 0: 7, 1: 5, 2: 4, 3: 8 });
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.allotPartialDifferentWeightsPoints({ 0: 6, 1: 9, 2: 5, 3: 4 });
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 answers section should be displayed with correct answers from the correct accordion', () => {
36
- listOrderingPage.steps.verifyPreviewScore(0, 24);
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(24, 24);
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.verifyCorrectAnswerSectionNotExists();
58
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
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.verifyCorrectAnswerSectionNotExists();
67
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
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(24, 24);
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.verifyCorrectAnswerSectionNotExists();
83
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
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.verifyCorrectAnswerSectionNotExists();
92
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
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 should not be displayed 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(9, 24);
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 should not be displayed 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(14, 24);
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 attempts the question partially correct with equal number of correct responses from correct and alternative accordion then user should be awarded with points of the accordion that awards more points i.e. in this case correct accordion 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(12, 24);
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('When the user attempts the question partially correct with equal number of correct responses from correct and alternative accordion then user should be awarded with points of the accordion that awards more points i.e. in this case alternative accordion 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 correct accordion, 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('flower', 1);
172
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 2);
173
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'flower', 'plant', 'sprout']);
174
- listOrderingPage.steps.verifyPreviewScore(15, 24);
175
- listOrderingPage.steps.switchToGradingView();
176
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
177
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
178
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
179
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
180
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
181
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
182
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
183
- 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')
184
- listOrderingPage.steps.checkAnswer()
185
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
186
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
187
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
188
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
189
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
190
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
191
- });
192
-
193
- it('Race condition: When the user attempts the question with the common option between correct accordion and alternative accordion then user should be awarded with points of the tab with more points i.e. in this case correct accordion and on switching to \'Grading\' view the correct icon should be displayed beside the common option and incorrect icon should be displayed beside the incorrectly responses, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
194
- listOrderingPage.steps.resetQuestionPreview();
195
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
196
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
197
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'plant', 'flower', 'sprout']);
198
- listOrderingPage.steps.verifyPreviewScore(7, 24);
199
- listOrderingPage.steps.switchToGradingView();
200
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
201
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
202
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
203
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
204
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
205
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
206
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
207
- cy.log('Race condition: When the user attempts the question with the common option between correct accordion and alternative accordion then on selecting the \'Check answer\' button the correct icon should be displayed beside the common option and incorrect should be displayed beside the incorrect responses, correct/incorrect status message and correct answer section should not be displayed')
208
- listOrderingPage.steps.checkAnswer();
209
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
210
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
211
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
212
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
213
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
214
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
215
- });
216
-
217
- it('When user attempts the question incorrectly then user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed beside all the options, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
218
- listOrderingPage.steps.resetQuestionPreview();
219
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
220
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
221
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
222
- listOrderingPage.steps.verifyPreviewScore(0, 24);
223
- listOrderingPage.steps.switchToGradingView();
224
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
225
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
226
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
227
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
228
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
229
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
230
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
231
- cy.log('When user attempts the question incorrectly and clicks on the \'Check Answer\' button, then incorrect icons should be displayed beside all the options, correct/incorrect status message and correct answer section should not be displayed')
232
- listOrderingPage.steps.checkAnswer();
233
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
234
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
235
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
236
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
237
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
238
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
239
- });
240
-
241
- it('Overachiever case: When the user attempts the question with more number of correct options from the correct accordion than the alternative accordion but the score of the responses selected from the alternative accordion overpowers the combined score of the correct accordion answers then correct icons should be displayed for the alternative accordion options, incorrect icon should be displayed for the correct accordion options and points awarded should be of the alternative accordion, correct/incorrect status message should not be displayed correct answer section with all correct answers from the correct accordion should be displayed', () => {
242
- cy.log('Pre-step: Switching to Edit tab and allotting points to correct and alternative accordion such that the difference between the points is substantial and the points per response are in decimal')
243
- listOrderingPage.steps.switchToEditTab();
244
- listOrderingPage.steps.addOption();
245
- listOrderingPage.steps.enterTextInOptionInputField(4, 'fruit');
246
- listOrderingPage.steps.deleteAlternativeAnswerAccordion(0);
247
- listOrderingPage.steps.addAlternativeAnswerAccordion(1);
248
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('fruit', 3);
249
- listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(['sprout', 'plant', 'flower', 'fruit', 'seed']);
250
- listOrderingPage.steps.allotPartialDifferentWeightsPoints({ 0: 22, 1: 6, 2: 1, 3: 1, 4: 3 });
251
- listOrderingPage.steps.expandCorrectAnswerAccordion();
252
- listOrderingPage.steps.allotPartialDifferentWeightsPoints({ 0: 24, 1: 1, 2: 4, 3: 1, 4: 3 });
253
- listOrderingPage.steps.switchToPreviewTab();
254
-
255
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 2);
256
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['sprout', 'plant', 'seed', 'flower', 'fruit']);
257
- listOrderingPage.steps.verifyPreviewScore(28, 33);
258
- listOrderingPage.steps.switchToGradingView();
259
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
260
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
261
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
262
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
263
- listOrderingPage.steps.verifyIncorrectOptionIcon('fruit');
264
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
265
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
266
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
267
- cy.log('Overachiever case: When the user has attempted the question with more number of correct options from the correct accordion than the alternative accordion, correct icons should be displayed for the alternative accordion response, incorrect icon should be displayed for the correct accordion options, correct/incorrect status message and correct answer section should not be displayed')
268
- listOrderingPage.steps.checkAnswer();
269
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
270
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
271
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
272
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
273
- listOrderingPage.steps.verifyIncorrectOptionIcon('fruit');
274
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
275
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
276
- });
277
- });
278
- });
@@ -1,278 +0,0 @@
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 different weights scoring with alternative answer - When correct answer points are more than alternative answer points', () => {
9
- before(() => {
10
- cy.loginAs('admin');
11
- });
12
-
13
- describe('Question Preview: AutoScored - Partial different weights with alternative answer: When correct answer points are more than alternative 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 different weights');
23
- listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
24
- listOrderingPage.steps.allotPartialDifferentWeightsPoints({ 0: 7, 1: 5, 2: 4, 3: 8 });
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.allotPartialDifferentWeightsPoints({ 0: 6, 1: 3, 2: 2, 3: 9 });
31
- listOrderingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
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 answers section should be displayed with correct answers from the correct accordion', () => {
36
- listOrderingPage.steps.verifyPreviewScore(0, 24);
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(24, 24);
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.verifyCorrectAnswerSectionNotExists();
58
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
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.verifyCorrectAnswerSectionNotExists();
67
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
68
- });
69
-
70
- it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than 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, 24);
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.verifyCorrectAnswerSectionNotExists();
83
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
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.verifyCorrectAnswerSectionNotExists();
92
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
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 should not be displayed 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(9, 24);
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 should not be displayed 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(5, 24);
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 attempts the question partially correct with equal number of correct responses from correct and alternative accordion then user should be awarded with points of the accordion that awards more points i.e. in this case correct accordion 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('flower', 1);
147
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 2);
148
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'flower', 'plant', 'sprout']);
149
- listOrderingPage.steps.verifyPreviewScore(11, 24);
150
- listOrderingPage.steps.switchToGradingView();
151
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
152
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
153
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
154
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
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.verifyIncorrectOptionIcon('flower');
162
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
163
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
164
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
165
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
166
- });
167
-
168
- it('When the user attempts the question partially correct with equal number of correct responses from correct and alternative accordion then user should be awarded with points of the accordion that awards more points i.e. in this case alternative accordion 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 correct accordion, 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', 1);
172
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 3);
173
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'sprout', 'flower', 'plant']);
174
- listOrderingPage.steps.verifyPreviewScore(15, 24);
175
- listOrderingPage.steps.switchToGradingView();
176
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
177
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
178
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
179
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
180
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
181
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
182
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
183
- 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')
184
- listOrderingPage.steps.checkAnswer()
185
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
186
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
187
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
188
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
189
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
190
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
191
- });
192
-
193
- it('Race condition: When the user attempts the question with the common option between correct accordion and alternative accordion then user should be awarded with points of the tab with more points i.e. in this case correct accordion and on switching to \'Grading\' view the correct icon should be displayed beside the common option and incorrect icon should be displayed beside the incorrect responses, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
194
- listOrderingPage.steps.resetQuestionPreview();
195
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
196
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
197
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'plant', 'flower', 'sprout']);
198
- listOrderingPage.steps.verifyPreviewScore(7, 24);
199
- listOrderingPage.steps.switchToGradingView();
200
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
201
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
202
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
203
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
204
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
205
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
206
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
207
- cy.log('Race condition: When the user attempts the question with the common option between correct accordion and alternative accordion then on selecting the \'Check answer\' button the correct icon should be displayed beside the common option and incorrect should be displayed beside the incorrectly ordered options, correct/incorrect status message and correct answer section should not be displayed')
208
- listOrderingPage.steps.checkAnswer();
209
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
210
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
211
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
212
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
213
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
214
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
215
- });
216
-
217
- it('When user attempts the question incorrectly then user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed beside all the options, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
218
- listOrderingPage.steps.resetQuestionPreview();
219
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
220
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
221
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
222
- listOrderingPage.steps.verifyPreviewScore(0, 24);
223
- listOrderingPage.steps.switchToGradingView();
224
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
225
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
226
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
227
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
228
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
229
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
230
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
231
- cy.log('When user attempts the question incorrectly and clicks on the \'Check Answer\' button, then incorrect icons should be displayed beside all the options, correct/incorrect status message and correct answer section should not be displayed')
232
- listOrderingPage.steps.checkAnswer();
233
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
234
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
235
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
236
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
237
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
238
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
239
- });
240
-
241
- it('Overachiever case: When the user attempts the question with more number of correct options from the correct accordion than the alternative accordion but the score of the responses selected from the alternative accordion overpowers the combined score of the correct accordion answers then correct icons should be displayed for the alternative accordion options, incorrect icon should be displayed for the correct accordion options and points awarded should be of the alternative accordion, correct/incorrect status message should not be displayed correct answer section with all correct answers from the correct accordion should be displayed', () => {
242
- cy.log('Pre-step: Switching to Edit tab and allotting points to correct and alternative accordion such that the difference between the points is substantial and the points per response are in decimal')
243
- listOrderingPage.steps.switchToEditTab();
244
- listOrderingPage.steps.addOption();
245
- listOrderingPage.steps.enterTextInOptionInputField(4, 'fruit');
246
- listOrderingPage.steps.deleteAlternativeAnswerAccordion(0);
247
- listOrderingPage.steps.addAlternativeAnswerAccordion(1);
248
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('fruit', 3);
249
- listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(['sprout', 'plant', 'flower', 'fruit', 'seed']);
250
- listOrderingPage.steps.allotPartialDifferentWeightsPoints({ 0: 14, 1: 2, 2: 1, 3: 2, 4: 3 });
251
- listOrderingPage.steps.expandCorrectAnswerAccordion();
252
- listOrderingPage.steps.allotPartialDifferentWeightsPoints({ 0: 24, 1: 1, 2: 4, 3: 1, 4: 3 });
253
- listOrderingPage.steps.switchToPreviewTab();
254
-
255
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 2);
256
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['sprout', 'plant', 'seed', 'flower', 'fruit']);
257
- listOrderingPage.steps.verifyPreviewScore(16, 33);
258
- listOrderingPage.steps.switchToGradingView();
259
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
260
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
261
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
262
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
263
- listOrderingPage.steps.verifyIncorrectOptionIcon('fruit');
264
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(['seed', 'sprout', 'plant', 'flower', 'fruit']);
265
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
266
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
267
- cy.log('Overachiever case: When the user has attempted the question with more number of correct options from the correct accordion than the alternative accordion, correct icons should be displayed for the alternative accordion response, incorrect icon should be displayed for the correct accordion options, correct/incorrect status message and correct answer section should not be displayed')
268
- listOrderingPage.steps.checkAnswer();
269
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
270
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
271
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
272
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
273
- listOrderingPage.steps.verifyIncorrectOptionIcon('fruit');
274
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
275
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
276
- });
277
- });
278
- });