itemengine-cypress-automation 1.0.244 → 1.0.245

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +1 -1
  2. package/cypress/e2e/ILC/ChartsBar/headerSection.js +1 -16
  3. package/cypress/e2e/ILC/ChartsLine/headerSection.js +1 -18
  4. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +3 -2
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +4 -2
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/draggableOptions.js +4 -2
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/headerSection.js +5 -2
  8. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +2 -0
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +4 -2
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +4 -2
  11. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +2 -2
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +5 -3
  13. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +2 -2
  14. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +2 -2
  15. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +5 -2
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +6 -4
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/draggableOptions.js +1 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +8 -2
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +1 -1
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +2 -3
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +6 -2
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/supportedFileTypes.js +3 -2
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +4 -2
  24. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +2 -3
  25. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +3 -2
  26. package/cypress/e2e/ILC/Graphing/headerSection.js +3 -2
  27. package/cypress/e2e/ILC/GridFill/headerSection.js +3 -1
  28. package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +3 -3
  29. package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +2 -0
  30. package/cypress/e2e/ILC/ImageHighlight/headerSection.js +4 -2
  31. package/cypress/e2e/ILC/ListOrderingDropdown/specifyCorrectAnswerSection.js +8 -6
  32. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +8 -2
  33. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +225 -0
  34. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsBasic.js +89 -0
  35. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +225 -0
  36. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +225 -0
  37. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +405 -0
  38. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +201 -0
  39. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsBasic.js +147 -0
  40. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +171 -0
  41. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +203 -0
  42. package/cypress/e2e/ILC/Matching/clickAndDrop.js +5 -3
  43. package/cypress/e2e/ILC/Matching/headerSection.js +10 -2
  44. package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +17 -4
  45. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneBorderStyleProperties.js +113 -0
  46. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneProperties.js +251 -0
  47. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationLayoutProperties.js +227 -0
  48. package/cypress/e2e/ILC/MultipleSelection/headerSection.js +5 -2
  49. package/cypress/e2e/ILC/MultipleSelectionGridNew/headerSection.js +9 -2
  50. package/cypress/e2e/ILC/NumberLine/headerSection.js +3 -2
  51. package/cypress/e2e/ILC/NumberLineLabel/headerSection.js +4 -3
  52. package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +4 -2
  53. package/cypress/e2e/ILC/SingleSelection/headerSection.js +5 -2
  54. package/cypress/e2e/ILC/SingleSelectionGridNew/headerSection.js +9 -2
  55. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +1 -1
  56. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -1
  57. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +1 -1
  58. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  59. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +1 -1
  60. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
  61. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -4
  62. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  63. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +1 -1
  64. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
  65. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +2 -2
  66. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +3 -3
  67. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +4 -4
  68. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +6 -6
  69. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +5 -5
  70. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +1 -1
  71. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +1 -1
  72. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +1 -1
  73. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +1 -1
  74. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +10 -10
  75. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +3 -3
  76. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +1 -1
  77. package/cypress/e2e/ILC/TextSelection/headerSection.js +5 -2
  78. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +2 -1
  79. package/cypress/e2e/ILC/ToolAudioPlayerNew/headerSection.js +2 -3
  80. package/cypress/e2e/ILC/UploadResponse/editTabBasicSection.js +2 -1
  81. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  82. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +11 -0
  83. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +27 -9
  84. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +3 -2
  85. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +2 -1
  86. package/cypress/pages/components/optionsWrapperComponent.js +2 -2
  87. package/cypress/pages/components/scoringSectionBaseEditTab.js +2 -2
  88. package/cypress/pages/createItemPage.js +1 -1
  89. package/cypress/pages/dialogBoxBase.js +7 -13
  90. package/cypress/pages/dragAndDropIntoCategoriesPage.js +5 -4
  91. package/cypress/pages/graphingPage.js +7 -4
  92. package/cypress/pages/gridFillPage.js +16 -15
  93. package/cypress/pages/matchingPage.js +613 -6
  94. package/cypress/pages/multipleSelectionGridPage.js +5 -4
  95. package/cypress/pages/multipleSelectionPage.js +5 -4
  96. package/cypress/pages/numberLinePage.js +13 -2
  97. package/cypress/pages/shortTextResponsePage.js +3 -2
  98. package/cypress/pages/textEntryMathPage.js +7 -0
  99. package/package.json +1 -1
