itemengine-cypress-automation 1.0.129 → 1.0.131-updateILCrepo6March-02c78d1.0

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