itemengine-cypress-automation 1.0.184 → 1.0.185

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,252 +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 equal 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 equal 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 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(12);
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 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(12, 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.verifyCorrectIncorrectStatusMessageNotExists();
116
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
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(6, 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.verifyCorrectIncorrectStatusMessageNotExists();
140
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
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.verifyCorrectIncorrectStatusMessageNotExists();
165
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
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 the 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.verifyCorrectIncorrectStatusMessageNotExists();
189
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
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.verifyCorrectIncorrectStatusMessageNotExists();
213
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
214
- });
215
-
216
- it('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternative accordion answers then on switching to the \'Grading view\', the points awarded should be of the correct accordion, correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect status message should not be displayed and correct answer section should be displayed with answers from the correct accordion', () => {
217
- 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')
218
- listOrderingPage.steps.switchToEditTab();
219
- listOrderingPage.steps.deleteAlternativeAnswerAccordion(0);
220
- listOrderingPage.steps.addAlternativeAnswerAccordion(1);
221
- listOrderingPage.steps.allotPoints(10);
222
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('plant', 0);
223
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('flower', 1);
224
- listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(['plant', 'flower', 'sprout', 'seed']);
225
- listOrderingPage.steps.expandCorrectAnswerAccordion();
226
- listOrderingPage.steps.allotPoints(50);
227
- listOrderingPage.steps.switchToPreviewTab();
228
-
229
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
230
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 1);
231
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 2);
232
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'flower', 'sprout', 'plant']);
233
- listOrderingPage.steps.verifyPreviewScore(12.5, 50);
234
- listOrderingPage.steps.switchToGradingView();
235
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
236
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
237
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
238
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
239
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
240
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
241
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
242
- cy.log('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion and clicks on \'Check answer\' button, correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect status message and correct answer section should not be displayed')
243
- listOrderingPage.steps.checkAnswer();
244
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
245
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
246
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
247
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
248
- listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
249
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
250
- });
251
- });
252
- });
@@ -1,118 +0,0 @@
1
- import { listOrderingPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
- const options = ['sprout', 'plant', 'flower', 'seed'];
6
- const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
7
-
8
- describe('Create Item page - matching : Additional settings', () => {
9
- before(() => {
10
- cy.loginAs('admin');
11
- });
12
-
13
- describe('Additional Settings accordion', () => {
14
- abortEarlySetup();
15
- before(() => {
16
- listOrderingPage.steps.navigateToCreateQuestion('list ordering');
17
- cy.barsPreLoaderWait();
18
- });
19
-
20
- listOrderingPage.tests.verifyAdditionalSettingsAccordionProperties();
21
- });
22
-
23
- describe('Additional settings: Font size contents', () => {
24
- abortEarlySetup();
25
- before(() => {
26
- listOrderingPage.steps.navigateToCreateQuestion('list ordering');
27
- cy.barsPreLoaderWait();
28
- listOrderingPage.steps.expandAdditionalSettings();
29
- });
30
-
31
- listOrderingPage.tests.verifyFontSizeSectionContents();
32
- });
33
-
34
- describe('Additional settings: Font size - Specify correct answer section', () => {
35
- abortEarlySetup();
36
- before(() => {
37
- listOrderingPage.steps.navigateToCreateQuestion('list ordering');
38
- cy.barsPreLoaderWait();
39
- listOrderingPage.steps.addTextInQuestionInstructionsInputField('question instruction');
40
- listOrderingPage.steps.addInputToOptionsInputField(options);
41
- listOrderingPage.steps.allotPoints(10);
42
- listOrderingPage.steps.expandAdditionalSettings();
43
- });
44
-
45
- Object.keys(fontSizes).forEach((option) => {
46
- it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the specify correct answer section should change to ${fontSizes[option]} accordingly`, () => {
47
- listOrderingPage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
48
- utilities.verifyInnerText(listOrderingPage.fontSizeDropdown(), `${option}`);
49
- utilities.verifyCSS(utilities.getNthElement(listOrderingPage.optionSpecifyCorrectAnswerSection(), 0), {
50
- 'font-size': fontSizes[option]
51
- });
52
- });
53
- });
54
- });
55
-
56
- describe('Additional settings: Font size - preview tab', () => {
57
- abortEarlySetup();
58
- before(() => {
59
- listOrderingPage.steps.navigateToCreateQuestion('list ordering');
60
- cy.barsPreLoaderWait();
61
- listOrderingPage.steps.addTextInQuestionInstructionsInputField('question instruction');
62
- listOrderingPage.steps.addInputToOptionsInputField(options);
63
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
64
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
65
- listOrderingPage.steps.allotPoints(10);
66
- listOrderingPage.steps.expandAdditionalSettings();
67
- });
68
-
69
- Object.keys(fontSizes).forEach((option) => {
70
- it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${fontSizes[option]} accordingly`, () => {
71
- listOrderingPage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
72
- utilities.verifyInnerText(listOrderingPage.fontSizeDropdown(), `${option}`);
73
- listOrderingPage.steps.switchToPreviewTab();
74
- utilities.verifyCSS(listOrderingPage.questionInstructionsText(), {
75
- 'font-size': fontSizes[option]
76
- });
77
- utilities.verifyCSS(utilities.getNthElement(listOrderingPage.optionPreviewTab(), 0), {
78
- 'font-size': fontSizes[option]
79
- });
80
- listOrderingPage.steps.switchToGradingView();
81
- utilities.verifyCSS(listOrderingPage.correctAnswersLabel(), {
82
- 'font-size': fontSizes[option]
83
- });
84
- utilities.verifyCSS(utilities.getNthElement(listOrderingPage.correctAnswerSectionAnswerWrapper(), 0), {
85
- 'font-size': fontSizes[option]
86
- });
87
-
88
- utilities.verifyCSS(listOrderingPage.correctIncorrectStatusMessageText(), {
89
- 'font-size': fontSizes[option]
90
- });
91
- listOrderingPage.steps.switchToStudentView();
92
- listOrderingPage.steps.switchToEditTab();
93
- });
94
- });
95
- });
96
-
97
- describe('Additional settings: Accessibility section', () => {
98
- abortEarlySetup();
99
- before(() => {
100
- listOrderingPage.steps.navigateToCreateQuestion('list ordering');
101
- cy.barsPreLoaderWait();
102
- listOrderingPage.steps.expandAdditionalSettings();
103
- });
104
-
105
- listOrderingPage.tests.verifyAdditionalSettingsAccessibilitySection();
106
- });
107
-
108
- describe('Additional Settings: Details section', () => {
109
- abortEarlySetup();
110
- before(() => {
111
- listOrderingPage.steps.navigateToCreateQuestion('list ordering');
112
- cy.barsPreLoaderWait();
113
- listOrderingPage.steps.expandAdditionalSettings();
114
- });
115
-
116
- listOrderingPage.tests.verifyDetailsSection();
117
- });
118
- });
@@ -1,243 +0,0 @@
1
- import { dialogBoxBase, listOrderingPage, gradingViewPage, itemPreviewPage, studentViewPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
- const grepTags = Cypress.env('grepTags');
6
- let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
7
- const views = utilities.getViews(correctAnswerViews);
8
- var itemReferenceID = "";
9
- const options = ['sprout', 'plant', 'flower', 'seed'];
10
- const correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
11
-
12
- describe('Create item page - List ordering: All or nothing ', () => {
13
- before(() => {
14
- cy.loginAs('admin');
15
- });
16
-
17
- if (!grepTags || !grepTags.includes('smoke')) {
18
- describe('Question preview modes: Student view and Grading view', () => {
19
- abortEarlySetup();
20
- before(() => {
21
- listOrderingPage.steps.navigateToCreateQuestion('list ordering');
22
- cy.barsPreLoaderWait();
23
- listOrderingPage.steps.switchToPreviewTab();
24
- });
25
-
26
- listOrderingPage.tests.verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet();
27
-
28
- it('When the user sets correct answer responses and allots points, then the alloted points should be displayed in the preview tab', () => {
29
- listOrderingPage.steps.switchToEditTab();
30
- listOrderingPage.steps.allotPoints(20);
31
- listOrderingPage.steps.addInputToOptionsInputField(options);
32
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
33
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
34
- listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
35
- listOrderingPage.steps.switchToPreviewTab();
36
- listOrderingPage.steps.verifyPreviewScore(0, 20);
37
- });
38
-
39
- it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab, users response should not persist', () => {
40
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
41
- listOrderingPage.steps.resetQuestionPreview();
42
- options.forEach((option, index) => {
43
- listOrderingPage.steps.verifyTextContentOfOptionInPreviewTab(option, index);
44
- });
45
- });
46
- });
47
- };
48
-
49
- views.forEach((view) => {
50
- describe(`${view}: Auto scored - All or nothing scoring`, { tags: 'smoke' }, () => {
51
- abortEarlySetup();
52
- before(() => {
53
- switch (view) {
54
- case 'Question preview':
55
- listOrderingPage.steps.navigateToCreateQuestion('list ordering');
56
- cy.barsPreLoaderWait();
57
- listOrderingPage.steps.addInputToOptionsInputField(options);
58
- listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
59
- listOrderingPage.steps.allotPoints(20);
60
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
61
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
62
- listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
63
- listOrderingPage.steps.switchToPreviewTab();
64
- break;
65
- case 'Item preview':
66
- cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
67
- itemPreviewPage.steps.switchToPreviewTab();
68
- break;
69
- case 'Grading view':
70
- cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
71
- break;
72
- };
73
- });
74
-
75
- beforeEach(() => {
76
- switch (view) {
77
- case 'Question preview':
78
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
79
- listOrderingPage.steps.resetQuestionPreview();
80
- break;
81
- case 'Item preview':
82
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
83
- itemPreviewPage.steps.resetQuestionPreview();
84
- break;
85
- case 'Grading view':
86
- cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
87
- break;
88
- }
89
- });
90
-
91
- if (view === 'Question preview') {
92
- after(() => {
93
- listOrderingPage.steps.clickOnSaveQuestionButton();
94
- utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
95
- itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
96
- });
97
- };
98
-
99
- it('When the user selects \'Grading\' view without attempting the question, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
100
- if (view === 'Grading view') {
101
- studentViewPage.steps.submitResponse();
102
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
103
- studentViewPage.steps.clickOnGoToGradingViewButton();
104
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
105
- };
106
- if (view === 'Question preview' || view === 'Item preview') {
107
- listOrderingPage.steps.verifyPreviewScore(0, 20);
108
- listOrderingPage.steps.switchToGradingView();
109
- listOrderingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
110
- };
111
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
112
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
113
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
114
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
115
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
116
- utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
117
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
118
- });
119
-
120
- 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, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
121
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
122
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
123
- if (view === 'Grading view') {
124
- studentViewPage.steps.submitResponse();
125
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
126
- studentViewPage.steps.clickOnGoToGradingViewButton();
127
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
128
- };
129
- if (view === 'Question preview' || view === 'Item preview') {
130
- listOrderingPage.steps.verifyPreviewScore(0, 20);
131
- listOrderingPage.steps.switchToGradingView();
132
- };
133
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
134
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
135
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
136
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
137
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
138
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
139
- });
140
-
141
- it('When the user attempts the question partially correct, then the user should be awarded 0 points 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, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
142
- if (view === 'Grading view') {
143
- studentViewPage.steps.clearResponses();
144
- };
145
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 3);
146
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 0);
147
- if (view === 'Grading view') {
148
- studentViewPage.steps.submitResponse();
149
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
150
- studentViewPage.steps.clickOnGoToGradingViewButton();
151
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
152
- };
153
- if (view === 'Question preview' || view === 'Item preview') {
154
- listOrderingPage.steps.verifyPreviewScore(0, 20);
155
- listOrderingPage.steps.switchToGradingView();
156
- };
157
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
158
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
159
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
160
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
161
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
162
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
163
- });
164
-
165
- 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 icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
166
- if (view === 'Grading view') {
167
- studentViewPage.steps.clearResponses();
168
- };
169
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
170
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
171
- if (view === 'Grading view') {
172
- studentViewPage.steps.submitResponse();
173
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
174
- studentViewPage.steps.clickOnGoToGradingViewButton();
175
- gradingViewPage.steps.verifyGradingViewScore(20, 20);
176
- };
177
- if (view === 'Question preview' || view === 'Item preview') {
178
- listOrderingPage.steps.verifyPreviewScore(20, 20);
179
- listOrderingPage.steps.switchToGradingView();
180
- listOrderingPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
181
- };
182
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
183
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
184
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
185
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
186
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
187
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
188
- });
189
- });
190
- });
191
-
192
- if (!grepTags || !grepTags.includes('smoke')) {
193
- describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
194
- abortEarlySetup();
195
- before(() => {
196
- listOrderingPage.steps.navigateToCreateQuestion('list ordering');
197
- cy.barsPreLoaderWait();
198
- listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
199
- listOrderingPage.steps.allotPoints(20);
200
- listOrderingPage.steps.addInputToOptionsInputField(options);
201
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
202
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
203
- listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
204
- });
205
-
206
- 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', () => {
207
- listOrderingPage.steps.expandMinimumScoringDropdown();
208
- listOrderingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
209
- listOrderingPage.steps.allotMinimumPoints(2);
210
- listOrderingPage.steps.switchToPreviewTab();
211
- listOrderingPage.steps.switchToGradingView();
212
- listOrderingPage.steps.verifyPreviewScore(2, 20);
213
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
214
- });
215
-
216
- 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', () => {
217
- listOrderingPage.steps.resetQuestionPreview();
218
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
219
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
220
- listOrderingPage.steps.verifyPreviewScore(2, 20);
221
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
222
- });
223
-
224
- 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 the user should be awarded with 0 points', () => {
225
- listOrderingPage.steps.switchToEditTab();
226
- listOrderingPage.steps.expandMinimumScoringDropdown();
227
- listOrderingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
228
- listOrderingPage.steps.allotMinimumPoints(2);
229
- listOrderingPage.steps.switchToPreviewTab();
230
- listOrderingPage.steps.switchToGradingView();
231
- listOrderingPage.steps.verifyPreviewScore(0, 20);
232
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
233
- });
234
-
235
- 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', () => {
236
- listOrderingPage.steps.resetQuestionPreview();
237
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
238
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
239
- listOrderingPage.steps.verifyPreviewScore(2, 20);
240
- });
241
- });
242
- };
243
- });