@@ -0,0 +1,147 @@
1
+ import { listOrderingPage } from "../../../../pages/listOrderingPage";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+ let options = ['sprout', 'plant', 'flower', 'seed'];
4
+ let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
5
+
6
+ describe('Create Item page - List ordering: Partial equal weights', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Question Preview: AutoScored - Partial equal weights', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
15
+ cy.barsPreLoaderWait();
16
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
17
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
18
+ listOrderingPage.steps.allotPoints(20);
19
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
20
+ listOrderingPage.steps.addInputToOptionsInputField(options);
21
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
22
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
23
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
24
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
25
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
26
+ listOrderingPage.steps.switchToPreviewTab();
27
+ });
28
+
29
+ it('When the user switches to the \'Grading view\' without attempting the question, then correct/incorrect icons should be displayed for the default list order, correct/incorrect status message should not be displayed and correct answers section should be displayed with correct answers from the correct accordion', () => {
30
+ listOrderingPage.steps.verifyPreviewScore(0, 20);
31
+ listOrderingPage.steps.switchToGradingView();
32
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
33
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
34
+ });
35
+
36
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, correct/incorrect status message should not be displayed and correct answers section should be displayed with correct answers from the correct accordion', () => {
37
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
38
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
39
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
40
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
41
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['flower', 'plant', 'seed', 'sprout']);
42
+ listOrderingPage.steps.verifyPreviewScore(0, 20);
43
+ listOrderingPage.steps.switchToGradingView();
44
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
45
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
46
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
47
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
48
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
49
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
50
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
51
+ });
52
+
53
+ 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 answer responses, incorrect icon should be displayed besides incorrect answer response, correct/incorrect status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
54
+ listOrderingPage.steps.resetQuestionPreview();
55
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
56
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
57
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
58
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
59
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['plant', 'sprout', 'seed', 'flower']);
60
+ listOrderingPage.steps.switchToGradingView();
61
+ listOrderingPage.steps.verifyPreviewScore(10, 20);
62
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
63
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
64
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
65
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
66
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
67
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
68
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
69
+ });
70
+
71
+ 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', () => {
72
+ listOrderingPage.steps.resetQuestionPreview();
73
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
74
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
75
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
76
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
77
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
78
+ listOrderingPage.steps.verifyPreviewScore(20, 20);
79
+ listOrderingPage.steps.switchToGradingView()
80
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
81
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
82
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
83
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
84
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
85
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
86
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
87
+ });
88
+ });
89
+
90
+ describe('Question preview: Auto scored - Partial equal weights: Minimum scoring', () => {
91
+ abortEarlySetup();
92
+ before(() => {
93
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
94
+ cy.barsPreLoaderWait();
95
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
96
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
97
+ listOrderingPage.steps.allotPoints(20);
98
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
99
+ listOrderingPage.steps.addInputToOptionsInputField(options);
100
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
101
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
102
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
103
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
104
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
105
+ });
106
+
107
+ 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', () => {
108
+ listOrderingPage.steps.expandMinimumScoringDropdown();
109
+ listOrderingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
110
+ listOrderingPage.steps.allotMinimumPoints(2);
111
+ listOrderingPage.steps.switchToPreviewTab();
112
+ listOrderingPage.steps.switchToGradingView();
113
+ listOrderingPage.steps.verifyPreviewScore(2, 20);
114
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
115
+ });
116
+
117
+ 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', () => {
118
+ listOrderingPage.steps.resetQuestionPreview();
119
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
120
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
121
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
122
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
123
+ listOrderingPage.steps.verifyPreviewScore(2, 20);
124
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
125
+ });
126
+
127
+ 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 considering the default list order as an incorrect attempt the user should be awarded with minimum points', () => {
128
+ listOrderingPage.steps.switchToEditTab();
129
+ listOrderingPage.steps.expandMinimumScoringDropdown();
130
+ listOrderingPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
131
+ listOrderingPage.steps.allotMinimumPoints(2);
132
+ listOrderingPage.steps.switchToPreviewTab();
133
+ listOrderingPage.steps.switchToGradingView();
134
+ listOrderingPage.steps.verifyPreviewScore(0, 20);
135
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
136
+ });
137
+
138
+ 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', () => {
139
+ listOrderingPage.steps.resetQuestionPreview();
140
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
141
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
142
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
143
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
144
+ listOrderingPage.steps.verifyPreviewScore(2, 20);
145
+ });
146
+ })
147
+ });
@@ -0,0 +1,171 @@
1
+ import { listOrderingPage } from "../../../../pages/listOrderingPage";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ let options = ['sprout', 'plant', 'flower', 'seed'];
5
+ let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
6
+ let alternateCorrectAnswerArray = ['seed', 'flower', 'sprout', 'plant'];
7
+
8
+ describe('Create Item page - List ordering: Partial equal weights scoring with alternative answer - When alternative answer points are equal to correct answer points', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Question Preview: AutoScored - Partial equal weights with alternative answer: When alternative answer points are equal to correct answer points', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
17
+ cy.barsPreLoaderWait();
18
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
19
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
20
+ listOrderingPage.steps.addInputToOptionsInputField(options);
21
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
22
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
23
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
24
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
25
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
26
+ listOrderingPage.steps.allotPoints(20);
27
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
28
+ listOrderingPage.steps.addAlternativeAnswerAccordion(1);
29
+ listOrderingPage.steps.allotPoints(20);
30
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
31
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
32
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
33
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
34
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(alternateCorrectAnswerArray);
35
+ listOrderingPage.steps.switchToPreviewTab();
36
+ });
37
+
38
+ it('When the user switches to the \'Grading view\' without attempting the question, then correct/incorrect icons should not be displayed for the default list order, correct/incorrect status message should not be displayed and correct answer section should be displayed with correct answers from the correct accordion', () => {
39
+ listOrderingPage.steps.verifyPreviewScore(0, 20);
40
+ listOrderingPage.steps.switchToGradingView();
41
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
42
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(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 responses, correct/incorrect status message and correct answer section should not be displayed', () => {
46
+ listOrderingPage.steps.resetQuestionPreview();
47
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
48
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
49
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
50
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
51
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
52
+ listOrderingPage.steps.verifyPreviewScore(20, 20);
53
+ listOrderingPage.steps.switchToGradingView();
54
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
55
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
56
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
57
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
58
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
59
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
60
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
61
+ });
62
+
63
+ it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
64
+ listOrderingPage.steps.resetQuestionPreview();
65
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
66
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
67
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
68
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
69
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(alternateCorrectAnswerArray);
70
+ listOrderingPage.steps.verifyPreviewScore(20, 20);
71
+ listOrderingPage.steps.switchToGradingView();
72
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
73
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
74
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
75
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
76
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
77
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
78
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
79
+ });
80
+
81
+ it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section with all correct answers from the correct accordion should be displayed', () => {
82
+ listOrderingPage.steps.resetQuestionPreview();
83
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
84
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
85
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
86
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
87
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['flower', 'sprout', 'plant', 'seed']);
88
+ listOrderingPage.steps.verifyPreviewScore(10, 20);
89
+ listOrderingPage.steps.switchToGradingView();
90
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
91
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
92
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
93
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
94
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
95
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
96
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
97
+ });
98
+
99
+ it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section with all correct answers from the correct accordion should be displayed', () => {
100
+ listOrderingPage.steps.resetQuestionPreview();
101
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
102
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
103
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
104
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
105
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['plant', 'flower', 'sprout', 'seed']);
106
+ listOrderingPage.steps.verifyPreviewScore(10, 20);
107
+ listOrderingPage.steps.switchToGradingView();
108
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
109
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
110
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
111
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
112
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
113
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
114
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
115
+ });
116
+
117
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides response field with correct answer responses, incorrect icon should be displayed beside responses from the alternative accordion, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
118
+ listOrderingPage.steps.resetQuestionPreview();
119
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
120
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
121
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
122
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
123
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['seed', 'sprout', 'flower', 'plant']);
124
+ listOrderingPage.steps.verifyPreviewScore(10, 20);
125
+ listOrderingPage.steps.switchToGradingView();
126
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
127
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
128
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
129
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
130
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
131
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
132
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
133
+ });
134
+
135
+ it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be besides the common response, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
136
+ listOrderingPage.steps.resetQuestionPreview();
137
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
138
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
139
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
140
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
141
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['seed', 'plant', 'flower', 'sprout']);
142
+ listOrderingPage.steps.verifyPreviewScore(5, 20);
143
+ listOrderingPage.steps.switchToGradingView();
144
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
145
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
146
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
147
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
148
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
149
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
150
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
151
+ });
152
+
153
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, correct/incorrect status message and correct answer section with all correct answers should be displayed', () => {
154
+ listOrderingPage.steps.resetQuestionPreview();
155
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
156
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
157
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
158
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
159
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['flower', 'plant', 'seed', 'sprout']);
160
+ listOrderingPage.steps.verifyPreviewScore(0, 20);
161
+ listOrderingPage.steps.switchToGradingView();
162
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
163
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
164
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
165
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
166
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
167
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
168
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
169
+ });
170
+ });
171
+ });
@@ -0,0 +1,203 @@
1
+ import { listOrderingPage } from "../../../../pages/listOrderingPage";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ let options = ['sprout', 'plant', 'flower', 'seed'];
5
+ let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
6
+ let alternateCorrectAnswerArray = ['seed', 'flower', 'sprout', 'plant'];
7
+
8
+ describe('Create Item page - List ordering: Partial equal weights scoring with alternative answer - When correct answer points are more than alternative answer points', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Question Preview: AutoScored - Partial equal weights with alternative answer: When correct answer points are more than alternative answer points', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
17
+ cy.barsPreLoaderWait();
18
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
19
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
20
+ listOrderingPage.steps.addInputToOptionsInputField(options);
21
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
22
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
23
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
24
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
25
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
26
+ listOrderingPage.steps.allotPoints(20);
27
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
28
+ listOrderingPage.steps.addAlternativeAnswerAccordion(1);
29
+ listOrderingPage.steps.allotPoints(12);
30
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
31
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
32
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
33
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
34
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(alternateCorrectAnswerArray);
35
+ //listOrderingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
36
+ listOrderingPage.steps.switchToPreviewTab();
37
+ });
38
+
39
+ it('When the user switches to the \'Grading view\' without attempting the question, then correct/incorrect icons should not be displayed for the default list order, correct/incorrect status message should not be displayed and correct answer section should be displayed with correct answers from the correct accordion', () => {
40
+ listOrderingPage.steps.verifyPreviewScore(0, 20);
41
+ listOrderingPage.steps.switchToGradingView();
42
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
43
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
44
+ });
45
+
46
+ it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
47
+ listOrderingPage.steps.resetQuestionPreview();
48
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
49
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
50
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
51
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
52
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
53
+ listOrderingPage.steps.verifyPreviewScore(20, 20);
54
+ listOrderingPage.steps.switchToGradingView();
55
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
56
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
57
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
58
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
59
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
60
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
61
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
62
+ });
63
+
64
+ it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
65
+ listOrderingPage.steps.resetQuestionPreview();
66
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
67
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
68
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
69
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
70
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(alternateCorrectAnswerArray);
71
+ listOrderingPage.steps.verifyPreviewScore(12, 20);
72
+ listOrderingPage.steps.switchToGradingView();
73
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
74
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
75
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
76
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
77
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
78
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
79
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
80
+ });
81
+
82
+ it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section with all correct answers from the correct accordion should be displayed', () => {
83
+ listOrderingPage.steps.resetQuestionPreview();
84
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
85
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
86
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
87
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
88
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['flower', 'sprout', 'plant', 'seed']);
89
+ listOrderingPage.steps.verifyPreviewScore(10, 20);
90
+ listOrderingPage.steps.switchToGradingView();
91
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
92
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
93
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
94
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
95
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
96
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
97
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
98
+ });
99
+
100
+ it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, correct/incorrect status message and correct answer section with all correct answers from the correct accordion should be displayed', () => {
101
+ listOrderingPage.steps.resetQuestionPreview();
102
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
103
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
104
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
105
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
106
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['plant', 'flower', 'sprout', 'seed']);
107
+ listOrderingPage.steps.verifyPreviewScore(6, 20);
108
+ listOrderingPage.steps.switchToGradingView();
109
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
110
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
111
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
112
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
113
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
114
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
115
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
116
+ });
117
+
118
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides response field with correct answer responses, incorrect icon should be displayed beside responses from the alternative accordion, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
119
+ listOrderingPage.steps.resetQuestionPreview();
120
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
121
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
122
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
123
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
124
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['seed', 'sprout', 'flower', 'plant']);
125
+ listOrderingPage.steps.verifyPreviewScore(10, 20);
126
+ listOrderingPage.steps.switchToGradingView();
127
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
128
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
129
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
130
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
131
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
132
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
133
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
134
+ });
135
+
136
+ it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be besides the common response, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
137
+ listOrderingPage.steps.resetQuestionPreview();
138
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
139
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
140
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
141
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
142
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['seed', 'plant', 'flower', 'sprout']);
143
+ listOrderingPage.steps.verifyPreviewScore(5, 20);
144
+ listOrderingPage.steps.switchToGradingView();
145
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
146
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
147
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
148
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
149
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
150
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
151
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
152
+ });
153
+
154
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, correct/incorrect status message and correct answer section with all correct answers should be displayed', () => {
155
+ listOrderingPage.steps.resetQuestionPreview();
156
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
157
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
158
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
159
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
160
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['flower', 'plant', 'seed', 'sprout']);
161
+ listOrderingPage.steps.verifyPreviewScore(0, 20);
162
+ listOrderingPage.steps.switchToGradingView();
163
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
164
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
165
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
166
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
167
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
168
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
169
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
170
+ });
171
+
172
+ it('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternative accordion answers then on switching to the \'Grading view\', the points awarded should be of the correct accordion, correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect status message should not be displayed and correct answer section should be displayed with answers from the correct accordion', () => {
173
+ cy.log('Pre-step: Switching to Edit tab and allotting points to correct and alternative accordion such that the difference between the points is substantial')
174
+ listOrderingPage.steps.switchToEditTab();
175
+ listOrderingPage.steps.deleteAlternativeAnswerAccordion(0);
176
+ listOrderingPage.steps.addAlternativeAnswerAccordion(1);
177
+ listOrderingPage.steps.allotPoints(10);
178
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
179
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
180
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
181
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
182
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['plant', 'flower', 'sprout', 'seed']);
183
+ listOrderingPage.steps.expandCorrectAnswerAccordion();
184
+ listOrderingPage.steps.allotPoints(50);
185
+ listOrderingPage.steps.switchToPreviewTab();
186
+
187
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
188
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
189
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
190
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
191
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['seed', 'flower', 'sprout', 'plant']);
192
+ listOrderingPage.steps.verifyPreviewScore(12.5, 50);
193
+ listOrderingPage.steps.switchToGradingView();
194
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
195
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
196
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
197
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
198
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
199
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
200
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
201
+ });
202
+ });
203
+ });
@@ -130,10 +130,11 @@ describe('Create Item Page: Matching: Click and drop cases for \'Standard\' and
130
130
  matchingPage.steps.verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection();
131
131
  });
