itemengine-cypress-automation 1.0.211 → 1.0.212

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +5 -5
  2. package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +6 -6
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +3 -1
  4. package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +146 -0
  5. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/allOrNothingForAllViews.smoke.js +2 -1
  6. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +2 -1
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/allOrNothingForAllViews.smoke.js +2 -1
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomization.js +700 -0
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomizationDraggableOptionsPanel.js +127 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCutomizationDraggableOptionProperties.js +253 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +2 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -1
  13. package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +2 -1
  14. package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +2 -1
  15. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +2 -2
  16. package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +2 -2
  17. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +3 -6
  18. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +3 -1
  19. package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +261 -0
  20. package/cypress/e2e/ILC/MatchingDropdown/previewContentsForAllViews.smoke.js +124 -0
  21. package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +3 -1
  22. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +3 -1
  23. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +3 -2
  24. package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +2 -2
  25. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  26. package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +2 -1
  27. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +1 -1
  28. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
  29. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
  30. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +7 -7
  31. package/cypress/pages/chartsDotPlotPage.js +22 -0
  32. package/cypress/pages/chartsLinePage.js +1 -0
  33. package/cypress/pages/essayResponsePage.js +73 -1
  34. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +550 -3
  35. package/cypress/pages/graphingPage.js +4 -0
  36. package/cypress/pages/matchingPage.js +189 -1
  37. package/package.json +1 -1
