itemengine-cypress-automation 1.0.247-06SeptUpdates-b1623d7.0 → 1.0.248-23rdSeptUpdates-8103a8f.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  2. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
  3. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +349 -0
  4. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +348 -0
  5. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +415 -0
  6. package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingPenaltyScoring.js +54 -0
  7. package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightBasic.js +254 -0
  8. package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightBasic.js +255 -0
  9. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +4 -0
  10. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +2 -0
  11. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +3 -0
  12. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +4 -0
  13. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
  14. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +2 -0
  15. package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +2 -0
  16. package/cypress/e2e/ILC/ImageHighlight/toolsFunctionalityEditTab.js +2 -2
  17. package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +270 -0
  18. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsBasic.js +95 -0
  19. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +236 -0
  20. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialEqualWeightsBasic.js +150 -0
  21. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/setPointsPopup.js +88 -0
  22. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +97 -0
  23. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/studentViewSettings.js +134 -0
  24. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/additionalSettings.js +131 -0
  25. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabBasicSection.js +167 -0
  26. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +202 -0
  27. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/headerSection.js +76 -0
  28. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/manuallyAndNonScoredEditTab.js +72 -0
  29. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/minimumScoringPenaltyPointsAndRoundingDropdown.js +197 -0
  30. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/optionsOrientationSection.js +180 -0
  31. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +95 -0
  32. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/studentViewSettings.js +130 -0
  33. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
  34. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionsPanel.js +121 -0
  35. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneConnectorStyle.js +68 -0
  36. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionAlignment.js +71 -0
  37. package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionPlacement.js +64 -0
  38. package/cypress/e2e/ILC/MatchingDropdown/styleAndLayoutCustomization.js +270 -0
  39. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
  40. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
  41. package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +7 -7
  42. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
  43. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
  44. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
  45. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -4
  46. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
  47. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
  48. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
  49. package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +4 -4
  50. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
  51. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +272 -0
  52. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +6 -6
  53. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  54. package/cypress/pages/audioPlayerPage.js +4 -4
  55. package/cypress/pages/audioResponsePage.js +9 -1
  56. package/cypress/pages/chartsBarPage.js +3 -3
  57. package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +51 -0
  58. package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
  59. package/cypress/pages/components/index.js +1 -10
  60. package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +604 -0
  61. package/cypress/pages/components/optionsWrapperComponent.js +1 -1
  62. package/cypress/pages/components/setPointsPopupBase.js +6 -6
  63. package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
  64. package/cypress/pages/essayResponseBasicPage.js +4 -4
  65. package/cypress/pages/essayResponseMathPage.js +4 -4
  66. package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -2
  67. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
  68. package/cypress/pages/index.js +0 -1
  69. package/cypress/pages/itemPreviewPage.js +1 -2
  70. package/cypress/pages/itemPreviewSettingsPage.js +3 -3
  71. package/cypress/pages/listOrderingPage.js +384 -10
  72. package/cypress/pages/matchingPage.js +512 -13
  73. package/cypress/pages/multipleSelectionPage.js +2 -2
  74. package/cypress/pages/numberLineLabelPage.js +3 -3
  75. package/cypress/pages/shortTextResponsePage.js +0 -37
  76. package/cypress/pages/singleSelectionPage.js +2 -2
  77. package/cypress/pages/textEntryMathPage.js +41 -9
  78. package/cypress/pages/textSelectionPage.js +2 -2
  79. package/cypress/pages/uploadResponsePage.js +2 -3
  80. package/cypress/pages/videoResponsePage.js +9 -2
  81. package/package.json +1 -1
  82. package/cypress/fixtures/specialAndMathCharacters.js +0 -120
  83. package/cypress/pages/components/autoScoredAdditionalSettings.js +0 -183
  84. package/cypress/pages/components/autoScoredPreviewBase.js +0 -92
  85. package/cypress/pages/components/autoScoredScoringSection.js +0 -199
  86. package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +0 -377
  87. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +0 -297
  88. package/cypress/pages/components/autoScoredStudentViewSettingsForPredefinedOptions.js +0 -84
  89. package/cypress/pages/components/listSortingAndOrderingBase.js +0 -401
  90. package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +0 -91
  91. package/cypress/pages/components/scoringSectionBase.js +0 -354
  92. package/cypress/pages/components/specialAndCustomSpecialCharactersComponent.js +0 -80
  93. package/cypress/pages/components/specialCharactersFlyoutComponent.js +0 -59
  94. package/cypress/pages/listSortingPage.js +0 -1198
