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,214 +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: All or nothing scoring with alternative answer - When Correct answer points are equal to the alternative answer points', () => {
9
- before(() => {
10
- cy.loginAs('admin');
11
- });
12
-
13
- describe('Question Preview: AutoScored - All or nothing with alternative answer: Alternate answer case: When Correct answer points are equal to the 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.clickAndReorderOptionInPreviewTab('seed', 0);
21
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
22
- listOrderingPage.steps.allotPoints(20);
23
- listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
24
- listOrderingPage.steps.clickOnAddAlternateAnswerButton();
25
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
26
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 3);
27
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 1);
28
- listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(alternateCorrectAnswerArray);
29
- listOrderingPage.steps.allotPoints(20);
30
- listOrderingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
31
- listOrderingPage.steps.switchToPreviewTab();
32
- });
33
-
34
- 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, "Your answer is incorrect" label and correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion', () => {
35
- listOrderingPage.steps.switchToGradingView();
36
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
37
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
38
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
39
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
40
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
41
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
42
- });
43
-
44
- 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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
45
- listOrderingPage.steps.resetQuestionPreview();
46
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
47
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
48
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(correctAnswerArray);
49
- listOrderingPage.steps.verifyPreviewScore(20, 20);
50
- listOrderingPage.steps.switchToGradingView();
51
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
52
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
53
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
54
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
55
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
56
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
57
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
58
- 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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
59
- listOrderingPage.steps.checkAnswer()
60
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
61
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
62
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
63
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
64
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
65
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
66
- });
67
-
68
- 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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
69
- listOrderingPage.steps.resetQuestionPreview();
70
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
71
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 3);
72
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 1);
73
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(alternateCorrectAnswerArray);
74
- listOrderingPage.steps.verifyPreviewScore(20, 20);
75
- listOrderingPage.steps.switchToGradingView();
76
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
77
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
78
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
79
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
80
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
81
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
82
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
83
- 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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
84
- listOrderingPage.steps.checkAnswer()
85
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
86
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
87
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
88
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
89
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
90
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
91
- });
92
-
93
- it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone numeration should be displayed', () => {
94
- listOrderingPage.steps.resetQuestionPreview();
95
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
96
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
97
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['flower', 'sprout', 'plant', 'seed']);
98
- listOrderingPage.steps.verifyPreviewScore(0, 20);
99
- listOrderingPage.steps.switchToGradingView();
100
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
101
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
102
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
103
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
104
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
105
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
106
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
107
- 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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
108
- listOrderingPage.steps.checkAnswer()
109
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
110
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
111
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
112
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
113
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
114
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
115
- });
116
-
117
- it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
118
- listOrderingPage.steps.resetQuestionPreview();
119
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 0);
120
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 1);
121
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['plant', 'flower', 'sprout', 'seed']);
122
- listOrderingPage.steps.verifyPreviewScore(0, 20);
123
- listOrderingPage.steps.switchToGradingView();
124
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
125
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
126
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
127
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
128
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
129
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
130
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
131
- 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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
132
- listOrderingPage.steps.checkAnswer();
133
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
134
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
135
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
136
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
137
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
138
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
139
- });
140
-
141
- 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 0 points and on switching to \'Grading\' view, correct icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative tab, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
142
- listOrderingPage.steps.resetQuestionPreview();
143
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
144
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
145
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 3);
146
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'sprout', 'flower', 'plant']);
147
- listOrderingPage.steps.verifyPreviewScore(0, 20);
148
- listOrderingPage.steps.switchToGradingView();
149
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
150
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
151
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
152
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
153
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
154
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
155
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
156
- 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 empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
157
- listOrderingPage.steps.checkAnswer();
158
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
159
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
160
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
161
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
162
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
163
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
164
- });
165
-
166
- 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 0 points and on switching to \'Grading\' view, correct icon should be besides the common response, \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
167
- listOrderingPage.steps.resetQuestionPreview();
168
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
169
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
170
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'plant', 'flower', 'sprout']);
171
- listOrderingPage.steps.verifyPreviewScore(0, 20);
172
- listOrderingPage.steps.switchToGradingView();
173
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
174
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
175
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
176
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
177
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
178
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
179
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
180
- 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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
181
- listOrderingPage.steps.checkAnswer()
182
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
183
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
184
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
185
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
186
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
187
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
188
- });
189
-
190
- 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 along with dropzone cell numeration should be displayed', () => {
191
- listOrderingPage.steps.resetQuestionPreview();
192
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
193
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
194
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
195
- listOrderingPage.steps.verifyPreviewScore(0, 20);
196
- listOrderingPage.steps.switchToGradingView();
197
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
198
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
199
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
200
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
201
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
202
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
203
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
204
- 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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
205
- listOrderingPage.steps.checkAnswer();
206
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
207
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
208
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
209
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
210
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
211
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
212
- });
213
- });
214
- });
@@ -1,251 +0,0 @@
1
- import { listOrderingPage } from "../../../../pages/listOrderingPage";
2
- import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
- import utilities from "../../../../support/helpers/utilities";
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: All or nothing 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 - All or nothing 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.allotPoints(20);
23
- listOrderingPage.steps.addAlternativeAnswerAccordion(1);
24
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
25
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('plant', 3);
26
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('flower', 1);
27
- listOrderingPage.steps.allotPoints(12);
28
- listOrderingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
29
- listOrderingPage.steps.switchToPreviewTab();
30
- });
31
-
32
- 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, "Your answer is incorrect" label and correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion', () => {
33
- listOrderingPage.steps.verifyPreviewScore(0, 20);
34
- listOrderingPage.steps.switchToGradingView();
35
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
36
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
37
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
38
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
39
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
40
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
41
- });
42
-
43
- it('CSS of correct answer section', { tags: 'css' }, () => {
44
- utilities.verifyCSS(listOrderingPage.correctAnswersLabel(), {
45
- 'color': css.color.sectionHeading,
46
- 'font-size': css.fontSize.default,
47
- 'font-weight': css.fontWeight.bold
48
- });
49
- utilities.verifyCSS(listOrderingPage.correctAnswerSectionAnswerWrapper(), {
50
- 'border': `1px solid ${css.color.correctAnswer}`
51
- });
52
- utilities.verifyCSS(listOrderingPage.correctAnswerSectionAnswerWrapper().find('question-text-wrapper'), {
53
- 'color': css.color.text,
54
- 'font-size': css.fontSize.default,
55
- 'font-weight': css.fontWeight.regular,
56
- });
57
- });
58
-
59
- it('Accessibility of correct answer section', { tags: 'a11y' }, () => {
60
- cy.checkAccessibility(listOrderingPage.previewTabQuestionWrapper());
61
- });
62
-
63
- 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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
64
- listOrderingPage.steps.resetQuestionPreview();
65
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
66
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
67
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(correctAnswerArray);
68
- listOrderingPage.steps.verifyPreviewScore(20, 20);
69
- listOrderingPage.steps.switchToGradingView();
70
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
71
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
72
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
73
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
74
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
75
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
76
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
77
- 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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
78
- listOrderingPage.steps.checkAnswer();
79
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
80
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
81
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
82
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
83
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
84
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
85
- });
86
-
87
- 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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
88
- listOrderingPage.steps.resetQuestionPreview();
89
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
90
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 3);
91
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 1);
92
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(alternateCorrectAnswerArray);
93
- listOrderingPage.steps.verifyPreviewScore(12, 20);
94
- listOrderingPage.steps.switchToGradingView();
95
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
96
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
97
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
98
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
99
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
100
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
101
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
102
- 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, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
103
- listOrderingPage.steps.checkAnswer();
104
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
105
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
106
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
107
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
108
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
109
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
110
- });
111
-
112
- it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone numeration should be displayed', () => {
113
- listOrderingPage.steps.resetQuestionPreview();
114
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
115
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
116
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['flower', 'sprout', 'plant', 'seed']);
117
- listOrderingPage.steps.verifyPreviewScore(0, 20);
118
- listOrderingPage.steps.switchToGradingView();
119
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
120
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
121
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
122
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
123
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
124
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
125
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
126
- 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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
127
- listOrderingPage.steps.checkAnswer()
128
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
129
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
130
- listOrderingPage.steps.verifyCorrectOptionIcon('plant');
131
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
132
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
133
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
134
- });
135
-
136
- it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
137
- listOrderingPage.steps.resetQuestionPreview();
138
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 0);
139
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 1);
140
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['plant', 'flower', 'sprout', 'seed']);
141
- listOrderingPage.steps.verifyPreviewScore(0, 20);
142
- listOrderingPage.steps.switchToGradingView();
143
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
144
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
145
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
146
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
147
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
148
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
149
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
150
- 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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
151
- listOrderingPage.steps.checkAnswer()
152
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
153
- listOrderingPage.steps.verifyCorrectOptionIcon('flower');
154
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
155
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
156
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
157
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
158
- });
159
-
160
- 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 0 points and on switching to \'Grading\' view, correct icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative tab, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
161
- listOrderingPage.steps.resetQuestionPreview();
162
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
163
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 1);
164
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 3);
165
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'sprout', 'flower', 'plant']);
166
- listOrderingPage.steps.verifyPreviewScore(0, 20);
167
- listOrderingPage.steps.switchToGradingView();
168
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
169
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
170
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
171
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
172
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
173
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
174
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
175
- 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 empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
176
- listOrderingPage.steps.checkAnswer()
177
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
178
- listOrderingPage.steps.verifyCorrectOptionIcon('sprout');
179
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
180
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
181
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
182
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
183
- });
184
-
185
- 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 0 points and on switching to \'Grading\' view, correct icon should be besides the common response, \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion should be displayed', () => {
186
- listOrderingPage.steps.resetQuestionPreview();
187
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('seed', 0);
188
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
189
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['seed', 'plant', 'flower', 'sprout']);
190
- listOrderingPage.steps.verifyPreviewScore(0, 20);
191
- listOrderingPage.steps.switchToGradingView();
192
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
193
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
194
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
195
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
196
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
197
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
198
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
199
- 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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
200
- listOrderingPage.steps.checkAnswer();
201
- listOrderingPage.steps.verifyCorrectOptionIcon('seed');
202
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
203
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
204
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
205
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
206
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
207
- });
208
-
209
- 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 along with dropzone cell numeration should be displayed', () => {
210
- listOrderingPage.steps.resetQuestionPreview();
211
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
212
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
213
- listOrderingPage.steps.verifyOptionsOrderInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
214
- listOrderingPage.steps.verifyPreviewScore(0, 20);
215
- listOrderingPage.steps.switchToGradingView();
216
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
217
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
218
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
219
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
220
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
221
- listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
222
- listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
223
- 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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
224
- listOrderingPage.steps.checkAnswer();
225
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
226
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
227
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
228
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
229
- listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
230
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
231
- });
232
-
233
- it('CSS of incorrect answer state', { tags: 'css' }, () => {
234
- listOrderingPage.incorrectIcon()
235
- .verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
236
- utilities.verifyCSS(listOrderingPage.correctIncorrectAnswerBlock(), {
237
- 'background-color': css.color.incorrectAnswerLabelBg,
238
- 'border': `1px solid ${css.color.incorrectAnswer}`
239
- });
240
- utilities.verifyCSS(listOrderingPage.correctIncorrectStatusMessageText(), {
241
- 'color': css.color.text,
242
- 'font-size': css.fontSize.default,
243
- 'font-weight': css.fontWeight.regular
244
- });
245
- });
246
-
247
- it('Accessibility of incorrect answer state', { tags: 'a11y' }, () => {
248
- cy.checkAccessibility(listOrderingPage.previewTabQuestionWrapper());
249
- });
250
- });
251
- });
@@ -1,52 +0,0 @@
1
- import { listOrderingPage } from "../../../../pages";
2
- import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
-
4
- describe('Create item page - List ordering: All or nothing penalty scoring', () => {
5
- before(() => {
6
- cy.loginAs('admin');
7
- });
8
-
9
- describe('Question preview: Auto scored - All or nothing: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
10
- abortEarlySetup();
11
- before(() => {
12
- listOrderingPage.steps.navigateToCreateQuestion('list ordering');
13
- cy.barsPreLoaderWait();
14
- listOrderingPage.steps.addInputToOptionsInputField(options);
15
- listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
16
- listOrderingPage.steps.allotPoints(20);
17
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('seed', 0);
18
- listOrderingPage.steps.clickAndReorderOptionInSpecifyCorrectAnswerSection('sprout', 1);
19
- listOrderingPage.steps.verifyOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
20
- });
21
-
22
- //Penalty points for the entire question
23
- it('When the user sets penalty scoring to \'Penalty points for the entire question\', allots penalty points and attempts the question incorrectly, then the user should be awarded with negative points', () => {
24
- listOrderingPage.steps.expandPenaltyScoringDropdown();
25
- listOrderingPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
26
- listOrderingPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
27
- listOrderingPage.steps.allotPenaltyPoints(2);
28
- listOrderingPage.steps.switchToPreviewTab();
29
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
30
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
31
- listOrderingPage.steps.verifyPreviewScore(-2, 20);
32
- });
33
-
34
- it('When the user attempts the question partially correct, then penalty points should get deducted from the awarded points', () => {
35
- listOrderingPage.steps.resetQuestionPreview();
36
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 3);
37
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('plant', 0);
38
- listOrderingPage.steps.verifyPreviewScore(-2, 20);
39
- });
40
-
41
- it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
42
- listOrderingPage.steps.switchToEditTab();
43
- listOrderingPage.steps.expandMinimumScoringDropdown();
44
- listOrderingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
45
- listOrderingPage.steps.allotMinimumPoints(3);
46
- listOrderingPage.steps.switchToPreviewTab();
47
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('sprout', 3);
48
- listOrderingPage.steps.clickAndReorderOptionInPreviewTab('flower', 0);
49
- listOrderingPage.steps.verifyPreviewScore(3, 20);
50
- });
51
- });
52
- });