itemengine-cypress-automation 1.0.129 → 1.0.131-smokeTestFixes6March-aa053ff.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +2 -4
  2. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +2 -4
  3. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +3 -7
  4. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +210 -0
  5. package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +91 -0
  6. package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +392 -0
  7. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -1
  8. package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
  9. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
  10. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -1
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
  12. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +152 -0
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +196 -0
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +195 -0
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +288 -0
  17. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +141 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +245 -0
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +413 -0
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +218 -0
  21. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +245 -0
  22. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +163 -0
  23. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
  24. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
  25. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
  26. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +83 -0
  27. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +653 -0
  28. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +180 -0
  29. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabScoringSection.js +229 -0
  30. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +90 -0
  31. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/switchingCasesBetweenOptionsLayout.js +50 -0
  32. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +204 -0
  33. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +204 -0
  34. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +298 -0
  35. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingPenaltyScoring.js +63 -0
  36. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +111 -0
  37. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +231 -0
  38. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsBasic.js +90 -0
  39. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
  40. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +232 -0
  41. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +231 -0
  42. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsBasic.js +138 -0
  43. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +213 -0
  44. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +186 -0
  45. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
  46. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +161 -0
  47. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +328 -0
  48. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +144 -0
  49. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabScoringSection.js +250 -0
  50. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +75 -0
  51. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  52. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +74 -0
  53. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +188 -0
  54. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +8 -8
  55. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
  56. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +4 -2
  57. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -52
  58. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +3 -211
  59. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +39 -3
  60. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -8
  61. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
  62. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -50
  63. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +325 -0
  64. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +1 -146
  65. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
  66. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +78 -0
  67. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +265 -0
  68. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +75 -0
  69. package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  70. package/cypress/e2e/ILC/FillInTheGapsTextNew/responseAnswersAndAcceptedStudentInput.js +56 -0
  71. package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +40 -2
  72. package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +249 -0
  73. package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +64 -0
  74. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +128 -0
  75. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +889 -0
  76. package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +168 -0
  77. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +203 -0
  78. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +222 -0
  79. package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +349 -0
  80. package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +132 -0
  81. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +35 -7
  82. package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +213 -0
  83. package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +41 -0
  84. package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +377 -0
  85. package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +161 -0
  86. package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +250 -0
  87. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  88. package/cypress/fixtures/theme/ilc.json +6 -1
  89. package/cypress/fixtures/uploadResponseFileType.js +5 -0
  90. package/cypress/pages/audioResponsePage.js +1 -1
  91. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -13
  92. package/cypress/pages/components/customizeSpecialCharacterComponent.js +24 -6
  93. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  94. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +42 -4
  95. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +149 -5
  96. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +954 -77
  97. package/cypress/pages/components/questionInputFieldComponent.js +1 -1
  98. package/cypress/pages/components/questionInstructionsComponent.js +2 -1
  99. package/cypress/pages/contentBlocksPage.js +515 -0
  100. package/cypress/pages/drawingResponsePage.js +2 -2
  101. package/cypress/pages/fillInTheGapsDragAndDropPage.js +359 -3
  102. package/cypress/pages/fillInTheGapsDropdownPage.js +21 -1
  103. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +5 -57
  104. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -24
  105. package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -435
  106. package/cypress/pages/fillInTheGapsTextPage.js +9 -2
  107. package/cypress/pages/graphingPage.js +484 -0
  108. package/cypress/pages/index.js +4 -1
  109. package/cypress/pages/simpleCalculatorPage.js +310 -0
  110. package/cypress/pages/uploadResponsePage.js +260 -92
  111. package/package.json +2 -2
  112. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +0 -242
  113. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +0 -99
  114. package/cypress/e2e/ILC/Passage/passageEditTab.js +0 -241
  115. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +0 -73
  116. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +0 -246