@@ -106,6 +106,8 @@ describe('Create question page - Essay Response - Basic: Customize formatting op
106
106
  it('When the user deselects an option from \'Customize formatting options (for student player)\' section, then that option should not be displayed in the preview tab toolbar.', () => {
107
107
  cy.log('Switching to edit tab')
108
108
  essayResponseBasicPage.steps.switchToEditTab();
109
+ //Need to remove this once https://redmine.zeuslearning.com/issues/577356 is resolved
110
+ essayResponseBasicPage.steps.expandCustomizeFormattingOptionsAccordion();
109
111
  essayResponseBasicPage.steps.deselectCustomizedFormattingOption(['Bold']);
110
112
  essayResponseBasicPage.steps.switchToPreviewTab();
111
113
  utilities.verifyElementVisibilityState(essayResponseBasicPage.previewTabToolbarOption('Bold'), 'notExist');
@@ -161,10 +161,10 @@ describe('Create Item page - Highlight image: Tools functionality edit tab', ()
161
161
  imageHighlightPage.steps.verifyHighlightRegionsInSpecifyCorrectAnswerSection(1, leafHighlightRegion);
162
162
  });
163
163
 
164
- it('When the user clicks on the \'Clear all\' tool, then a popup should be displayed with \'Are you sure you want to clear all highlights from the canvas?\' with \'Delete\' and \'Cancel\' buttons', () => {
164
+ it('When the user clicks on the \'Clear all\' tool, then a popup should be displayed with \'Are you sure you want to clear the canvas?\' with \'Delete\' and \'Cancel\' buttons', () => {
165
165
  imageHighlightPage.steps.clickOnClearAllTool();
166
166
  utilities.verifyInnerText(imageHighlightPage.clearAllPopupHeading(), 'Clear all');
167
- utilities.verifyInnerText(imageHighlightPage.clearAllPopupDescription(), 'Are you sure you want to clear all highlights from the canvas?');
167
+ utilities.verifyInnerText(imageHighlightPage.clearAllPopupDescription(), 'Are you sure you want to clear the canvas?');
168
168
  utilities.verifyInnerText(imageHighlightPage.clearAllButton(), 'Clear all');
169
169
  utilities.verifyInnerText(imageHighlightPage.cancelButton(), 'Cancel');
170
170
  });
@@ -0,0 +1,270 @@
1
+ import { listOrderingPage } from "../../../pages";
2
+ import { colorPopupComponent } from "../../../pages/components";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+
6
+
7
+ describe('Create item page - List ordering: Style and layout Component', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Style and layout Component - Common Components', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
16
+ cy.barsPreLoaderWait();
17
+ });
18
+
19
+ listOrderingPage.tests.verifyStyleAndLayoutCustomizationAccordionProperties();
20
+
21
+ listOrderingPage.tests.verifyFillColorSectionContents();
22
+
23
+ listOrderingPage.tests.verifyBorderColorSectionContents();
24
+
25
+ listOrderingPage.tests.verifyBorderStyleSectionContents('Solid');
26
+
27
+ listOrderingPage.tests.verifyFillColorTooltips();
28
+
29
+ listOrderingPage.tests.verifyBorderColorTooltips();
30
+
31
+ it('When user clicks on edit color then color pop up panel will be visible', () => {
32
+ listOrderingPage.steps.editColor(0);
33
+ colorPopupComponent.steps.verifyColorPopupIsDisplayed();
34
+ colorPopupComponent.tests.verifyColorPopupSelectColorTitle();
35
+ colorPopupComponent.tests.verifySaturationAndOpacityGradientPalette('rgb(255, 255, 255)');
36
+ colorPopupComponent.tests.verifyColorHuePaletteAndHexInputField('rgb(255, 0, 0)', '#ffffff');
37
+ colorPopupComponent.tests.verifyColorPopupFunctionality();
38
+ });
39
+
40
+ it('When the user moves the color picker in the color saturation palette, color in the selected color block and the hex code should change, color in the hue color palette and the opacity value should not change', () => {
41
+ colorPopupComponent.steps.clickInColorSaturationPalette();
42
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(121, 60, 60)');
43
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(119, 60, 60)');
44
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
45
+ colorPopupComponent.steps.verifyHexValue('#793c3c');
46
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(119, 60, 60)');
47
+ });
48
+
49
+ it('When the user moves the color picker in the color hue palette, color in the selected color block, the hex code and the saturation color palette should change and the opacity value should not change', () => {
50
+ colorPopupComponent.steps.clickInColorHuePalette();
51
+ colorPopupComponent.steps.verifySelectedColorBlock('rgb(60, 121, 121)');
52
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(0, 255, 255)');
53
+ colorPopupComponent.steps.verifyHexValue('#3c7979');
54
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(60, 119, 119)');
55
+ });
56
+
57
+ it('When the user changes the color using hex code, the color in color saturation palette and color hue palette should change and the opacity value should not change', () => {
58
+ colorPopupComponent.steps.addInputToHexInputField('#ff0000');
59
+ colorPopupComponent.steps.verifyHexValue('#ff0000');
60
+ colorPopupComponent.steps.verifySaturationPaletteColor('rgb(255, 0, 0)');
61
+ colorPopupComponent.steps.verifyHuePaletteColor('rgb(255, 0, 0)');
62
+ colorPopupComponent.steps.verifyOpacityGradientPaletteColor('rgb(255, 0, 0)');
63
+ });
64
+
65
+ });
66
+
67
+ describe('Style and Layout customization accordion: Common Component - Edit Tab', () => {
68
+ abortEarlySetup();
69
+ before(() => {
70
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
71
+ cy.barsPreLoaderWait();
72
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
73
+ });
74
+
75
+ listOrderingPage.tests.verifyFillColorFunctionalityEditTab("SameList");
76
+
77
+ listOrderingPage.tests.verifyBorderColorFunctionalityEditTab("SameList");
78
+
79
+ listOrderingPage.tests.verifyBorderStyleFunctionalityEditTab("SameList");
80
+ });
81
+
82
+ describe('Style and Layout customization accordion: Common Component - Preview Tab', () => {
83
+ abortEarlySetup();
84
+ before(() => {
85
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
86
+ cy.barsPreLoaderWait();
87
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
88
+ });
89
+
90
+ listOrderingPage.tests.verifyFillColorFunctionalityPreviewTab("SameList");
91
+
92
+ listOrderingPage.tests.verifyBorderColorFunctionalityPreviewTab("SameList");
93
+
94
+ listOrderingPage.tests.verifyBorderStyleFunctionalityPreviewTab("SameList");
95
+ });
96
+
97
+ describe('Style and Layout customization accordion: Options - Drag handle icon - Edit Tab', () => {
98
+ abortEarlySetup();
99
+ before(() => {
100
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
101
+ cy.barsPreLoaderWait();
102
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
103
+ });
104
+
105
+ it('\'Options\' label will be displayed', () => {
106
+ utilities.verifyElementVisibilityState(listOrderingPage.optionsLabel(), 'visible');
107
+ utilities.verifyInnerText(listOrderingPage.optionsLabel(), 'Options');
108
+ });
109
+
110
+ it('Drag handle icon label will be displayed with 3 options and by default the first option will be selected draggable options', () => {
111
+ utilities.verifyInnerText(listOrderingPage.dragHandleIconLabel(), 'Drag handle icon');
112
+ utilities.verifyElementCount(listOrderingPage.dragHandleOptions(), 3);
113
+ listOrderingPage.steps.verifyDragHandleOptionSelected(0);
114
+ });
115
+
116
+ it('By default, the default selected drag handle will be displayed in the specify correct answer section draggable options', () => {
117
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('drag icon', "SameList");
118
+ });
119
+
120
+ it('When user selects arrows drag handle icon then arrow icons will be displayed the specify correct answer section draggable options', () => {
121
+ listOrderingPage.steps.selectDragHandleOption(1);
122
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('arrow icon', "SameList");
123
+ });
124
+
125
+ it('When user selects none option then drag handles will not be displayed for the specify correct answer section draggable options', () => {
126
+ listOrderingPage.steps.selectDragHandleOption(2);
127
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('none', "SameList");
128
+ });
129
+ });
130
+
131
+ describe('Style and Layout customization accordion: Options - Drag handle icon - Preview Tab', () => {
132
+ abortEarlySetup();
133
+ before(() => {
134
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
135
+ cy.barsPreLoaderWait();
136
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
137
+ });
138
+
139
+ it('By default, the default selected drag handle will be displayed in the preview tab', () => {
140
+ listOrderingPage.steps.switchToPreviewTab();
141
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('drag icon', "SameList");
142
+ });
143
+
144
+ it('When user selects arrows drag handle icon then arrow icons will be displayed in preview tab', () => {
145
+ listOrderingPage.steps.switchToEditTab();
146
+ listOrderingPage.steps.selectDragHandleOption(1);
147
+ listOrderingPage.steps.switchToPreviewTab();
148
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('arrow icon', "SameList");
149
+ });
150
+
151
+ it('When user selects none option then drag handles will not be displayed in the preview tab', () => {
152
+ listOrderingPage.steps.switchToEditTab();
153
+ listOrderingPage.steps.selectDragHandleOption(2);
154
+ listOrderingPage.steps.switchToPreviewTab();
155
+ listOrderingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('none', "SameList");
156
+ });
157
+ });
158
+
159
+ describe('Style and Layout customization accordion: Options - Options Style - Edit Tab', () => {
160
+ abortEarlySetup();
161
+ before(() => {
162
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
163
+ cy.barsPreLoaderWait();
164
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
165
+ });
166
+
167
+ it('\'Options style\' label will be displayed', () => {
168
+ utilities.verifyElementVisibilityState(listOrderingPage.optionStyleLabel(), 'visible');
169
+ utilities.verifyInnerText(listOrderingPage.optionStyleLabel(), 'Option style');
170
+ });
171
+
172
+ it('\'With Border\' and \'Without Border\' option style button will be present', () => {
173
+ utilities.verifyElementVisibilityState(listOrderingPage.withBorderOptionStyleButton(), 'visible');
174
+ utilities.verifyInnerText(listOrderingPage.withBorderOptionStyleButton(), 'With border');
175
+ utilities.verifyElementVisibilityState(listOrderingPage.withoutBorderOptionStyleButton(), 'visible');
176
+ utilities.verifyInnerText(listOrderingPage.withoutBorderOptionStyleButton(), 'Without border');
177
+ });
178
+
179
+ it('By default, \'With Border\' option style will be selected and the borders will be present in the specify correct answer section', () => {
180
+ listOrderingPage.steps.verifyWithBorderOptionStyleButtonSelected();
181
+ listOrderingPage.steps.verifyBorderStyleInSpecifyCorrectAnswer("1px solid rgb(107, 139, 255)");
182
+ });
183
+
184
+ it('When user selects \'Without Border\' option style the borders will not be present in the specify correct answer section', () => {
185
+ listOrderingPage.steps.selectWithoutBorderOptionStyleButton();
186
+ listOrderingPage.steps.verifyWithoutBorderOptionStyleButtonSelected();
187
+ listOrderingPage.steps.verifyBorderStyleInSpecifyCorrectAnswer("0px none rgba(0, 0, 0, 0.87)");
188
+ });
189
+
190
+ it('When user selects \'Without Border\' option style like \'Fill color\', \'Border color\', \'Border style\' and \'Connector settings\' will be removed from style and Layout customization accordion', () => {
191
+ utilities.verifyElementVisibilityState(listOrderingPage.fillAndBorderColorWrapper(), 'notExist');
192
+ utilities.verifyElementVisibilityState(listOrderingPage.borderStyleLabel(), 'notExist');
193
+ });
194
+ });
195
+
196
+ describe('Style and Layout customization accordion: Options - Options Style - Preview Tab', () => {
197
+ abortEarlySetup();
198
+ before(() => {
199
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
200
+ cy.barsPreLoaderWait();
201
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
202
+ });
203
+
204
+ it('By default, \'With Border\' option style will be selected and the borders will be present in the preview tab', () => {
205
+ listOrderingPage.steps.verifyWithBorderOptionStyleButtonSelected();
206
+ listOrderingPage.steps.switchToPreviewTab();
207
+ listOrderingPage.steps.verifyBorderStyleInSpecifyCorrectAnswer("1px solid rgb(107, 139, 255)");
208
+ });
209
+
210
+ it('When user selects \'Without Border\' option style the borders will not be present in the preview tab', () => {
211
+ listOrderingPage.steps.switchToEditTab();
212
+ listOrderingPage.steps.selectWithoutBorderOptionStyleButton();
213
+ listOrderingPage.steps.verifyWithoutBorderOptionStyleButtonSelected();
214
+ listOrderingPage.steps.switchToPreviewTab();
215
+ listOrderingPage.steps.verifyBorderStyleInSpecifyCorrectAnswer("0px none rgb(0, 0, 46)");
216
+ });
217
+ });
218
+
219
+ describe('Style and Layout customization accordion: Options - Connectors - Edit Tab', () => {
220
+ abortEarlySetup();
221
+ before(() => {
222
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
223
+ cy.barsPreLoaderWait();
224
+ listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
225
+ });
226
+
227
+ it('\'Connector settings\' label will be displayed', () => {
228
+ utilities.verifyElementVisibilityState(listOrderingPage.connectorSettingLabel(), 'visible');
229
+ utilities.verifyInnerText(listOrderingPage.connectorSettingLabel(), 'Connector settings');
230
+ });
231
+
232
+ it('\'No connectors\' and \'Connectors\' buttons will be present', () => {
233
+ utilities.verifyElementVisibilityState(listOrderingPage.noConnectorsButton(), 'visible');
234
+ utilities.verifyInnerText(listOrderingPage.noConnectorsButton(), 'No connectors');
235
+ utilities.verifyElementVisibilityState(listOrderingPage.connectorsButton(), 'visible');
236
+ utilities.verifyInnerText(listOrderingPage.connectorsButton(), 'Connectors');
237
+ });
238
+
239
+ it('By default, \'No connectors\' button will be selected', () => {
240
+ listOrderingPage.steps.verifyNoConnectorsButtonSelected();
241
+ });
242
+
243
+ it('When user selects \'Connectors\' button \'Set connector line type\' will be displayed with 5 types of connectors:- \'Left Arrow \', \'Right Arrow\', \'Double Arrow\', \'Line\' and \'Dash\', by default, \'Line\' connector type will be selected', () => {
244
+ listOrderingPage.steps.selectConnectorsButton();
245
+ listOrderingPage.steps.verifyConnectorsButtonSelected();
246
+ utilities.verifyElementCount(listOrderingPage.connectorType(), 5);
247
+ listOrderingPage.steps.verifyConnectorType('Left Arrow');
248
+ listOrderingPage.steps.verifyConnectorType('Right Arrow');
249
+ listOrderingPage.steps.verifyConnectorType('Double Arrow');
250
+ listOrderingPage.steps.verifyConnectorType('Line');
251
+ listOrderingPage.steps.verifyConnectorType('Dash');
252
+ listOrderingPage.steps.verifyConnectorTypeSelected(3);
253
+ });
254
+
255
+ it('When user selects \'Connectors\' button connector will be present in the specify correct answer section', () => {
256
+ listOrderingPage.steps.verifyConnectorsButtonSelected();
257
+ listOrderingPage.steps.verifyTotalNumberOfConnectors(3);
258
+ });
259
+ });
260
+
261
+ // Code can be written when this bug is resolved https://redmine.zeuslearning.com/issues/581597
262
+ // describe('Style and Layout customization accordion: Options - Connectors - Preview Tab', () => {
263
+ // abortEarlySetup();
264
+ // before(() => {
265
+ // listOrderingPage.steps.navigateToCreateQuestion('list ordering');
266
+ // cy.barsPreLoaderWait();
267
+ // listOrderingPage.steps.expandStyleAndLayoutCustomizationAccordion();
268
+ // });
269
+ // });
270
+ });
@@ -0,0 +1,95 @@
1
+ import { setPointsPopupBase } from "../../../../pages/components";
2
+ import { listOrderingPage } from "../../../../pages/listOrderingPage";
3
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
+ const options = ['sprout', 'plant', 'flower', 'seed'];
5
+ const correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
6
+
7
+ describe('Create Item page - List ordering: Preview tab scoring', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Question Preview: AutoScored - Partial different weights scoring for "Horizontal" option orientation', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
16
+ cy.barsPreLoaderWait();
17
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
18
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
19
+ listOrderingPage.steps.addInputToOptionsInputField(options);
20
+ listOrderingPage.steps.selectOptionOrientation('Horizontal');
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.selectAutoScoredScoringSubtype('Partial different weights');
27
+ listOrderingPage.steps.clickOnSetPointsButton();
28
+ setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField([4.2, 1.8, 2.3, 3.7]);
29
+ setPointsPopupBase.steps.saveSetPointsPopup();
30
+ listOrderingPage.steps.switchToPreviewTab();
31
+ });
32
+
33
+ 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 answers section should be displayed with correct answers from the correct accordion', () => {
34
+ listOrderingPage.steps.verifyPreviewScore(0, 12);
35
+ listOrderingPage.steps.switchToGradingView();
36
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
37
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
38
+ listOrderingPage.steps.verifyCorrectOptionIconsCorrectAnswerSection();
39
+ });
40
+
41
+ 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', () => {
42
+ listOrderingPage.steps.resetQuestionPreview();
43
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
44
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
45
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
46
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
47
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['flower', 'plant', 'seed', 'sprout']);
48
+ listOrderingPage.steps.verifyPreviewScore(0, 12);
49
+ listOrderingPage.steps.switchToGradingView();
50
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
51
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
52
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
53
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
54
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
55
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
56
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
57
+ });
58
+
59
+ 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', () => {
60
+ listOrderingPage.steps.resetQuestionPreview();
61
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
62
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
63
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
64
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
65
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['plant', 'sprout', 'seed', 'flower']);
66
+ listOrderingPage.steps.switchToGradingView();
67
+ listOrderingPage.steps.verifyPreviewScore(5.5, 12);
68
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
69
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
70
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
71
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
72
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
73
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
74
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
75
+ });
76
+
77
+ 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', () => {
78
+ listOrderingPage.steps.resetQuestionPreview();
79
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
80
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
81
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
82
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
83
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
84
+ listOrderingPage.steps.verifyPreviewScore(12, 12);
85
+ listOrderingPage.steps.switchToGradingView()
86
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
87
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
88
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
89
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
90
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
91
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
92
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
93
+ });
94
+ });
95
+ });
@@ -0,0 +1,236 @@
1
+ import { setPointsPopupBase } from "../../../../pages/components";
2
+ import { listOrderingPage } from "../../../../pages/listOrderingPage";
3
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
+
5
+ const options = ['sprout', 'plant', 'flower', 'seed'];
6
+ const correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
7
+ const alternateCorrectAnswerArray = ['seed', 'flower', 'sprout', 'plant'];
8
+
9
+ describe('Create Item page - List ordering: Partial different weights scoring with alternative answer for "Horizontal orientation" - When correct answer points are more than alternative answer points', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ describe('Question Preview: AutoScored - Partial different weights with alternative answer: When correct answer points are more than alternative answer points', () => {
15
+ abortEarlySetup();
16
+ before(() => {
17
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
18
+ cy.barsPreLoaderWait();
19
+ listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
20
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
21
+ listOrderingPage.steps.addInputToOptionsInputField(options);
22
+ listOrderingPage.steps.selectOptionOrientation('Horizontal');
23
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
24
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
25
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
26
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
27
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
28
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
29
+ listOrderingPage.steps.clickOnSetPointsButton();
30
+ setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField([7, 5, 4, 8]);
31
+ setPointsPopupBase.steps.saveSetPointsPopup();
32
+ listOrderingPage.steps.addAlternativeAnswerAccordion(1);
33
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
34
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
35
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
36
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
37
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(alternateCorrectAnswerArray);
38
+ listOrderingPage.steps.clickOnSetPointsButton();
39
+ setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField([6, 3, 2, 9]);
40
+ setPointsPopupBase.steps.saveSetPointsPopup();
41
+ listOrderingPage.steps.switchToPreviewTab();
42
+ });
43
+
44
+ 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 answers section should be displayed with correct answers from the correct accordion', () => {
45
+ listOrderingPage.steps.verifyPreviewScore(0, 24);
46
+ listOrderingPage.steps.switchToGradingView();
47
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
48
+ listOrderingPage.steps.verifyCorrectIncorrectIconsNotExist();
49
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
50
+ });
51
+
52
+ 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', () => {
53
+ listOrderingPage.steps.resetQuestionPreview();
54
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
55
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
56
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
57
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
58
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(correctAnswerArray);
59
+ listOrderingPage.steps.verifyPreviewScore(24, 24);
60
+ listOrderingPage.steps.switchToGradingView();
61
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
62
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
63
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
64
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
65
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
66
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
67
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
68
+ });
69
+
70
+ it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
71
+ listOrderingPage.steps.resetQuestionPreview();
72
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
73
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
74
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
75
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
76
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(alternateCorrectAnswerArray);
77
+ listOrderingPage.steps.verifyPreviewScore(20, 24);
78
+ listOrderingPage.steps.switchToGradingView();
79
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
80
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
81
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
82
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
83
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
84
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
85
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
86
+ });
87
+
88
+ 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 should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
89
+ listOrderingPage.steps.resetQuestionPreview();
90
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
91
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
92
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
93
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
94
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['flower', 'sprout', 'plant', 'seed']);
95
+ listOrderingPage.steps.verifyPreviewScore(9, 24);
96
+ listOrderingPage.steps.switchToGradingView();
97
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
98
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
99
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
100
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
101
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
102
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
103
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
104
+ });
105
+
106
+ 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 should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
107
+ listOrderingPage.steps.resetQuestionPreview();
108
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
109
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
110
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
111
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
112
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['plant', 'flower', 'sprout', 'seed']);
113
+ listOrderingPage.steps.verifyPreviewScore(5, 24);
114
+ listOrderingPage.steps.switchToGradingView();
115
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
116
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('flower');
117
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
118
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
119
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
120
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
121
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
122
+ });
123
+
124
+ it('When the user attempts the question partially correct with equal number of correct responses from correct and alternative accordion then user should be awarded with points of the accordion that awards more points i.e. in this case correct accordion 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', () => {
125
+ listOrderingPage.steps.resetQuestionPreview();
126
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
127
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
128
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
129
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
130
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['seed', 'flower', 'plant', 'sprout']);
131
+ listOrderingPage.steps.verifyPreviewScore(11, 24);
132
+ listOrderingPage.steps.switchToGradingView();
133
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
134
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
135
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
136
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
137
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
138
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
139
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
140
+ });
141
+
142
+ it('When the user attempts the question partially correct with equal number of correct responses from correct and alternative accordion then user should be awarded with points of the accordion that awards more points i.e. in this case alternative accordion 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 correct accordion, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
143
+ listOrderingPage.steps.resetQuestionPreview();
144
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
145
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
146
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
147
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
148
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['seed', 'sprout', 'flower', 'plant']);
149
+ listOrderingPage.steps.verifyPreviewScore(15, 24);
150
+ listOrderingPage.steps.switchToGradingView();
151
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
152
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
153
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
154
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
155
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
156
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
157
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
158
+ });
159
+
160
+ it('Race condition: When the user attempts the question with the common option between correct accordion and alternative accordion then user should be awarded with points of the tab with more points i.e. in this case correct accordion and on switching to \'Grading\' view the correct icon should be displayed beside the common option and incorrect icon should be displayed beside the incorrect responses, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
161
+ listOrderingPage.steps.resetQuestionPreview();
162
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
163
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
164
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
165
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
166
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['seed', 'plant', 'flower', 'sprout']);
167
+ listOrderingPage.steps.verifyPreviewScore(7, 24);
168
+ listOrderingPage.steps.switchToGradingView();
169
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('seed');
170
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
171
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
172
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
173
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
174
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
175
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
176
+ });
177
+
178
+ it('When user attempts the question incorrectly then user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed beside all the options, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion should be displayed', () => {
179
+ listOrderingPage.steps.resetQuestionPreview();
180
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
181
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
182
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
183
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
184
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['flower', 'plant', 'seed', 'sprout']);
185
+ listOrderingPage.steps.verifyPreviewScore(0, 24);
186
+ listOrderingPage.steps.switchToGradingView();
187
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
188
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('plant');
189
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
190
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('sprout');
191
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
192
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
193
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
194
+ });
195
+
196
+ it('Overachiever case: When the user attempts the question with more number of correct options from the correct accordion than the alternative accordion but the score of the responses selected from the alternative accordion overpowers the combined score of the correct accordion answers then correct icons should be displayed for the alternative accordion options, incorrect icon should be displayed for the correct accordion options and points awarded should be of the alternative accordion, correct/incorrect status message should not be displayed correct answer section with all correct answers from the correct accordion should be displayed', () => {
197
+ 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 and the points per response are in decimal')
198
+ listOrderingPage.steps.switchToEditTab();
199
+ listOrderingPage.steps.addOption();
200
+ listOrderingPage.steps.enterTextInOptionInputField(4, 'fruit');
201
+ listOrderingPage.steps.deleteAlternativeAnswerAccordion(0);
202
+ listOrderingPage.steps.clickAndDropOptionSeperateList('fruit');
203
+ listOrderingPage.steps.clickOnSetPointsButton();
204
+ setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField([24, 1, 4, 1, 3]);
205
+ setPointsPopupBase.steps.saveSetPointsPopup();
206
+ listOrderingPage.steps.addAlternativeAnswerAccordion(1);
207
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
208
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
209
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
210
+ listOrderingPage.steps.clickAndDropOptionSeperateList('fruit');
211
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
212
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['sprout', 'plant', 'flower', 'fruit', 'seed']);
213
+ listOrderingPage.steps.clickOnSetPointsButton();
214
+ setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField([14, 2, 1, 2, 3]);
215
+ setPointsPopupBase.steps.saveSetPointsPopup();
216
+ listOrderingPage.steps.switchToPreviewTab();
217
+
218
+ listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
219
+ listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
220
+ listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
221
+ listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
222
+ listOrderingPage.steps.clickAndDropOptionSeperateList('fruit');
223
+ listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['sprout', 'plant', 'seed', 'flower', 'fruit']);
224
+ listOrderingPage.steps.verifyPreviewScore(16, 33);
225
+ listOrderingPage.steps.switchToGradingView();
226
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('sprout');
227
+ listOrderingPage.steps.verifyCorrectOptionIconSeperateList('plant');
228
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('seed');
229
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('flower');
230
+ listOrderingPage.steps.verifyIncorrectOptionIconSeperateList('fruit');
231
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(['seed', 'sprout', 'plant', 'flower', 'fruit']);
232
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
233
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
234
+ });
235
+ });
236
+ });