itemengine-cypress-automation 1.0.247-06SeptUpdates-b1623d7.0 → 1.0.247

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
@@ -0,0 +1,223 @@
1
+ import { matchingPage } from "../../../pages";
2
+ import { colorPopupComponent } from "../../../pages/components";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+ const modifiedColor = 'rgb(121, 60, 60)'
7
+
8
+ describe('Matching - Style and layout customization', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Style and Layout customization accordion: Draggable options drag icon handle', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ matchingPage.steps.navigateToCreateQuestion('matching');
17
+ cy.barsPreLoaderWait();
18
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
19
+ });
20
+
21
+ it('Draggable options label should be displayed', () => {
22
+ utilities.verifyInnerText(matchingPage.draggableOptionsLabel(), 'Draggable options');
23
+ });
24
+
25
+ it('Drag handle icon label should be displayed with 3 options and by default the first option should be selected draggable options', () => {
26
+ utilities.verifyInnerText(matchingPage.dragHandleIconLabel(), 'Drag handle icon');
27
+ utilities.verifyElementCount(matchingPage.dragHandleOptions(), 3);
28
+ matchingPage.steps.verifyDragHandleOptionSelected(0);
29
+ });
30
+
31
+ it('By default, the default selected drag handle should be displayed in the specify correct answer section draggable options', () => {
32
+ matchingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('drag icon');
33
+ });
34
+
35
+ it('When user selects arrows drag handle icon then arrow icons should be displayed the specify correct answer section draggable options', () => {
36
+ matchingPage.steps.selectDragHandleOption(1);
37
+ matchingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('arrow icon');
38
+ });
39
+
40
+ it('When user selects none option then drag handles should not be displayed for the specify correct answer section draggable options', () => {
41
+ matchingPage.steps.selectDragHandleOption(2);
42
+ matchingPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('none');
43
+ });
44
+ });
45
+
46
+ describe('Style and Layout customization accordion: Draggable options drag icon handle', () => {
47
+ abortEarlySetup();
48
+ before(() => {
49
+ matchingPage.steps.navigateToCreateQuestion('matching');
50
+ cy.barsPreLoaderWait();
51
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
52
+ matchingPage.steps.switchToPreviewTab();
53
+ });
54
+
55
+ it('By default, the default selected drag handle should be displayed in the preview tab draggable options', () => {
56
+ matchingPage.steps.verifyDragHandleIconPreviewTab('drag icon');
57
+ });
58
+
59
+ it('When user selects arrows drag handle icon then arrow icons should be displayed the preview tab draggable options', () => {
60
+ matchingPage.steps.switchToEditTab();
61
+ matchingPage.steps.selectDragHandleOption(1);
62
+ matchingPage.steps.switchToPreviewTab();
63
+ matchingPage.steps.verifyDragHandleIconPreviewTab('arrow icon');
64
+ });
65
+
66
+ it('When user selects none option then drag handles should not be displayed for the preview tab draggable options', () => {
67
+ matchingPage.steps.switchToEditTab();
68
+ matchingPage.steps.selectDragHandleOption(2);
69
+ matchingPage.steps.switchToPreviewTab();
70
+ matchingPage.steps.verifyDragHandleIconPreviewTab('none');
71
+ });
72
+ });
73
+
74
+ describe('Style and Layout customization accordion: Draggable options Fill color edit tab contents and functionality', () => {
75
+ abortEarlySetup();
76
+ before(() => {
77
+ matchingPage.steps.navigateToCreateQuestion('matching');
78
+ cy.barsPreLoaderWait();
79
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
80
+ });
81
+
82
+ it('\'Fill color\' label and two color blocks and an \'Edit color\' button should be displayed. The selected color block should be of color \'rgb(245, 248, 255)\' and the other color block should have \'No color\'', () => {
83
+ utilities.verifyInnerText(matchingPage.draggableOptionsFillColorLabel(), 'Fill color');
84
+ matchingPage.steps.verifyColorBlockColor(4, css.color.defaultBackground);
85
+ matchingPage.steps.verifyColorBlockSelectedState(0);
86
+ matchingPage.steps.verifyColorBlockColor(5, css.color.none);
87
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.editColorButton(), 2), 'Edit color');
88
+ utilities.verifyElementVisibilityState(matchingPage.editColorButton(), 'visible');
89
+ });
90
+
91
+ it('When the user hovers over the color blocks in the \'Fill color\' section, hex code of the selected color should be displayed in a tooltip', () => {
92
+ utilities.getNthElement(matchingPage.colorBlock(), 4)
93
+ .verifyTooltip('#FFFFFF');
94
+ utilities.getNthElement(matchingPage.colorBlock(), 5)
95
+ .verifyTooltip('None');
96
+ });
97
+
98
+ it('By default, the first color option should be in selected state', () => {
99
+ matchingPage.steps.verifyColorBlockSelectedState(4);
100
+ });
101
+
102
+ it('When the default color block is in selected state in the \'Fill color\' section, then the background color of the grid in the specify correct answer section should be the default selected color', () => {
103
+ matchingPage.steps.verifyDraggableOptionsFillColorSpecifyCorrectAnswerSection(css.color.defaultBackground);
104
+ });
105
+
106
+ it('When the user selects the \'None\' color block, it should get in selected state and the no background color should be present for the grid in the specify correct answer section', () => {
107
+ matchingPage.steps.selectColorBlock(5);
108
+ matchingPage.steps.verifyDraggableOptionsFillColorSpecifyCorrectAnswerSection(css.color.defaultBackground);
109
+ });
110
+
111
+ it('When the user clicks on the \'Edit color\' button, modifies color for the selected color block, then the background color of the grid in the specify correct answer section should be the modified selected color', () => {
112
+ matchingPage.steps.editColor(2);
113
+ colorPopupComponent.steps.clickInColorSaturationPalette();
114
+ colorPopupComponent.steps.clickOnOkButton();
115
+ matchingPage.steps.verifyDraggableOptionsFillColorSpecifyCorrectAnswerSection(modifiedColor);
116
+ });
117
+ });
118
+
119
+ describe('Style and Layout customization accordion: Draggable options Fill color preview tab functionality', () => {
120
+ abortEarlySetup();
121
+ before(() => {
122
+ matchingPage.steps.navigateToCreateQuestion('matching');
123
+ cy.barsPreLoaderWait();
124
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
125
+ });
126
+
127
+ it('When the default color block is in selected state in the \'Fill color\' section, then the background color of the grid in the preview tab should be the default selected color', () => {
128
+ matchingPage.steps.switchToPreviewTab();
129
+ matchingPage.steps.verifyDraggableOptionsFillColorPreviewTab(css.color.defaultBackground);
130
+ });
131
+
132
+ it('When the user selects the \'None\' color block, it should get in selected state and the no background color should be present for the grid in the preview tab', () => {
133
+ matchingPage.steps.switchToEditTab();
134
+ matchingPage.steps.selectColorBlock(5);
135
+ matchingPage.steps.switchToPreviewTab();
136
+ matchingPage.steps.verifyDraggableOptionsFillColorPreviewTab(css.color.defaultBackground);
137
+ });
138
+
139
+ it('When the user clicks on the \'Edit color\' button, modifies color for the selected color block, then the color block should get updated accordingly', () => {
140
+ matchingPage.steps.switchToEditTab();
141
+ matchingPage.steps.editColor(2);
142
+ colorPopupComponent.steps.clickInColorSaturationPalette();
143
+ colorPopupComponent.steps.clickOnOkButton();
144
+ matchingPage.steps.switchToPreviewTab();
145
+ matchingPage.steps.verifyDraggableOptionsFillColorPreviewTab(modifiedColor);
146
+ });
147
+ });
148
+
149
+ describe('Style and Layout customization accordion: Draggable options Border color edit tab contents and functionality', () => {
150
+ abortEarlySetup();
151
+ before(() => {
152
+ matchingPage.steps.navigateToCreateQuestion('matching');
153
+ cy.barsPreLoaderWait();
154
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
155
+ });
156
+
157
+ it('\'Border color\' label and two color blocks and an \'Edit color\' button should be displayed. The selected color block should be of color \'rgb(82, 0, 255) and the other color block should have \'No color\'', () => {
158
+ utilities.verifyInnerText(matchingPage.borderColorLabel(), 'Border color');
159
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.editColorButton(), 3), 'Edit color');
160
+ utilities.verifyElementVisibilityState(matchingPage.editColorButton(), 'visible');
161
+ matchingPage.steps.verifyColorBlockColor(6, css.color.figDefaultComponentBorder);
162
+ matchingPage.steps.verifyColorBlockSelectedState(2);
163
+ matchingPage.steps.verifyColorBlockColor(7, css.color.none);
164
+ });
165
+
166
+ it('When the user hovers over the color blocks in the \'Border color\' section, hex code of the selected color should be displayed in a tooltip', () => {
167
+ utilities.getNthElement(matchingPage.colorBlock(), 6)
168
+ .verifyTooltip('#6B8BFF');
169
+ utilities.getNthElement(matchingPage.colorBlock(), 7)
170
+ .verifyTooltip('None');
171
+ });
172
+
173
+ it('By default, the first color option should be in selected state', () => {
174
+ matchingPage.steps.verifyColorBlockSelectedState(6);
175
+ });
176
+
177
+ it('When the default color block is in selected state in the \'Border color\' section, then the border color of the grid in the specify correct answer section should be the default selected color', () => {
178
+ matchingPage.steps.verifyDraggableOptionsBorderColorSpecifyCorrectAnswer(css.color.figDefaultComponentBorder);
179
+ });
180
+
181
+ it('When the user selects the \'None\' color block, it should get in selected state and the no border color should be present for the grid in the specify correct answer section', () => {
182
+ matchingPage.steps.selectColorBlock(7);
183
+ matchingPage.steps.verifyDraggableOptionsBorderColorSpecifyCorrectAnswer(css.color.defaultBackground);
184
+ });
185
+
186
+ it('When the user clicks on the \'Edit color\' button, modifies color for the selected color block, then the border color of the grid in the specify correct answer section should be the modified selected color', () => {
187
+ matchingPage.steps.editColor(3);
188
+ colorPopupComponent.steps.clickInColorSaturationPalette();
189
+ colorPopupComponent.steps.clickOnOkButton();
190
+ matchingPage.steps.verifyDraggableOptionsBorderColorSpecifyCorrectAnswer(modifiedColor);
191
+ });
192
+ });
193
+
194
+ describe('Style and Layout customization accordion: Draggable options Border color preview tab functionality', () => {
195
+ abortEarlySetup();
196
+ before(() => {
197
+ matchingPage.steps.navigateToCreateQuestion('matching');
198
+ cy.barsPreLoaderWait();
199
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
200
+ matchingPage.steps.switchToPreviewTab();
201
+ });
202
+
203
+ it('When the default color block is in selected state in the \'Fill color\' section, then the border color of the grid in the preview tab should be the default selected color', () => {
204
+ matchingPage.steps.verifyDraggableOptionsBorderColorPreviewTab(css.color.figDefaultComponentBorder);
205
+ });
206
+
207
+ it('When the user selects the \'None\' color block, it should get in selected state and the no border color should be present for the grid in the preview tab', () => {
208
+ matchingPage.steps.switchToEditTab();
209
+ matchingPage.steps.selectColorBlock(7);
210
+ matchingPage.steps.switchToPreviewTab();
211
+ matchingPage.steps.verifyDraggableOptionsBorderColorPreviewTab(css.color.defaultBackground);
212
+ });
213
+
214
+ it('When the user clicks on the \'Edit color\' button, modifies color for the selected color block, then the color block should get updated accordingly', () => {
215
+ matchingPage.steps.switchToEditTab();
216
+ matchingPage.steps.editColor(3);
217
+ colorPopupComponent.steps.clickInColorSaturationPalette();
218
+ colorPopupComponent.steps.clickOnOkButton();
219
+ matchingPage.steps.switchToPreviewTab();
220
+ matchingPage.steps.verifyDraggableOptionsBorderColorPreviewTab(modifiedColor);
221
+ });
222
+ });
223
+ });
@@ -0,0 +1,121 @@
1
+ import { matchingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+
5
+ const panelPlacement = ['Bottom', 'Top', 'Left', 'Right'];
6
+ const optionAlignment = ['Left', 'Center', 'Right'];
7
+
8
+ describe('Matching - Style and layout customization', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Style and Layout customization accordion: Draggable options panel placement specify correct answer', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ matchingPage.steps.navigateToCreateQuestion('matching');
17
+ cy.barsPreLoaderWait();
18
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
19
+ });
20
+
21
+ it('\'Draggable option panel\' label should be displayed', () => {
22
+ utilities.verifyInnerText(matchingPage.draggableOptionPanelPlacementLabel(), 'Draggable option panel');
23
+ });
24
+
25
+ it(`\'Panel placement\' label should be displayed along with ${panelPlacement} options should be displayed and by default \'Bottom\' should be selected`, () => {
26
+ utilities.verifyInnerText(matchingPage.panelPlacementLabel(), 'Panel placement');
27
+ panelPlacement.forEach((option) => {
28
+ utilities.verifyElementVisibilityState(matchingPage.panelPlacementOptions(option), 'exist');
29
+ });
30
+ matchingPage.steps.verifyPanelPlacementOptionSelected('Bottom');
31
+ });
32
+
33
+ it('By default the option panel placement should be at the bottom', () => {
34
+ matchingPage.steps.verifyPanelPlacementSpecifyCorrectAnswerSection('Bottom');
35
+ });
36
+
37
+ //Need to remove skip once https://redmine.zeuslearning.com/issues/574098 is resolved
38
+ panelPlacement.forEach((option) => {
39
+ it.skip(`When user selects ${option} option from the Panel placement options then panel placement should be at the ${option} in specify correct answer section`, () => {
40
+ matchingPage.steps.selectPanelPlacementOption(option)
41
+ matchingPage.steps.verifyPanelPlacementSpecifyCorrectAnswerSection(option);
42
+ });
43
+ });
44
+ });
45
+
46
+ describe('Style and Layout customization accordion: Draggable options panel placement preview tab', () => {
47
+ abortEarlySetup();
48
+ before(() => {
49
+ matchingPage.steps.navigateToCreateQuestion('matching');
50
+ cy.barsPreLoaderWait();
51
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
52
+ matchingPage.steps.switchToPreviewTab();
53
+ });
54
+
55
+ it('By default the option panel placement should be at the bottom', () => {
56
+ matchingPage.steps.verifyPanelPlacementPreviewTab('Bottom');
57
+ });
58
+
59
+ panelPlacement.forEach((option) => {
60
+ it(`When user selects ${option} option from the Panel placement options then panel placement should be at the ${option} in preview tab`, () => {
61
+ matchingPage.steps.switchToEditTab();
62
+ matchingPage.steps.selectPanelPlacementOption(option)
63
+ matchingPage.steps.switchToPreviewTab();
64
+ matchingPage.steps.verifyPanelPlacementPreviewTab(option);
65
+ });
66
+ });
67
+ });
68
+
69
+ describe('Style and Layout customization accordion: Draggable Option alignment in panel specify correct answer', () => {
70
+ abortEarlySetup();
71
+ before(() => {
72
+ matchingPage.steps.navigateToCreateQuestion('matching');
73
+ cy.barsPreLoaderWait();
74
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
75
+ });
76
+
77
+ it(`\'Option alignment in panel\' label should be displayed along with ${optionAlignment} options should be displayed and by default \'Left\' should be selected`, () => {
78
+ utilities.verifyInnerText(utilities.getNthElement(matchingPage.optionAlignmentInPanelLabel(), 2), 'Option alignment in panel');
79
+ optionAlignment.forEach((option) => {
80
+ utilities.verifyElementVisibilityState(matchingPage.optionAlignmentInPanelOptions(option.toLowerCase()), 'exist');
81
+ });
82
+ matchingPage.steps.verifyOptionAlignmentInPanelOptionSelected('left');
83
+ });
84
+
85
+ //Need to remove skip once https://redmine.zeuslearning.com/issues/574098 is resolved
86
+ it.skip('By default the option alignment in panel placement should be at the left', () => {
87
+ matchingPage.steps.verifyOptionAlignmentInPanelInSpecifyCorrectAnswer('Left');
88
+ });
89
+
90
+ //Need to remove skip once https://redmine.zeuslearning.com/issues/574098 is resolved
91
+ optionAlignment.forEach((option) => {
92
+ it.skip(`When user selects ${option} option from the option alignment in panel placement options then option alignment placement should be at the ${option} in specify correct answer section`, () => {
93
+ matchingPage.steps.selectOptionAlignmentInPanelOption(option.toLowerCase());
94
+ matchingPage.steps.verifyOptionAlignmentInPanelInSpecifyCorrectAnswer(option);
95
+ });
96
+ });
97
+ });
98
+
99
+ describe('Style and Layout customization accordion: Draggable Option alignment in panel preview tab', () => {
100
+ abortEarlySetup();
101
+ before(() => {
102
+ matchingPage.steps.navigateToCreateQuestion('matching');
103
+ cy.barsPreLoaderWait();
104
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
105
+ matchingPage.steps.switchToPreviewTab();
106
+ });
107
+
108
+ it('By default the option alignment in panel placement should be at the left', () => {
109
+ matchingPage.steps.verifyOptionAlignmentInPanelInPreviewTab('Left');
110
+ });
111
+
112
+ optionAlignment.forEach((option) => {
113
+ it(`When user selects ${option} option from the option alignment in panel placement options then option alignment placement should be at the ${option} in preview tab`, () => {
114
+ matchingPage.steps.switchToEditTab();
115
+ matchingPage.steps.selectOptionAlignmentInPanelOption(option.toLowerCase());
116
+ matchingPage.steps.switchToPreviewTab();
117
+ matchingPage.steps.verifyOptionAlignmentInPanelInPreviewTab(option);
118
+ });
119
+ });
120
+ });
121
+ });
@@ -0,0 +1,68 @@
1
+ import { matchingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const connectorStyles = ["simpleLink", "mingleLink", "leftArrow", "rightArrow", "doubleArrow", "line", "dashed"];
5
+
6
+
7
+ describe('Dropzone connector style contents', () => {
8
+ abortEarlySetup();
9
+ before(() => {
10
+ matchingPage.steps.navigateToCreateQuestion('matching');
11
+ cy.barsPreLoaderWait();
12
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
13
+ });
14
+
15
+ it('"Dropzone connector style" label should be displayed', () => {
16
+ utilities.verifyInnerText(matchingPage.dropzoneConnectorStyleLabel(), 'Dropzone connector style');
17
+ });
18
+
19
+ it('"Set connector line type" label along with seven icon buttons should be displayed. By default, "SimpleLink" option should be in selected state', () => {
20
+ utilities.verifyInnerText(matchingPage.connectorLineTypeLabel(), 'Set connector line type');
21
+ connectorStyles.forEach((option) => {
22
+ utilities.verifyElementVisibilityState(matchingPage.connectorEndPointShapeOptions(option), 'exist');
23
+ });
24
+ matchingPage.steps.verifyConnectorStyleOptionSelected('simpleLink')
25
+ });
26
+ });
27
+
28
+ describe('Dropzone connector style - Edit tab', () => {
29
+ abortEarlySetup();
30
+ before(() => {
31
+ matchingPage.steps.navigateToCreateQuestion('matching');
32
+ cy.barsPreLoaderWait();
33
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
34
+ });
35
+
36
+ it('When the "SimpleLink" connector style is in selected state, then the connector style of the text containers should be "SimpleLink"', () => {
37
+ matchingPage.steps.verifyConnectorStyles('simpleLink');
38
+ });
39
+
40
+ connectorStyles.forEach((button) => {
41
+ it(`When the user selects ${button}, then the connector style of the text containers should update to ${button}`, () => {
42
+ matchingPage.steps.selectConnectorLineType(button);
43
+ matchingPage.steps.verifyConnectorStyles(button);
44
+ });
45
+ })
46
+ });
47
+
48
+ describe('Dropzone connector style - Preview tab', () => {
49
+ abortEarlySetup();
50
+ before(() => {
51
+ matchingPage.steps.navigateToCreateQuestion('matching');
52
+ cy.barsPreLoaderWait();
53
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
54
+ });
55
+
56
+ it('When the "SimpleLink" connector style is in selected state, then the connector style of the text containers should be "SimpleLink"', () => {
57
+ matchingPage.steps.verifyConnectorStyles('simpleLink');
58
+ });
59
+
60
+ connectorStyles.forEach((button) => {
61
+ it(`When the user selects ${button}, then the connector style of the text containers should update to ${button}`, () => {
62
+ matchingPage.steps.switchToEditTab();
63
+ matchingPage.steps.selectConnectorLineType(button);
64
+ matchingPage.steps.switchToPreviewTab();
65
+ matchingPage.steps.verifyConnectorStyles(button);
66
+ });
67
+ })
68
+ });
@@ -0,0 +1,71 @@
1
+ import { matchingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const optionAlignment = ['Left', 'Center', 'Right'];
5
+
6
+ describe('Matching - Style and layout customization accordion', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Option alignment in dropzone - Edit tab contents and functionality', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ matchingPage.steps.navigateToCreateQuestion('matching');
15
+ cy.barsPreLoaderWait();
16
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
17
+ matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
18
+ matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
19
+ matchingPage.steps.enterTextInOptionInputField(['Leaves', 'Flower']);
20
+ });
21
+
22
+ it('Option alignment in dropzone label should be displayed', () => {
23
+ utilities.verifyInnerText(matchingPage.optionAlignmentInDropzoneLabel(), 'Option alignment in dropzone');
24
+ });
25
+
26
+ it('\'Left, Right, Center\' buttons should be displayed and by default \'Left\' alignment option should be selected', () => {
27
+ optionAlignment.forEach((option) => {
28
+ utilities.verifyElementVisibilityState(matchingPage.optionAlignmentInDropzoneOptions(option.toLowerCase()), 'exist');
29
+ });
30
+ matchingPage.steps.verifyOptionAlignmentInDropzoneOptionSelected('left');
31
+ });
32
+
33
+ it('By default, the options in the dropzone should be left aligned', () => {
34
+ matchingPage.steps.verifyOptionAlignmentInDropzoneInSpecifyCorrectAnswer('Left');
35
+ });
36
+
37
+ optionAlignment.forEach((option) => {
38
+ it(`When user selects ${option} then the options should be ${option} aligned in the specify correct answer section`, () => {
39
+ matchingPage.steps.selectOptionAlignmentInDropzoneOption(option)
40
+ matchingPage.steps.verifyOptionAlignmentInDropzoneInSpecifyCorrectAnswer(option);
41
+ });
42
+ });
43
+ });
44
+
45
+ describe('Option alignment in dropzone - Preview tab functionality', () => {
46
+ abortEarlySetup();
47
+ before(() => {
48
+ matchingPage.steps.navigateToCreateQuestion('matching');
49
+ cy.barsPreLoaderWait();
50
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
51
+ matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
52
+ matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
53
+ matchingPage.steps.enterTextInOptionInputField(['Leaves', 'Flower']);
54
+ matchingPage.steps.switchToPreviewTab();
55
+ });
56
+
57
+ it('By default, the options in the dropzone should be left aligned', () => {
58
+ matchingPage.steps.verifyOptionAlignmentInDropzoneInPreviewTab('Left');
59
+ });
60
+
61
+ optionAlignment.forEach((option) => {
62
+ it(`When user selects ${option} then the options should be ${option} aligned in the preview tab`, () => {
63
+ matchingPage.steps.switchToEditTab();
64
+ matchingPage.steps.selectOptionAlignmentInDropzoneOption(option);
65
+ matchingPage.steps.switchToPreviewTab();
66
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Flower', dropzoneIndex: 0 }]);
67
+ matchingPage.steps.verifyOptionAlignmentInDropzoneInPreviewTab(option);
68
+ });
69
+ });
70
+ });
71
+ });
@@ -0,0 +1,64 @@
1
+ import { matchingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+
5
+ describe('Option placement in dropzone - Edit tab contents and functionality', () => {
6
+ abortEarlySetup();
7
+ before(() => {
8
+ matchingPage.steps.navigateToCreateQuestion('matching');
9
+ cy.barsPreLoaderWait();
10
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
11
+ matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
12
+ matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
13
+ matchingPage.steps.enterTextInOptionInputField(['Leaves', 'Flower']);
14
+ });
15
+
16
+ it('Option placement in dropzone label should be displayed', () => {
17
+ utilities.verifyInnerText(matchingPage.optionAlignmentInPanelLabel(), 'Option placement in dropzone if maximum capacity per dropzone is more than 1');
18
+ utilities.verifyElementVisibilityState(matchingPage.optionAlignmentInPanelLabel(), 'visible');
19
+ });
20
+
21
+ it('Inline and Block labels and radio buttons should be displayed and by default, inline should be selected', () => {
22
+ utilities.verifyInnerText(matchingPage.inlineLabel(), 'Inline');
23
+ utilities.verifyElementVisibilityState(matchingPage.inlineRadioButton(), 'exist');
24
+ utilities.verifyInnerText(matchingPage.blockLabel(), 'Block');
25
+ utilities.verifyElementVisibilityState(matchingPage.blockRadioButton(), 'exist');
26
+ matchingPage.steps.verifyInlineRadioButtonChecked();
27
+ });
28
+
29
+ it('When user drops options in the dropzone when \'Inline\' radio button is checked, the options should be displayed inline to each other', () => {
30
+ matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Flower', dropzoneIndex: 0 }]);
31
+ matchingPage.steps.verifyInlineOptionPlacementSpecifyCorrectAnswer();
32
+ });
33
+
34
+ it('When the user selects \'Block\' radio button, then the options should be displayed under each other', () => {
35
+ matchingPage.steps.checkBlockRadioButton();
36
+ matchingPage.steps.verifyBlockOptionPlacementSpecifyCorrectAnswer();
37
+ });
38
+ });
39
+
40
+ describe('Option placement in dropzone - Preview tab functionality', () => {
41
+ abortEarlySetup();
42
+ before(() => {
43
+ matchingPage.steps.navigateToCreateQuestion('matching');
44
+ cy.barsPreLoaderWait();
45
+ matchingPage.steps.expandStyleAndLayoutCustomizationAccordion();
46
+ matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
47
+ matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
48
+ matchingPage.steps.enterTextInOptionInputField(['Leaves', 'Flower']);
49
+ matchingPage.steps.switchToPreviewTab();
50
+ });
51
+
52
+ it('When user drops options in the dropzone when \'Inline\' radio button is checked, the options should be displayed inline to each other', () => {
53
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Flower', dropzoneIndex: 0 }]);
54
+ matchingPage.steps.verifyInlineOptionPlacementPreviewTab();
55
+ });
56
+
57
+ it('When the user selects \'Block\' radio button, then the options should be displayed under each other', () => {
58
+ matchingPage.steps.switchToEditTab();
59
+ matchingPage.steps.checkBlockRadioButton();
60
+ matchingPage.steps.switchToPreviewTab();
61
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Flower', dropzoneIndex: 0 }]);
62
+ matchingPage.steps.verifyBlockOptionPlacementPreviewTab();
63
+ });
64
+ });