@@ -0,0 +1,231 @@
1
+ import { fillInTheGapsDropdownPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
5
+ const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
6
+ const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answer
7
+ const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
8
+ const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
9
+ const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
10
+
11
+ describe('Create item page - Fill in the gaps with dropdown: Partial different weights', () => {
12
+ before(() => {
13
+ cy.loginAs('admin');
14
+ });
15
+
16
+ describe('Question preview: Auto scored - Partial different weights - When \'Correct answer\' points are greater than \'Alternative answer\' points', () => {
17
+ abortEarlySetup();
18
+ before(() => {
19
+ fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
20
+ cy.barsPreLoaderWait();
21
+ fillInTheGapsDropdownPage.steps.addResponseAreaInQuestionField();
22
+ fillInTheGapsDropdownPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
23
+ fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
24
+ fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
25
+ fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(2, optionsForDropdown3);
26
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
27
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
28
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, correctAnswerArray[2]);
29
+ fillInTheGapsDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 6, 1: 4, 2: 5 });
30
+ fillInTheGapsDropdownPage.steps.addAlternativeAnswerAccordion(1);
31
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, alternateAnswerArray[0]);
32
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, alternateAnswerArray[1]);
33
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, alternateAnswerArray[2]);
34
+ fillInTheGapsDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 7, 1: 1, 2: 5 });
35
+ fillInTheGapsDropdownPage.steps.checkAllowStudentToCheckAnswerCheckbox();
36
+ fillInTheGapsDropdownPage.steps.switchToPreviewTab();
37
+ });
38
+
39
+ it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct answers section should be displayed with correct answers from the correct accordion and respective dropdown numeration', () => {
40
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
41
+ fillInTheGapsDropdownPage.steps.verifyDropdownNumerationPreviewTab();
42
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
43
+ });
44
+
45
+ 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 dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
46
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
47
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
48
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(15, 15);
49
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
50
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
51
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
52
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
53
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
54
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
55
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
56
+ 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 dropdowns, correct/incorrect status message and correct answer section should not be displayed')
57
+ fillInTheGapsDropdownPage.steps.checkAnswer();
58
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
59
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
60
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
61
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
62
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
63
+ });
64
+
65
+ 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 dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
66
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
67
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: alternateAnswerArray[2] }]);
68
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(13, 15);
69
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
70
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
71
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
72
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
73
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
74
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
75
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
76
+ 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 dropdowns, correct/incorrect status message and correct answer section should not be displayed')
77
+ fillInTheGapsDropdownPage.steps.checkAnswer();
78
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
79
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
80
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
81
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
82
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
83
+ });
84
+
85
+ it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded with points of the correct responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
86
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
87
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
88
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(10, 15);
89
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
90
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
91
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
92
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
93
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
94
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
95
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
96
+ 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 dropdowns, correct/incorrect status message and correct answer section should not be displayed')
97
+ fillInTheGapsDropdownPage.steps.checkAnswer();
98
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
99
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
100
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
101
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
102
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
103
+ });
104
+
105
+ it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded with points of and on switching to \'Grading\' view, correct icon should be displayed besides the alternative answer responses, no icon should be displayed beside unattempted dropdown correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
106
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
107
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }]);
108
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(7, 15);
109
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
110
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
111
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
112
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
113
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
114
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
115
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
116
+ 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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message and correct answer section should not be displayed')
117
+ fillInTheGapsDropdownPage.steps.checkAnswer();
118
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
119
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
120
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
121
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
122
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
123
+ });
124
+
125
+ 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 alternative accordion as points from the alternative accordion are more than the correct accordion and on switching to \'Grading\' view, correct icon icon should be displayed besides dropdown with alternative answer responses, incorrect icon should be displayed beside responses from the correct accordion, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
126
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
127
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
128
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(7, 15);
129
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
130
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
131
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
132
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
133
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
134
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
135
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
136
+ 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 icon should be displayed besides dropdown with alternative answer responses, incorrect icon should be displayed beside responses from the correct accordion, correct/incorrect status message and correct answer section should not be displayed')
137
+ fillInTheGapsDropdownPage.steps.checkAnswer();
138
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
139
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
140
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
141
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
142
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
143
+ });
144
+
145
+ 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 correct accordion as points from the correct accordion are more than the alternative accordion and on switching to \'Grading\' view, correct icon icon should be displayed besides dropdown with correct accordion response, 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 along with dropdown numeration should be displayed', () => {
146
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
147
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }]);
148
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(6, 15);
149
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
150
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
151
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
152
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
153
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
154
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
155
+ fillInTheGapsDropdownPage.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 icon should be displayed besides dropdown with correct accordion response, incorrect icon should be displayed beside responses from the alternative accordion, correct/incorrect status message and correct answer section should not be displayed')
157
+ fillInTheGapsDropdownPage.steps.checkAnswer();
158
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
159
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
160
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
161
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
162
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
163
+ });
164
+
165
+ 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 accordion with more points alloted to the response and on switching to \'Grading\' view, correct icon icon should be besides the common response, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
166
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
167
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
168
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(5, 15);
169
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
170
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
171
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
172
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
173
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
174
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
175
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
176
+ cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message and correct answer section should not be displayed')
177
+ fillInTheGapsDropdownPage.steps.checkAnswer();
178
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
179
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
180
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
181
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
182
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
183
+ });
184
+
185
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides all incorrect dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
186
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
187
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
188
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 15);
189
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
190
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
191
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
192
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
193
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
194
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
195
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
196
+ cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon should be displayed besides all incorrect dropdowns, no icon should be displayed beside unattempted dropdown correct/incorrect status message and correct answer section should not be displayed')
197
+ fillInTheGapsDropdownPage.steps.checkAnswer();
198
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
199
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
200
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
201
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
202
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
203
+ });
204
+
205
+ 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\', then points awarded should be of the correct accordion, correct icon icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect answer status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
206
+ cy.log('Pre-step: Switching to Edit tab and allotting points to alternative accordion such that the difference between the points is substantial and the points per response are in decimal')
207
+ fillInTheGapsDropdownPage.steps.switchToEditTab();
208
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, optionsForDropdown3[3]);
209
+ fillInTheGapsDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 1.2, 1: 2.2, 2: 1.6 });
210
+ fillInTheGapsDropdownPage.steps.expandCorrectAnswerAccordion();
211
+ fillInTheGapsDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 11.4, 1: 1.2, 2: 10.4 });
212
+ fillInTheGapsDropdownPage.steps.switchToPreviewTab();
213
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
214
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(10.4, 23);
215
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
216
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
217
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
218
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
219
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
220
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
221
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
222
+ cy.log('When user attempts the question correctly and clicks on the \'Check answer\' button, correct icon icons should be displayed beside the correct responses from the correct accordion, incorrect icons should be displayed beside the incorrectly answered dropdowns, correct/incorrect status message and correct answer section should not be displayed')
223
+ fillInTheGapsDropdownPage.steps.checkAnswer();
224
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
225
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
226
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
227
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
228
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
229
+ });
230
+ });
231
+ });
@@ -0,0 +1,138 @@
1
+ import { fillInTheGapsDropdownPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
5
+ const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
6
+ const correctAnswerArray = ['Flower', 'Leaf'];
7
+ const incorrectAnswerArray = ['Branch', 'Seed'];
8
+
9
+ describe('Create item page - Fill in the gaps with dropdown: Partial equal weights', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ describe('Auto scored - Partial equal weights', () => {
15
+ abortEarlySetup();
16
+ before(() => {
17
+ fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
18
+ cy.barsPreLoaderWait();
19
+ fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
20
+ fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
21
+ fillInTheGapsDropdownPage.steps.allotPoints(10);
22
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
23
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
24
+ fillInTheGapsDropdownPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
25
+ fillInTheGapsDropdownPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
26
+ fillInTheGapsDropdownPage.steps.switchToPreviewTab();
27
+ });
28
+
29
+ it('When the user selects \'Grading\' view without attempting the question, response area numeration should be displayed, correct answers section should be displayed with correct answers and respective response area numeration', () => {
30
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 10);
31
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
32
+ fillInTheGapsDropdownPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
33
+ fillInTheGapsDropdownPage.steps.verifyDropdownNumerationPreviewTab();
34
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
35
+ });
36
+
37
+ 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 dropdowns, correct/incorrect status message should not be displayed and correct answer section with all correct answers along with numeration should be displayed', () => {
38
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
39
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 10);
40
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
41
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
42
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
43
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
44
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
45
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
46
+ cy.log('When the user attempts 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')
47
+ fillInTheGapsDropdownPage.steps.checkAnswer();
48
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
49
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
50
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
51
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
52
+ });
53
+
54
+ it('When the user attempts the question partially correct, then the user should be awarded points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct dropdowns, incorrect icon should be displayed besides incorrect dropdowns, correct/incorrect status message should not be displayed and correct answer section with all correct answers along with numeration should be displayed', () => {
55
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
56
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
57
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(5, 10);
58
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
59
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
60
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
61
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
62
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
63
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
64
+ cy.log('When the user attempts the question partially correct and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, correct/incorrect status message and correct answer section should not be displayed')
65
+ fillInTheGapsDropdownPage.steps.checkAnswer();
66
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
67
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
68
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
69
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
70
+ });
71
+
72
+ it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
73
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
74
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
75
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(10, 10);
76
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
77
+ fillInTheGapsDropdownPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
78
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
79
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
80
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
81
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
82
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
83
+ cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section should not be displayed')
84
+ fillInTheGapsDropdownPage.steps.checkAnswer();
85
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
86
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
87
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
88
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
89
+ });
90
+ });
91
+
92
+ describe('Question preview: Auto scored - Partial equal weights: Minimum scoring', () => {
93
+ abortEarlySetup();
94
+ before(() => {
95
+ fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
96
+ cy.barsPreLoaderWait();
97
+ fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
98
+ fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
99
+ fillInTheGapsDropdownPage.steps.allotPoints(20);
100
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
101
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
102
+ fillInTheGapsDropdownPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
103
+ });
104
+
105
+ 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', () => {
106
+ fillInTheGapsDropdownPage.steps.expandMinimumScoringDropdown();
107
+ fillInTheGapsDropdownPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
108
+ fillInTheGapsDropdownPage.steps.allotMinimumPoints(2);
109
+ fillInTheGapsDropdownPage.steps.switchToPreviewTab();
110
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
111
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(2, 20);
112
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
113
+ });
114
+
115
+ 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', () => {
116
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
117
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }]);
118
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(2, 20);
119
+ });
120
+
121
+ 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', () => {
122
+ fillInTheGapsDropdownPage.steps.switchToEditTab();
123
+ fillInTheGapsDropdownPage.steps.expandMinimumScoringDropdown();
124
+ fillInTheGapsDropdownPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
125
+ fillInTheGapsDropdownPage.steps.allotMinimumPoints(2);
126
+ fillInTheGapsDropdownPage.steps.switchToPreviewTab();
127
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
128
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 20);
129
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
130
+ });
131
+
132
+ 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', () => {
133
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
134
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }]);
135
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(2, 20);
136
+ });
137
+ });
138
+ });
@@ -0,0 +1,213 @@
1
+ import { fillInTheGapsDropdownPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ import utilities from "../../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
7
+ const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
8
+ const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answer
9
+ const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
10
+ const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
11
+ const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
12
+
13
+ describe('Create item page - Fill in the gaps with dropdown: Partial equal weights with alternative answers', () => {
14
+ before(() => {
15
+ cy.loginAs('admin');
16
+ });
17
+
18
+ describe('Question preview: Auto scored - Partial equal weights - When \'Alternative\' points are more than \'Correct\' points', () => {
19
+ abortEarlySetup();
20
+ before(() => {
21
+ fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
22
+ cy.barsPreLoaderWait();
23
+ fillInTheGapsDropdownPage.steps.addResponseAreaInQuestionField();
24
+ fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
25
+ fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
26
+ fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(2, optionsForDropdown3);
27
+ fillInTheGapsDropdownPage.steps.allotPoints(9);
28
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
29
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
30
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, correctAnswerArray[2]);
31
+ fillInTheGapsDropdownPage.steps.addAlternativeAnswerAccordion(1);
32
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, alternateAnswerArray[0]);
33
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, alternateAnswerArray[1]);
34
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, alternateAnswerArray[2]);
35
+ fillInTheGapsDropdownPage.steps.allotPoints(15);
36
+ fillInTheGapsDropdownPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
37
+ fillInTheGapsDropdownPage.steps.checkAllowStudentToCheckAnswerCheckbox();
38
+ fillInTheGapsDropdownPage.steps.switchToPreviewTab();
39
+ });
40
+
41
+ it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct answers section should be displayed with correct answers from the alternative accordion and respective dropdown numeration', () => {
42
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
43
+ fillInTheGapsDropdownPage.steps.verifyDropdownNumerationPreviewTab();
44
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
45
+ });
46
+
47
+ it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points of the correct accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
48
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
49
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
50
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(9, 15);
51
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
52
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
53
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
54
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
55
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
56
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
57
+ fillInTheGapsDropdownPage.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 dropdowns, correct/incorrect status message and correct answer section should not be displayed')
59
+ fillInTheGapsDropdownPage.steps.checkAnswer();
60
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
61
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
62
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
63
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
64
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
65
+ });
66
+
67
+ 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 dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
68
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
69
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: alternateAnswerArray[2] }]);
70
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(15, 15);
71
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
72
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
73
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
74
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
75
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
76
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
77
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
78
+ 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 dropdowns, correct/incorrect status message and correct answer section should not be displayed')
79
+ fillInTheGapsDropdownPage.steps.checkAnswer();
80
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
81
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
82
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
83
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
84
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
85
+ });
86
+
87
+ 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 responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the alternative accordion along with dropdown numeration should be displayed', () => {
88
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
89
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }]);
90
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(3, 15);
91
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
92
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
93
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
94
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
95
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
96
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
97
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
98
+ 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 dropdowns, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
99
+ fillInTheGapsDropdownPage.steps.checkAnswer();
100
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
101
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
102
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
103
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
104
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
105
+ });
106
+
107
+ 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 responses and on switching to \'Grading\' view, correct icon should be displayed besides the dropdowns with alternative accordion responses, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the alternative accordion along with dropdown numeration should be displayed', () => {
108
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
109
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }]);
110
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(5, 15);
111
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
112
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
113
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
114
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
115
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
116
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
117
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
118
+ 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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
119
+ fillInTheGapsDropdownPage.steps.checkAnswer();
120
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
121
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
122
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
123
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
124
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
125
+ });
126
+
127
+ 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 responses and on switching to \'Grading\' view, correct icon should be displayed besides alternate accordion responses, incorrect icon should be displayed beside correct accordion responses, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the alternative accordion along with dropdown numeration should be displayed', () => {
128
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
129
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
130
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(5, 15);
131
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
132
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
133
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
134
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
135
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
136
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
137
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
138
+ 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 alternate accordion responses, incorrect icon should be displayed beside correct accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
139
+ fillInTheGapsDropdownPage.steps.checkAnswer();
140
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
141
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
142
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
143
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
144
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
145
+ });
146
+
147
+ 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 responses and on switching to \'Grading\' view, correct icon should be besides the common response, no icon should be displayed beside unattempted dropdown, \'Your answer is incorrect\' and correct answer section with all correct answers from the alternative accordion along with dropdown numeration should be displayed', () => {
148
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
149
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
150
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(5, 15);
151
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
152
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
153
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
154
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
155
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
156
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
157
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
158
+ cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
159
+ fillInTheGapsDropdownPage.steps.checkAnswer();
160
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
161
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
162
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
163
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
164
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
165
+ });
166
+
167
+ 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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers along with dropdown numeration should be displayed', () => {
168
+ fillInTheGapsDropdownPage.steps.resetQuestionPreview();
169
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
170
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 15);
171
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
172
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
173
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
174
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
175
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
176
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
177
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
178
+ 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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
179
+ fillInTheGapsDropdownPage.steps.checkAnswer();
180
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
181
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
182
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
183
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
184
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
185
+ });
186
+
187
+ 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 alternative accordion overpowers the combined score of the correct accordion answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, correct icons should be displayed for the dropdown with alternative accordion response, incorrect icon should be displayed for the dropdown with correct accordion responses, correct/incorrect answer status message should not be displayed and correct answer container should be displayed with alternative accordion answers', () => {
188
+ cy.log('Pre-step: Switching to Edit tab and allotting points to alternative accordion such that the difference between the points is substantial and the points per response are in decimal')
189
+ fillInTheGapsDropdownPage.steps.switchToEditTab();
190
+ fillInTheGapsDropdownPage.steps.allotPoints(23);
191
+ fillInTheGapsDropdownPage.steps.expandCorrectAnswerAccordion();
192
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, optionsForDropdown3[3]);
193
+ fillInTheGapsDropdownPage.steps.allotPoints(5);
194
+ fillInTheGapsDropdownPage.steps.switchToPreviewTab();
195
+ fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: alternateAnswerArray[2] }]);
196
+ fillInTheGapsDropdownPage.steps.verifyPreviewScore(7.67, 23);
197
+ fillInTheGapsDropdownPage.steps.switchToGradingView();
198
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
199
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
200
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
201
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
202
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
203
+ fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
204
+ cy.log('When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion and clicks on the \'Check answer\' button, correct icons should be displayed for the dropdown with alternative accordion response, incorrect icon should be displayed for the dropdown with correct accordion responses, correct/incorrect answer status message, correct answer container should not be displayed')
205
+ fillInTheGapsDropdownPage.steps.checkAnswer();
206
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
207
+ fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
208
+ fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
209
+ fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
210
+ fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
211
+ });
212
+ });
213
+ });