132
132
 
133
- it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container and \'Error: Please set a correct answer\' error message should not be displayed', () => {
133
+ it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container and \'Error: Please set a correct answer\' error message should be displayed', () => {
134
134
  matchingPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
135
135
  matchingPage.steps.verifyDraggableOptionInOptionsContainerSpecifyCorrectAnswerSection(['Petals', 'Flower', 'Stem']);
136
- matchingPage.steps.verifyErrorMessageIsNotDisplayed();
136
+ utilities.verifyInnerText(matchingPage.errorMessage(), 'Error: Please set a correct answer.');
137
+ utilities.verifyElementVisibilityState(matchingPage.errorMessage(), 'visible');
137
138
  });
138
139
 
139
140
 
@@ -441,7 +442,8 @@ describe('Create Item Page: Matching: Click and drop cases for \'Standard\' and
441
442
  matchingPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Flower');
442
443
  matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, groupedOptions);
443
444
  matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, groupedOptionsTwo);
444
- matchingPage.steps.verifyErrorMessageIsNotDisplayed();
445
+ utilities.verifyInnerText(matchingPage.errorMessage(), 'Error: Please set a correct answer.');
446
+ utilities.verifyElementVisibilityState(matchingPage.errorMessage(), 'visible');
445
447
  });