@@ -0,0 +1,127 @@
1
+ import { fillInTheGapsOverImageDragAndDropPage } 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('Drag and drop into categories - 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
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
17
+ cy.barsPreLoaderWait();
18
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
19
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
20
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
21
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
22
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
23
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
24
+ });
25
+
26
+ it('\'Draggable option panel\' label should be displayed', () => {
27
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.draggableOptionPanelPlacementLabel(), 'Draggable option panel');
28
+ });
29
+
30
+ it(`\'Panel placement\' label should be displayed along with ${panelPlacement} options should be displayed and by default \'Bottom\' should be selected`, () => {
31
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.panelPlacementLabel(), 'Panel placement');
32
+ panelPlacement.forEach((option) => {
33
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.panelPlacementOptions(option), 'exist');
34
+ });
35
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPanelPlacementOptionSelected('Bottom');
36
+ });
37
+ });
38
+
39
+ describe('Style and Layout customization accordion: Draggable options panel placement preview tab', () => {
40
+ abortEarlySetup();
41
+ before(() => {
42
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
43
+ cy.barsPreLoaderWait();
44
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
45
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
46
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
47
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
48
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
49
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
50
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
51
+ });
52
+
53
+ it('By default the option panel placement should be at the bottom', () => {
54
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPanelPlacementPreviewTab('Bottom');
55
+ });
56
+
57
+ panelPlacement.forEach((option) => {
58
+ it(`When user selects ${option} option from the Panel placement options then panel placement should be at the ${option} in preview tab`, () => {
59
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
60
+ fillInTheGapsOverImageDragAndDropPage.steps.selectPanelPlacementOption(option)
61
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
62
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyPanelPlacementPreviewTab(option);
63
+ });
64
+ });
65
+ });
66
+
67
+ describe('Style and Layout customization accordion: Draggable Option alignment in panel specify correct answer', () => {
68
+ abortEarlySetup();
69
+ before(() => {
70
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
71
+ cy.barsPreLoaderWait();
72
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
73
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
74
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
75
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
76
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
77
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
78
+ });
79
+
80
+ it(`\'Option alignment in panel\' label should be displayed along with ${optionAlignment} options should be displayed and by default \'Left\' should be selected`, () => {
81
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.optionAlignmentInPanelLabel(), 'Option alignment in panel');
82
+ optionAlignment.forEach((option) => {
83
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.optionAlignmentInPanelOptions(option.toLowerCase()), 'exist');
84
+ });
85
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionAlignmentInPanelOptionSelected('left');
86
+ });
87
+
88
+ it('By default the option alignment in panel placement should be at the left', () => {
89
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionAlignmentInPanelInSpecifyCorrectAnswer('Left');
90
+ });
91
+
92
+ optionAlignment.forEach((option) => {
93
+ it(`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`, () => {
94
+ fillInTheGapsOverImageDragAndDropPage.steps.selectOptionAlignmentInPanelOption(option.toLowerCase());
95
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionAlignmentInPanelInSpecifyCorrectAnswer(option);
96
+ });
97
+ });
98
+ });
99
+
100
+ describe('Style and Layout customization accordion: Draggable Option alignment in panel preview tab', () => {
101
+ abortEarlySetup();
102
+ before(() => {
103
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
104
+ cy.barsPreLoaderWait();
105
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
106
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
107
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
108
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
109
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
110
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
111
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
112
+ });
113
+
114
+ it('By default the option alignment in panel placement should be at the left', () => {
115
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionAlignmentInPanelInPreviewTab('Left');
116
+ });
117
+
118
+ optionAlignment.forEach((option) => {
119
+ 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`, () => {
120
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
121
+ fillInTheGapsOverImageDragAndDropPage.steps.selectOptionAlignmentInPanelOption(option.toLowerCase());
122
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
123
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyOptionAlignmentInPanelInPreviewTab(option);
124
+ });
125
+ });
126
+ });
127
+ });
@@ -0,0 +1,253 @@
1
+ import { fillInTheGapsOverImageDragAndDropPage } 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('Drag and drop into categories - 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
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
17
+ cy.barsPreLoaderWait();
18
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
19
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
20
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
21
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
22
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
23
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
24
+ });
25
+
26
+ it('Draggable options label should be displayed', () => {
27
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.draggableOptionsLabel(), 'Draggable options');
28
+ });
29
+
30
+ it('Drag handle icon label should be displayed with 3 options and by default the first option should be selected draggable options', () => {
31
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.dragHandleIconLabel(), 'Drag handle icon');
32
+ utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dragHandleOptions(), 3);
33
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDragHandleOptionSelected(0);
34
+ });
35
+
36
+ it('By default, the default selected drag handle should be displayed in the specify correct answer section draggable options', () => {
37
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('drag icon');
38
+ });
39
+
40
+ it('When user selects arrows drag handle icon then arrow icons should be displayed the specify correct answer section draggable options', () => {
41
+ fillInTheGapsOverImageDragAndDropPage.steps.selectDragHandleOption(1);
42
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('arrow icon');
43
+ });
44
+
45
+ it('When user selects none option then drag handles should not be displayed for the specify correct answer section draggable options', () => {
46
+ fillInTheGapsOverImageDragAndDropPage.steps.selectDragHandleOption(2);
47
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('none');
48
+ });
49
+ });
50
+
51
+ describe('Style and Layout customization accordion: Draggable options drag icon handle', () => {
52
+ abortEarlySetup();
53
+ before(() => {
54
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
55
+ cy.barsPreLoaderWait();
56
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
57
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
58
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
59
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
60
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
61
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
62
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
63
+ });
64
+
65
+ it('By default, the default selected drag handle should be displayed in the preview tab draggable options', () => {
66
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDragHandleIconPreviewTab('drag icon');
67
+ });
68
+
69
+ it('When user selects arrows drag handle icon then arrow icons should be displayed the preview tab draggable options', () => {
70
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
71
+ fillInTheGapsOverImageDragAndDropPage.steps.selectDragHandleOption(1);
72
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
73
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDragHandleIconPreviewTab('arrow icon');
74
+ });
75
+
76
+ it('When user selects none option then drag handles should not be displayed for the preview tab draggable options', () => {
77
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
78
+ fillInTheGapsOverImageDragAndDropPage.steps.selectDragHandleOption(2);
79
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
80
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDragHandleIconPreviewTab('none');
81
+ });
82
+ });
83
+
84
+ describe('Style and Layout customization accordion: Draggable options Fill color edit tab contents and functionality', () => {
85
+ abortEarlySetup();
86
+ before(() => {
87
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
88
+ cy.barsPreLoaderWait();
89
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
90
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
91
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
92
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
93
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
94
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
95
+ });
96
+
97
+ 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\'', () => {
98
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.draggableOptionsFillColorLabel(), 'Fill color');
99
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlockColor(4, css.color.defaultBackground);
100
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlockSelectedState(0);
101
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlockColor(5, css.color.none);
102
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.editColorButton(), 2), 'Edit color');
103
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.editColorButton(), 'visible');
104
+ });
105
+
106
+ 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', () => {
107
+ utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.colorBlock(), 4)
108
+ .verifyTooltip('#FFFFFF');
109
+ utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.colorBlock(), 5)
110
+ .verifyTooltip('None');
111
+ });
112
+
113
+ it('By default, the first color option should be in selected state', () => {
114
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlockSelectedState(4);
115
+ });
116
+
117
+ 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', () => {
118
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsFillColorSpecifyCorrectAnswerSection(css.color.defaultBackground);
119
+ });
120
+
121
+ 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', () => {
122
+ fillInTheGapsOverImageDragAndDropPage.steps.selectColorBlock(5);
123
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsFillColorSpecifyCorrectAnswerSection(css.color.defaultBackground);
124
+ });
125
+
126
+ 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', () => {
127
+ fillInTheGapsOverImageDragAndDropPage.steps.editColor(2);
128
+ colorPopupComponent.steps.clickInColorSaturationPalette();
129
+ colorPopupComponent.steps.clickOnOkButton();
130
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsFillColorSpecifyCorrectAnswerSection(modifiedColor);
131
+ });
132
+ });
133
+
134
+ describe('Style and Layout customization accordion: Draggable options Fill color preview tab functionality', () => {
135
+ abortEarlySetup();
136
+ before(() => {
137
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
138
+ cy.barsPreLoaderWait();
139
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
140
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
141
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
142
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
143
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
144
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
145
+ });
146
+
147
+ 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', () => {
148
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
149
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsFillColorPreviewTab(css.color.defaultBackground);
150
+ });
151
+
152
+ 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', () => {
153
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
154
+ fillInTheGapsOverImageDragAndDropPage.steps.selectColorBlock(5);
155
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
156
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsFillColorPreviewTab(css.color.defaultBackground);
157
+ });
158
+
159
+ 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', () => {
160
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
161
+ fillInTheGapsOverImageDragAndDropPage.steps.editColor(2);
162
+ colorPopupComponent.steps.clickInColorSaturationPalette();
163
+ colorPopupComponent.steps.clickOnOkButton();
164
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
165
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsFillColorPreviewTab(modifiedColor);
166
+ });
167
+ });
168
+
169
+ describe('Style and Layout customization accordion: Draggable options Border color edit tab contents and functionality', () => {
170
+ abortEarlySetup();
171
+ before(() => {
172
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
173
+ cy.barsPreLoaderWait();
174
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
175
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
176
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
177
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
178
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
179
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
180
+ });
181
+
182
+ 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\'', () => {
183
+ utilities.verifyInnerText(fillInTheGapsOverImageDragAndDropPage.borderColorLabel(), 'Border color');
184
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.editColorButton(), 3), 'Edit color');
185
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.editColorButton(), 'visible');
186
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlockColor(6, css.color.figDefaultComponentBorder);
187
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlockSelectedState(2);
188
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlockColor(7, css.color.none);
189
+ });
190
+
191
+ 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', () => {
192
+ utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.colorBlock(), 6)
193
+ .verifyTooltip('#6B8BFF');
194
+ utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.colorBlock(), 7)
195
+ .verifyTooltip('None');
196
+ });
197
+
198
+ it('By default, the first color option should be in selected state', () => {
199
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyColorBlockSelectedState(6);
200
+ });
201
+
202
+ 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', () => {
203
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsBorderColorSpecifyCorrectAnswer(css.color.figDefaultComponentBorder);
204
+ });
205
+
206
+ 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', () => {
207
+ fillInTheGapsOverImageDragAndDropPage.steps.selectColorBlock(7);
208
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsBorderColorSpecifyCorrectAnswer(css.color.defaultBackground);
209
+ });
210
+
211
+ 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', () => {
212
+ fillInTheGapsOverImageDragAndDropPage.steps.editColor(3);
213
+ colorPopupComponent.steps.clickInColorSaturationPalette();
214
+ colorPopupComponent.steps.clickOnOkButton();
215
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsBorderColorSpecifyCorrectAnswer(modifiedColor);
216
+ });
217
+ });
218
+
219
+ describe('Style and Layout customization accordion: Draggable options Border color preview tab functionality', () => {
220
+ abortEarlySetup();
221
+ before(() => {
222
+ fillInTheGapsOverImageDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps over image with drag and drop');
223
+ cy.barsPreLoaderWait();
224
+ fillInTheGapsOverImageDragAndDropPage.steps.expandStyleAndLayoutCustomizationAccordion();
225
+ fillInTheGapsOverImageDragAndDropPage.steps.uploadFile('highlightImage.jpg');
226
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyImageIsUploaded();
227
+ fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
228
+ fillInTheGapsOverImageDragAndDropPage.steps.selectResponseArea(0);
229
+ fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Leaves', 'Flower']);
230
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
231
+ });
232
+
233
+ 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', () => {
234
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsBorderColorPreviewTab(css.color.figDefaultComponentBorder);
235
+ });
236
+
237
+ 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', () => {
238
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
239
+ fillInTheGapsOverImageDragAndDropPage.steps.selectColorBlock(7);
240
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
241
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsBorderColorPreviewTab(css.color.defaultBackground);
242
+ });
243
+
244
+ 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', () => {
245
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToEditTab();
246
+ fillInTheGapsOverImageDragAndDropPage.steps.editColor(3);
247
+ colorPopupComponent.steps.clickInColorSaturationPalette();
248
+ colorPopupComponent.steps.clickOnOkButton();
249
+ fillInTheGapsOverImageDragAndDropPage.steps.switchToPreviewTab();
250
+ fillInTheGapsOverImageDragAndDropPage.steps.verifyDraggableOptionsBorderColorPreviewTab(modifiedColor);
251
+ });
252
+ });
253
+ });
@@ -103,7 +103,7 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
103
103
  });
104
104
  };
105
105
 
106
- it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
106
+ it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
107
107
  if (view === 'Grading view') {
108
108
  studentViewPage.steps.submitResponse();
109
109
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -117,6 +117,7 @@ describe('Create item page - Fill in the gaps over image - dropdown: All or noth
117
117
  };
118
118
  fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
119
119
  utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.correctAnswersLabel(), 'Correct answers');
120
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
120
121
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
121
122
  });
122
123
 
@@ -95,7 +95,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
95
95
  });
96
96
  };
97
97
 
98
- it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
98
+ it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
99
99
  if (view === 'Grading view') {
100
100
  studentViewPage.steps.submitResponse();
101
101
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -109,6 +109,7 @@ describe('Create item page - Fill in the gaps over image - text: All or nothing
109
109
  };
110
110
  fillInTheGapsOverImageTextPage.steps.verifyResponseAreaNumeration();
111
111
  utilities.verifyInnerText(fillInTheGapsOverImageTextPage.correctAnswersLabel(), 'Correct answers');
112
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
112
113
  fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
113
114
  });
114
115
 
@@ -87,7 +87,7 @@ describe('Create item page - Fill in the gaps with text: All or nothing ', () =>
87
87
  });
88
88
  };
89
89
 
90
- it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
90
+ it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
91
91
  if (view === 'Grading view') {
92
92
  studentViewPage.steps.submitResponse();
93
93
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -101,6 +101,7 @@ describe('Create item page - Fill in the gaps with text: All or nothing ', () =>
101
101
  };
102
102
  fillInTheGapsTextPage.steps.verifyResponseAreaNumeration();
103
103
  utilities.verifyInnerText(fillInTheGapsTextPage.correctAnswersLabel(), 'Correct answers');
104
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
104
105
  fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Flower', 'Leaf', 'Stem']);
105
106
  });
106
107
 
@@ -114,7 +114,7 @@ describe('Create Item page - Graphing: All or nothing ', () => {
114
114
  });
115
115
  };
116
116
 
117
- it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph', () => {
117
+ it('When the user selects \'Grading\' view without attempting the question, the correct answer should be displayed in the correct answer section graph and correct/incorrect status message should not be displayed', () => {
118
118
  if (view === 'Grading view') {
119
119
  studentViewPage.steps.submitResponse();
120
120
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -141,6 +141,7 @@ describe('Create Item page - Graphing: All or nothing ', () => {
141
141
  //Correct/incorrect icon
142
142
  //TODO: Remove comment after https://redmine.zeuslearning.com/issues/565569 is resolved
143
143
  //graphingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
144
+ graphingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
144
145
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: 6, xRange: 20, y: 0, yRange: 20 }, { x: 6, xRange: 20, y: 5, yRange: 20 }]);
145
146
  graphingPage.steps.verifyCorrectPointsPlottedOnGraphCorrectAnswerSection([{ x: -6, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 7, yRange: 20 }, { x: -4, xRange: 20, y: 9, yRange: 20 }, { x: -6, xRange: 20, y: 9, yRange: 20 }]);
146
147
  });
@@ -91,7 +91,7 @@ describe('Create item page - Grid fill: All or nothing', () => {
91
91
  });
92
92
  };
93
93
  //Failed due to https://redmine.zeuslearning.com/issues/565569
94
- it('When the user selects \'Grading\' view without attempting the question, correct answer tick should be displayed in correct answer cell', () => {
94
+ it('When the user selects \'Grading\' view without attempting the question, correct answer tick should be displayed in correct answer cell and correct/incorrect status message should not be displayed', () => {
95
95
  if (view === 'Grading view') {
96
96
  studentViewPage.steps.submitResponse();
97
97
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'exist');
@@ -106,7 +106,7 @@ describe('Create item page - Grid fill: All or nothing', () => {
106
106
  gridFillPage.steps.verifyCorrectIncorrectResponseIconNotExistPreviewTab(0, 1);
107
107
  gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 0);
108
108
  gridFillPage.steps.verifyCorrectResponseIconCorrectAnswerSection(0, 1);
109
- gridFillPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
109
+ gridFillPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
110
110
  });
111
111
 
112
112
  it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed in the incorrect cell, incorrect answer border around incorrect cell and correct icon should be displayed in the correct cell, correct answer border around correct cell and a status message with text \'Your answer is incorrect\' in question preview', () => {
@@ -107,7 +107,7 @@ describe('Create item page - Image highlight: All or nothing ', () => {
107
107
  });
108
108
  };
109
109
 
110
- it('When the user selects \'Grading\' view without attempting the question, highlight numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
110
+ it('When the user selects \'Grading\' view without attempting the question, highlight numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
111
111
  if (view === 'Grading view') {
112
112
  studentViewPage.steps.submitResponse();
113
113
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -119,7 +119,7 @@ describe('Create item page - Image highlight: All or nothing ', () => {
119
119
  imageHighlightPage.steps.switchToGradingView();
120
120
  imageHighlightPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
121
121
  };
122
- imageHighlightPage.steps.verifyHighlightRegionNumerationPreviewTab()
122
+ imageHighlightPage.steps.verifyHighlightRegionNumerationPreviewTab();
123
123
  imageHighlightPage.steps.verifyCorrectHighlightRegionNotAttemptedGradingView(0);
124
124
  imageHighlightPage.steps.verifyCorrectHighlightRegionNotAttemptedGradingView(1);
125
125
  imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
@@ -96,7 +96,7 @@ describe('Create item page - List ordering: All or nothing ', () => {
96
96
  });
97
97
  };
98
98
 
99
- it('When the user selects \'Grading\' view without attempting the question, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
99
+ it('When the user selects \'Grading\' view without attempting the question, then correct/incorrect icons and correct incorrect status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
100
100
  if (view === 'Grading view') {
101
101
  studentViewPage.steps.submitResponse();
102
102
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -108,11 +108,8 @@ describe('Create item page - List ordering: All or nothing ', () => {
108
108
  listOrderingPage.steps.switchToGradingView();
109
109
  listOrderingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
110
110
  };
111
- listOrderingPage.steps.verifyIncorrectOptionIcon('sprout');
112
- listOrderingPage.steps.verifyIncorrectOptionIcon('plant');
113
- listOrderingPage.steps.verifyIncorrectOptionIcon('flower');
114
- listOrderingPage.steps.verifyIncorrectOptionIcon('seed');
115
- listOrderingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
111
+ listOrderingPage.steps.verifyCorrectIncorrectIconsNotExist();
112
+ listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
116
113
  utilities.verifyInnerText(listOrderingPage.correctAnswersLabel(), 'Correct answers');
117
114
  listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
118
115
  });
@@ -96,7 +96,7 @@ describe('Create item page - Matching: All or nothing ', () => {
96
96
  });
97
97
  };
98
98
 
99
- it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
99
+ it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
100
100
  if (view === 'Grading view') {
101
101
  studentViewPage.steps.submitResponse();
102
102
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
@@ -109,6 +109,8 @@ describe('Create item page - Matching: All or nothing ', () => {
109
109
  matchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
110
110
  };
111
111
  matchingPage.steps.verifyDropzoneNumeration();
112
+ matchingPage.steps.verifyCorrectIncorrectIconsNotExist();
113
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
112
114
  utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
113
115
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
114
116
  });