446
448
 
447
449
  it('When the user fills a dropzone, the dropzone should get filled with the option and the \'Error: Please set a correct answer\' error message should disappear', () => {
@@ -44,11 +44,19 @@ describe('Create item page - Matching : Header section and Saving question', ()
44
44
  });
45
45
 
46
46
  describe('Validation error messages', () => {
47
- dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter all prompt values', 'Please enter all option values', 'Please set points']);
47
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
48
48
 
49
49
  it('Validation error messages should be displayed below required input fields', () => {
50
50
  matchingPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
51
- matchingPage.steps.verifyWarningIconOnRequiredFields(['Please enter all prompt values', 'Please enter all option values', 'Please set points']);
51
+ matchingPage.steps.verifyPromptInputFieldErrorMessage(0);
52
+ matchingPage.steps.verifyPromptInputFieldErrorMessage(1);
53
+ matchingPage.steps.verifyPromptInputFieldErrorMessage(2);
54
+ matchingPage.steps.verifyOptionsInputFieldErrorMessage(3);
55
+ matchingPage.steps.verifyOptionsInputFieldErrorMessage(4);
56
+ matchingPage.steps.verifyOptionsInputFieldErrorMessage(5);
57
+ matchingPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
58
+ matchingPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
59
+ matchingPage.steps.verifySpecifyCorrectAnswerErrorMessage();
52
60
  });
53
61
 
54
62
  it('Validation error messages should disappear when required input fields are filled', () => {
@@ -56,7 +56,7 @@ describe('Create Item page - Matching : Question Instructions and prompt section
56
56
  'font-size': css.fontSize.normal,
57
57
  'font-weight': css.fontWeight.semibold
58
58
  })
59
- utilities.getNthElement( matchingPage.promptInputFieldWrapper(),0)
59
+ utilities.getNthElement(matchingPage.promptInputFieldWrapper(), 0)
60
60
  .within(() => {
61
61
  utilities.verifyCSS(matchingPage.dragHandleButton(), {
62
62
  'color': css.color.secondaryBtnActive,
@@ -76,7 +76,7 @@ describe('Create Item page - Matching : Question Instructions and prompt section
76
76
  'font-size': css.fontSize.normal,
77
77
  'font-weight': css.fontWeight.semibold
78
78
  });
79
- utilities.verifyCSS(utilities.getNthElement( matchingPage.promptInputField(),0), {
79
+ utilities.verifyCSS(utilities.getNthElement(matchingPage.promptInputField(), 0), {
80
80
  'color': css.color.text,
81
81
  'font-size': css.fontSize.default,
82
82
  'font-weight': css.fontWeight.regular
@@ -116,9 +116,22 @@ describe('Create Item page - Matching : Question Instructions and prompt section
116
116
  matchingPage.steps.verifyPromptContents(2);
117
117
  });
118
118
 
119
- it('When user focus in and out of any of the \'Prompt\' input field without typing anything, then an error message \'Error: Prompt is required\' error message should disappear', () => {
119
+ it('When user focus in and out of any of the \'Prompt\' input field without typing anything, then an error message \'Error: Prompt is required\' error message should be displayed', () => {
120
120
  matchingPage.steps.focusInAndFocusOutOfPromptInputField(1);
121
- matchingPage.steps.verifyErrorMessageIsNotDisplayed();
121
+ utilities.verifyInnerText(matchingPage.errorMessage(), 'Error: Prompt is required');
122
+ utilities.verifyElementVisibilityState(matchingPage.errorMessage(), 'visible');
123
+ });
124
+
125
+ it('CSS of error message', { tags: 'css' }, () => {
126
+ utilities.verifyCSS(matchingPage.errorMessage(), {
127
+ 'color': css.color.errorText,
128
+ 'font-size': css.fontSize.small,
129
+ 'font-weight': css.fontWeight.regular
130
+ });
131
+ });
132
+
133
+ it('Accessibility of error message', { tags: 'a11y' }, () => {
134
+ cy.checkAccessibility(matchingPage.errorMessage());
122
135
  });
123
136
 
124
137
  it('When user enters text in question prompt input field then error message should disappear', () => {