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.
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +349 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +348 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +415 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingPenaltyScoring.js +54 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightBasic.js +254 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightBasic.js +255 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +3 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +2 -0
- package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +2 -0
- package/cypress/e2e/ILC/ImageHighlight/toolsFunctionalityEditTab.js +2 -2
- package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +270 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsBasic.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +236 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialEqualWeightsBasic.js +150 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/setPointsPopup.js +88 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +97 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/studentViewSettings.js +134 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/additionalSettings.js +131 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabBasicSection.js +167 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +202 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/headerSection.js +76 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/manuallyAndNonScoredEditTab.js +72 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/minimumScoringPenaltyPointsAndRoundingDropdown.js +197 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/optionsOrientationSection.js +180 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/studentViewSettings.js +130 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionsPanel.js +121 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneConnectorStyle.js +68 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionAlignment.js +71 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionPlacement.js +64 -0
- package/cypress/e2e/ILC/MatchingDropdown/styleAndLayoutCustomization.js +270 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +272 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +6 -6
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/pages/audioPlayerPage.js +4 -4
- package/cypress/pages/audioResponsePage.js +9 -1
- package/cypress/pages/chartsBarPage.js +3 -3
- package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +51 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/pages/components/index.js +1 -10
- package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +604 -0
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -6
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
- package/cypress/pages/essayResponseBasicPage.js +4 -4
- package/cypress/pages/essayResponseMathPage.js +4 -4
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
- package/cypress/pages/index.js +0 -1
- package/cypress/pages/itemPreviewPage.js +1 -2
- package/cypress/pages/itemPreviewSettingsPage.js +3 -3
- package/cypress/pages/listOrderingPage.js +384 -10
- package/cypress/pages/matchingPage.js +512 -13
- package/cypress/pages/multipleSelectionPage.js +2 -2
- package/cypress/pages/numberLineLabelPage.js +3 -3
- package/cypress/pages/shortTextResponsePage.js +0 -37
- package/cypress/pages/singleSelectionPage.js +2 -2
- package/cypress/pages/textEntryMathPage.js +41 -9
- package/cypress/pages/textSelectionPage.js +2 -2
- package/cypress/pages/uploadResponsePage.js +2 -3
- package/cypress/pages/videoResponsePage.js +9 -2
- package/package.json +1 -1
- package/cypress/fixtures/specialAndMathCharacters.js +0 -120
- package/cypress/pages/components/autoScoredAdditionalSettings.js +0 -183
- package/cypress/pages/components/autoScoredPreviewBase.js +0 -92
- package/cypress/pages/components/autoScoredScoringSection.js +0 -199
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +0 -377
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +0 -297
- package/cypress/pages/components/autoScoredStudentViewSettingsForPredefinedOptions.js +0 -84
- package/cypress/pages/components/listSortingAndOrderingBase.js +0 -401
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +0 -91
- package/cypress/pages/components/scoringSectionBase.js +0 -354
- package/cypress/pages/components/specialAndCustomSpecialCharactersComponent.js +0 -80
- package/cypress/pages/components/specialCharactersFlyoutComponent.js +0 -59
- package/cypress/pages/listSortingPage.js +0 -1198
@@ -0,0 +1,604 @@
|
|
1
|
+
import utilities from "../../support/helpers/utilities"
|
2
|
+
import { listOrderingPage } from "../listOrderingPage";
|
3
|
+
import { colorPopupComponent } from "./colorPopupComponent";
|
4
|
+
import { commonComponents } from "./commonComponents";
|
5
|
+
import { createQuestionBasePage } from "./createQuestionBasePage";
|
6
|
+
const css = Cypress.env('css');
|
7
|
+
|
8
|
+
const selectors = {
|
9
|
+
...listOrderingPage,
|
10
|
+
fillColorLabel: () => cy.get('.sub-section-label').eq(0),
|
11
|
+
fillColorLabelListContainer: () => cy.get('.sub-section-label').eq(2),
|
12
|
+
colorBlock: () => cy.get('.color-grid-wrapper .color-picker-block'),
|
13
|
+
borderColorLabel: () => cy.get('.sub-section-label').eq(1),
|
14
|
+
borderColorLabelListContainer: () => cy.get('.sub-section-label').eq(3),
|
15
|
+
editColorButton: () => cy.get('button[aria-label="edit color"]'),
|
16
|
+
colorBlockSelectedIcon: () => cy.get('[class*="BtnSelectionWrapper"] svg'),
|
17
|
+
optionStyleLabel: () => cy.get('.options-border-style .options-label').eq(0),
|
18
|
+
borderStyleLabel: () => cy.get('.options-border-style .options-label').eq(1),
|
19
|
+
borderStyleLabelListContainer: () => cy.get('.options-border-style .options-label').eq(2),
|
20
|
+
connectorSettingLabel: () => cy.get('.options-border-style .options-label').eq(2),
|
21
|
+
dottedBorderStyleToggleButton: () => cy.get('[data-ngie-testid="dotted-toggle-button"]').eq(0),
|
22
|
+
solidBorderStyleToggleButton: () => cy.get('[data-ngie-testid="solid-toggle-button"]').eq(0),
|
23
|
+
dottedBorderStyleToggleButtonListContainer: () => cy.get('[data-ngie-testid="dotted-toggle-button"]').eq(1),
|
24
|
+
solidBorderStyleToggleButtonListContainer: () => cy.get('[data-ngie-testid="solid-toggle-button"]').eq(1),
|
25
|
+
noneBorderStyleToggleButton: () => cy.get('[data-ngie-testid="none-toggle-button"]').eq(0),
|
26
|
+
specifyCorrectanswerSectionOption: () => cy.get('[class*="ListOrderingResponsestyles__ItemWrapper"]'),
|
27
|
+
specifyCorrectanswerSectionOptionSeperateList: () => cy.get('[class*="DraggableItemstyle__ItemWrapper"]'),
|
28
|
+
dropzoneSeperateList: () => cy.get('[class*="MultipleDroppableHotspotstyle__DroppableHotspotWrapper"]'),
|
29
|
+
}
|
30
|
+
|
31
|
+
const steps = {
|
32
|
+
/**
|
33
|
+
* Verifies the color of a color block.
|
34
|
+
* @param {number} blockIndex - The index of the color block.
|
35
|
+
* @param {string} color - The expected background color of the color block.
|
36
|
+
*/
|
37
|
+
verifyColorBlockColor: (blockIndex, color) => {
|
38
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.colorBlock(), blockIndex), {
|
39
|
+
'background-color': color
|
40
|
+
});
|
41
|
+
},
|
42
|
+
|
43
|
+
/**
|
44
|
+
* @param {number} blockIndex index of the color block in the style and layout customization section
|
45
|
+
* @description this function verifies the selected state of a block
|
46
|
+
*/
|
47
|
+
verifyColorBlockSelectedState: (blockIndex) => {
|
48
|
+
utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.colorBlock(), blockIndex)
|
49
|
+
.should('have.class', 'selected-button-icon')
|
50
|
+
.within(() => {
|
51
|
+
utilities.verifyElementVisibilityState(listOrderingCommonStyleAndLayoutComponent.colorBlockSelectedIcon(), 'visible');
|
52
|
+
});
|
53
|
+
},
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Verifies the color of a color block.
|
57
|
+
* @param {number} blockIndex - The index of the color block.
|
58
|
+
* @param {string} color - The expected background color of the color block.
|
59
|
+
*/
|
60
|
+
verifyColorBlockColor: (blockIndex, color) => {
|
61
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.colorBlock(), blockIndex), {
|
62
|
+
'background-color': color
|
63
|
+
});
|
64
|
+
},
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Verifies the selected state of a border style toggle button.
|
68
|
+
* @param {('Dotted' | 'Solid')} button - The border style to verify.
|
69
|
+
* @throws {Error} Throws an error if an invalid border style is provided.
|
70
|
+
*/
|
71
|
+
verifyBorderStyleToggleButtonSelectedState: (button) => {
|
72
|
+
switch (button) {
|
73
|
+
case 'Dotted':
|
74
|
+
listOrderingCommonStyleAndLayoutComponent.dottedBorderStyleToggleButton()
|
75
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
76
|
+
break;
|
77
|
+
case 'Solid':
|
78
|
+
listOrderingCommonStyleAndLayoutComponent.solidBorderStyleToggleButton()
|
79
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
80
|
+
break;
|
81
|
+
default:
|
82
|
+
throw new Error('Invalid border style');
|
83
|
+
}
|
84
|
+
},
|
85
|
+
|
86
|
+
/**
|
87
|
+
* Selects a border style toggle button and verifies it has the selected class.
|
88
|
+
* @param {('Dashed' | 'Dotted' | 'Solid' | 'None')} button - The border style to select.
|
89
|
+
* @throws {Error} Throws an error if an invalid border style is provided.
|
90
|
+
*/
|
91
|
+
selectBorderStyleToggleButtonOfListContainer: (button) => {
|
92
|
+
switch (button) {
|
93
|
+
case 'Dotted':
|
94
|
+
listOrderingCommonStyleAndLayoutComponent.dottedBorderStyleToggleButtonListContainer()
|
95
|
+
.click()
|
96
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
97
|
+
break;
|
98
|
+
case 'Solid':
|
99
|
+
listOrderingCommonStyleAndLayoutComponent.solidBorderStyleToggleButtonListContainer()
|
100
|
+
.click()
|
101
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
102
|
+
break;
|
103
|
+
case 'None':
|
104
|
+
listOrderingCommonStyleAndLayoutComponent.noneBorderStyleToggleButton()
|
105
|
+
.click()
|
106
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
107
|
+
break;
|
108
|
+
default:
|
109
|
+
throw new Error('Invalid border style');
|
110
|
+
}
|
111
|
+
},
|
112
|
+
|
113
|
+
/**
|
114
|
+
* Verifies the selected state of a border style toggle button in list container.
|
115
|
+
* @param {('Dotted' | 'Solid' | 'None')} button - The border style to verify.
|
116
|
+
* @throws {Error} Throws an error if an invalid border style is provided.
|
117
|
+
*/
|
118
|
+
verifyBorderStyleToggleButtonSelectedStateListContainer: (button) => {
|
119
|
+
switch (button) {
|
120
|
+
case 'Dotted':
|
121
|
+
listOrderingCommonStyleAndLayoutComponent.dottedBorderStyleToggleButtonListContainer()
|
122
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
123
|
+
break;
|
124
|
+
case 'Solid':
|
125
|
+
listOrderingCommonStyleAndLayoutComponent.solidBorderStyleToggleButtonListContainer()
|
126
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
127
|
+
break;
|
128
|
+
case 'None':
|
129
|
+
listOrderingCommonStyleAndLayoutComponent.noneBorderStyleToggleButton()
|
130
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
131
|
+
break;
|
132
|
+
default:
|
133
|
+
throw new Error('Invalid border style');
|
134
|
+
}
|
135
|
+
},
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Verifies the background color of a response area element.
|
139
|
+
* @param {number} responseAreaIndex - The index of the response area to verify.
|
140
|
+
* @param {string} colorValue - The expected background color value.
|
141
|
+
*/
|
142
|
+
verifyFillColorInOptions: (responseAreaIndex, colorValue, listType) => {
|
143
|
+
if(listType === "SameList") {
|
144
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.specifyCorrectanswerSectionOption(), responseAreaIndex), {
|
145
|
+
'background-color': colorValue
|
146
|
+
});
|
147
|
+
} else if (listType === "SeperateList") {
|
148
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.specifyCorrectanswerSectionOptionSeperateList(), responseAreaIndex), {
|
149
|
+
'background-color': colorValue
|
150
|
+
});
|
151
|
+
}
|
152
|
+
},
|
153
|
+
|
154
|
+
/**
|
155
|
+
* Verifies the background color of list container.
|
156
|
+
* @param {string} colorValue - The expected background color value.
|
157
|
+
*/
|
158
|
+
verifyFillColorOfListContainer: (colorValue) => {
|
159
|
+
utilities.verifyCSS(listOrderingCommonStyleAndLayoutComponent.dropzoneSeperateList(), {
|
160
|
+
'background-color': colorValue
|
161
|
+
});
|
162
|
+
},
|
163
|
+
|
164
|
+
/**
|
165
|
+
* Selects a color block by index.
|
166
|
+
* @param {number} blockIndex - The index of the color block to select.
|
167
|
+
*/
|
168
|
+
selectColorBlock: (blockIndex) => {
|
169
|
+
utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.colorBlock(), blockIndex)
|
170
|
+
.click();
|
171
|
+
},
|
172
|
+
|
173
|
+
/**
|
174
|
+
* Clicks on the edit color button.
|
175
|
+
* @param {number} buttonIndex - The index of the edit color button.
|
176
|
+
*/
|
177
|
+
editColor: (buttonIndex) => {
|
178
|
+
utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.editColorButton(), buttonIndex)
|
179
|
+
.click();
|
180
|
+
},
|
181
|
+
|
182
|
+
/**
|
183
|
+
* Verifies the border color of element.
|
184
|
+
* @param {number} responseAreaIndex - The index of the option to verify.
|
185
|
+
* @param {string} colorValue - The expected border color value.
|
186
|
+
*/
|
187
|
+
verifyBorderColorInOptions: (responseAreaIndex, colorValue, listType) => {
|
188
|
+
if(listType === "SameList") {
|
189
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.specifyCorrectanswerSectionOption(), responseAreaIndex), {
|
190
|
+
'border': colorValue
|
191
|
+
});
|
192
|
+
} else if (listType === "SeperateList") {
|
193
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent. specifyCorrectanswerSectionOptionSeperateList(), responseAreaIndex), {
|
194
|
+
'border': colorValue
|
195
|
+
});
|
196
|
+
}
|
197
|
+
},
|
198
|
+
|
199
|
+
/**
|
200
|
+
* Verifies the border color of list container.
|
201
|
+
* @param {string} colorValue - The expected border color value.
|
202
|
+
*/
|
203
|
+
verifyBorderColorOfListContainer: (colorValue) => {
|
204
|
+
utilities.verifyCSS(listOrderingCommonStyleAndLayoutComponent.dropzoneSeperateList(), {
|
205
|
+
'border': colorValue
|
206
|
+
});
|
207
|
+
},
|
208
|
+
|
209
|
+
/**
|
210
|
+
* Verifies the border style of element.
|
211
|
+
* @param {number} responseAreaIndex - The index of the options to verify.
|
212
|
+
* @param {string} borderStyle - The expected border style value.
|
213
|
+
*/
|
214
|
+
verifyBorderStyleInOptions: (responseAreaIndex, borderStyle, listType) => {
|
215
|
+
const styleName = borderStyle.toLowerCase();
|
216
|
+
if(listType === "SameList") {
|
217
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.specifyCorrectanswerSectionOption(), responseAreaIndex), {
|
218
|
+
'border-style': styleName
|
219
|
+
});
|
220
|
+
} else if (listType === "SeperateList") {
|
221
|
+
utilities.verifyCSS(utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.specifyCorrectanswerSectionOptionSeperateList(), responseAreaIndex), {
|
222
|
+
'border-style': styleName
|
223
|
+
});
|
224
|
+
}
|
225
|
+
},
|
226
|
+
|
227
|
+
/**
|
228
|
+
* Verifies the border style of element.
|
229
|
+
* @param {number} responseAreaIndex - The index of the options to verify.
|
230
|
+
* @param {string} borderStyle - The expected border style value.
|
231
|
+
*/
|
232
|
+
verifyBorderStyleOfListContainer: (borderStyle) => {
|
233
|
+
const styleName = borderStyle.toLowerCase();
|
234
|
+
utilities.verifyCSS(listOrderingCommonStyleAndLayoutComponent.dropzoneSeperateList(), {
|
235
|
+
'border-style': styleName
|
236
|
+
});
|
237
|
+
},
|
238
|
+
|
239
|
+
/**
|
240
|
+
* Selects a border style toggle button and verifies it has the selected class.
|
241
|
+
* @param {('Dashed' | 'Dotted' | 'Solid' | 'None')} button - The border style to select.
|
242
|
+
* @throws {Error} Throws an error if an invalid border style is provided.
|
243
|
+
*/
|
244
|
+
selectBorderStyleToggleButton: (button) => {
|
245
|
+
switch (button) {
|
246
|
+
case 'Dotted':
|
247
|
+
listOrderingCommonStyleAndLayoutComponent.dottedBorderStyleToggleButton()
|
248
|
+
.click()
|
249
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
250
|
+
break;
|
251
|
+
case 'Solid':
|
252
|
+
listOrderingCommonStyleAndLayoutComponent.solidBorderStyleToggleButton()
|
253
|
+
.click()
|
254
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
255
|
+
break;
|
256
|
+
case 'None':
|
257
|
+
listOrderingCommonStyleAndLayoutComponent.noneBorderStyleToggleButton()
|
258
|
+
.click()
|
259
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
260
|
+
break;
|
261
|
+
default:
|
262
|
+
throw new Error('Invalid border style');
|
263
|
+
}
|
264
|
+
},
|
265
|
+
|
266
|
+
clickInColorSaturationPalette: () => {
|
267
|
+
colorPopupComponent.colorSaturationPalette()
|
268
|
+
.click();
|
269
|
+
},
|
270
|
+
|
271
|
+
clickOnCancelButton: () => {
|
272
|
+
colorPopupComponent.cancelButton()
|
273
|
+
.click();
|
274
|
+
},
|
275
|
+
|
276
|
+
clickOnOkButton: () => {
|
277
|
+
colorPopupComponent.okButton()
|
278
|
+
.click();
|
279
|
+
},
|
280
|
+
|
281
|
+
switchToEditTab: () => {
|
282
|
+
createQuestionBasePage.editTab()
|
283
|
+
.click()
|
284
|
+
.should('have.attr', 'aria-selected', 'true');
|
285
|
+
},
|
286
|
+
|
287
|
+
switchToPreviewTab: () => {
|
288
|
+
cy.wait(2000);
|
289
|
+
createQuestionBasePage.previewTab()
|
290
|
+
.click()
|
291
|
+
.should('have.attr', 'aria-selected', 'true');
|
292
|
+
},
|
293
|
+
}
|
294
|
+
|
295
|
+
const tests = {
|
296
|
+
verifyFillColorSectionContents: () => {
|
297
|
+
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(255, 255, 255)" and the other color block should have "No color"', () => {
|
298
|
+
utilities.verifyInnerText(listOrderingCommonStyleAndLayoutComponent.fillColorLabel(), 'Fill color');
|
299
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyColorBlockColor(0, "rgb(255, 255, 255)");
|
300
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyColorBlockSelectedState(0);
|
301
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyColorBlockColor(1, css.color.none);
|
302
|
+
utilities.verifyInnerText(utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.editColorButton(), 0), 'Edit color');
|
303
|
+
utilities.verifyElementVisibilityState(listOrderingCommonStyleAndLayoutComponent.editColorButton(), 'visible');
|
304
|
+
});
|
305
|
+
},
|
306
|
+
|
307
|
+
verifyBorderColorSectionContents: () => {
|
308
|
+
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(107, 139, 255)" and the other color block should have "No color"', () => {
|
309
|
+
utilities.verifyInnerText(listOrderingCommonStyleAndLayoutComponent.borderColorLabel(), 'Border color');
|
310
|
+
utilities.verifyInnerText(utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.editColorButton(), 1), 'Edit color');
|
311
|
+
utilities.verifyElementVisibilityState(listOrderingCommonStyleAndLayoutComponent.editColorButton(), 'visible');
|
312
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyColorBlockColor(2, "rgb(107, 139, 255)");
|
313
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyColorBlockSelectedState(2);
|
314
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyColorBlockColor(3, css.color.none);
|
315
|
+
});
|
316
|
+
},
|
317
|
+
|
318
|
+
/**
|
319
|
+
* Verifies the contents of the "Border style" section.
|
320
|
+
* This function checks that the "Border style" label and two toggle buttons
|
321
|
+
* ( "Dotted", "Solid") are displayed, and that the specified
|
322
|
+
* toggle button is in the selected state by default.
|
323
|
+
* @param {string} selectedStyle - The style that should be selected by default. It should be one of 'Dotted' or 'Solid'.
|
324
|
+
*/
|
325
|
+
verifyBorderStyleSectionContents: (selectedStyle) => {
|
326
|
+
it(`"Border style" label and two toggle buttons should be displayed - "Dotted", "Solid". By default ${selectedStyle} button should be in selected state`, () => {
|
327
|
+
utilities.verifyInnerText(listOrderingCommonStyleAndLayoutComponent.borderStyleLabel(), 'Border style');
|
328
|
+
utilities.verifyInnerText(listOrderingCommonStyleAndLayoutComponent.dottedBorderStyleToggleButton(), 'Dotted');
|
329
|
+
utilities.verifyElementVisibilityState(listOrderingCommonStyleAndLayoutComponent.dottedBorderStyleToggleButton(), 'visible');
|
330
|
+
utilities.verifyInnerText(listOrderingCommonStyleAndLayoutComponent.solidBorderStyleToggleButton(), 'Solid');
|
331
|
+
utilities.verifyElementVisibilityState(listOrderingCommonStyleAndLayoutComponent.solidBorderStyleToggleButton(), 'visible');
|
332
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderStyleToggleButtonSelectedState(selectedStyle);
|
333
|
+
});
|
334
|
+
},
|
335
|
+
|
336
|
+
verifyFillColorTooltips: () => {
|
337
|
+
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', () => {
|
338
|
+
utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.colorBlock(), 0).verifyTooltip('#FFFFFF');
|
339
|
+
utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.colorBlock(), 1).verifyTooltip('None');
|
340
|
+
});
|
341
|
+
},
|
342
|
+
|
343
|
+
verifyBorderColorTooltips: () => {
|
344
|
+
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', () => {
|
345
|
+
utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.colorBlock(), 2).verifyTooltip('#6B8BFF');
|
346
|
+
utilities.getNthElement(listOrderingCommonStyleAndLayoutComponent.colorBlock(), 3).verifyTooltip('None');
|
347
|
+
});
|
348
|
+
},
|
349
|
+
|
350
|
+
verifyFillColorFunctionalityEditTab: (listType) => {
|
351
|
+
const modifiedColor = 'rgb(121, 60, 60)'
|
352
|
+
|
353
|
+
it('When the default color block is in selected state in the \'Fill color\'section, then the background color of the options in the specify correct answer section should be the default selected color', () => {
|
354
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorInOptions(0, 'rgb(255, 255, 255)', listType);
|
355
|
+
});
|
356
|
+
|
357
|
+
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 options in the specify correct answer section', () => {
|
358
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(1);
|
359
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorInOptions(0, 'rgb(255, 255, 255)', listType);
|
360
|
+
});
|
361
|
+
|
362
|
+
it('When the user clicks on the \'Edit color\' button, modifies color for the selected color block, then the background color of the options in the specify correct answer section should be the modified selected color', () => {
|
363
|
+
listOrderingCommonStyleAndLayoutComponent.steps.editColor(0);
|
364
|
+
listOrderingCommonStyleAndLayoutComponent.steps.clickInColorSaturationPalette();
|
365
|
+
listOrderingCommonStyleAndLayoutComponent.steps.clickOnOkButton();
|
366
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorInOptions(0, modifiedColor, listType);
|
367
|
+
});
|
368
|
+
},
|
369
|
+
|
370
|
+
verifyFillColorFunctionalityOfListContainerEditTab: () => {
|
371
|
+
const modifiedColor = 'rgb(121, 60, 60)'
|
372
|
+
|
373
|
+
it('When the default color block is in selected state in the \'Fill color\' section of \'List Container\', then the background color of the container in the specify correct answer section should be the default selected color', () => {
|
374
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorOfListContainer('rgb(245, 248, 255)');
|
375
|
+
});
|
376
|
+
|
377
|
+
it('When the user selects the "None" color block of \'List Container\', it should get in selected state and the no background color should be present for the container in the specify correct answer section', () => {
|
378
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(5);
|
379
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorOfListContainer('rgb(255, 255, 255)');
|
380
|
+
});
|
381
|
+
|
382
|
+
it('When the user clicks on the "Edit color" button of \'List Container\', modifies color for the selected color block, then the background color of the container in the specify correct answer section should be the modified selected color', () => {
|
383
|
+
listOrderingCommonStyleAndLayoutComponent.steps.editColor(2);
|
384
|
+
listOrderingCommonStyleAndLayoutComponent.steps.clickInColorSaturationPalette();
|
385
|
+
listOrderingCommonStyleAndLayoutComponent.steps.clickOnOkButton();
|
386
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorOfListContainer(modifiedColor);
|
387
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(4);
|
388
|
+
});
|
389
|
+
},
|
390
|
+
|
391
|
+
verifyBorderColorFunctionalityEditTab: (listType) => {
|
392
|
+
const modifiedColor = 'rgb(121, 60, 60)'
|
393
|
+
|
394
|
+
it('When the default color block is in selected state in the \'Border color\' section, then the background color of the options in the specify correct answer section should be the default selected color', () => {
|
395
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(0);
|
396
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorInOptions(0, '1px solid rgb(107, 139, 255)', listType);
|
397
|
+
});
|
398
|
+
|
399
|
+
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 options in the specify correct answer section', () => {
|
400
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(3);
|
401
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorInOptions(0, '1px solid rgb(255, 255, 255)', listType);
|
402
|
+
});
|
403
|
+
|
404
|
+
it('When the user clicks on the "Edit color" button, modifies color for the selected color block, then the background color of the options in the specify correct answer section should be the modified selected color', () => {
|
405
|
+
listOrderingCommonStyleAndLayoutComponent.steps.editColor(1);
|
406
|
+
colorPopupComponent.steps.clickInColorSaturationPalette();
|
407
|
+
colorPopupComponent.steps.clickOnOkButton();
|
408
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorInOptions(0, `1px solid ${modifiedColor}`, listType);
|
409
|
+
});
|
410
|
+
},
|
411
|
+
|
412
|
+
verifyBorderColorFunctionalityOfListContainerEditTab: () => {
|
413
|
+
const modifiedColor = 'rgb(121, 60, 60)'
|
414
|
+
|
415
|
+
it('When the default color block is in selected state in the \'Border color\' section of \'List Container\', then the background color of the container in the specify correct answer section should be the default selected color', () => {
|
416
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(6);
|
417
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorOfListContainer('2px dotted rgb(82, 0, 255)');
|
418
|
+
});
|
419
|
+
|
420
|
+
it('When the user selects the "None" color block of \'List Container\', it should get in selected state and the no background color should be present for the container in the specify correct answer section', () => {
|
421
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(7);
|
422
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorOfListContainer('2px dotted rgb(255, 255, 255)');
|
423
|
+
});
|
424
|
+
|
425
|
+
it('When the user clicks on the "Edit color" button of \'List Container\', modifies color for the selected color block, then the background color of the container in the specify correct answer section should be the modified selected color', () => {
|
426
|
+
listOrderingCommonStyleAndLayoutComponent.steps.editColor(3);
|
427
|
+
colorPopupComponent.steps.clickInColorSaturationPalette();
|
428
|
+
colorPopupComponent.steps.clickOnOkButton();
|
429
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorOfListContainer(`2px dotted ${modifiedColor}`);
|
430
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(6);
|
431
|
+
});
|
432
|
+
},
|
433
|
+
|
434
|
+
verifyBorderStyleFunctionalityEditTab: (listType) => {
|
435
|
+
const borderStyles = ["Dotted", "Solid"]
|
436
|
+
it('When the \'Solid\' border style is in selected state, then the border style of the container in the specify correct answer section should be "Solid"', () => {
|
437
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderStyleInOptions(0, 'solid', listType);
|
438
|
+
});
|
439
|
+
|
440
|
+
borderStyles.forEach((style) => {
|
441
|
+
it(`When the user selects ${style}, then the border style of the container in the specify correct answer section should update to ${style}`, () => {
|
442
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectBorderStyleToggleButton(style);
|
443
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderStyleInOptions(0, style, listType);
|
444
|
+
});
|
445
|
+
})
|
446
|
+
},
|
447
|
+
|
448
|
+
verifyBorderStyleFunctionalityOfListContainerEditTab: () => {
|
449
|
+
const borderStyles = ["Dotted", "Solid", "None"]
|
450
|
+
it('When the \'Dotted\' border style of \'List Container\' is in selected state, then the border style of the options in the specify correct answer section should be "Solid"', () => {
|
451
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderStyleOfListContainer('dotted');
|
452
|
+
});
|
453
|
+
|
454
|
+
borderStyles.forEach((style) => {
|
455
|
+
it(`When the user selects ${style} of \'List Container\', then the border style of the options in the specify correct answer section should update to ${style}`, () => {
|
456
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectBorderStyleToggleButtonOfListContainer(style);
|
457
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderStyleOfListContainer(style);
|
458
|
+
});
|
459
|
+
})
|
460
|
+
},
|
461
|
+
|
462
|
+
verifyFillColorFunctionalityPreviewTab: (listType) => {
|
463
|
+
const modifiedColor = 'rgb(121, 60, 60)'
|
464
|
+
|
465
|
+
it('When the default color block is in selected state in the \'Fill color\' section, then the background color of the options in the preview tab should be the default selected color', () => {
|
466
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
467
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorInOptions(0, 'rgb(255, 255, 255)', listType);
|
468
|
+
});
|
469
|
+
|
470
|
+
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 options in the preview tab', () => {
|
471
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
472
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(1);
|
473
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
474
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorInOptions(0, 'rgb(255, 255, 255)', listType);
|
475
|
+
});
|
476
|
+
|
477
|
+
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', () => {
|
478
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
479
|
+
listOrderingCommonStyleAndLayoutComponent.steps.editColor(0);
|
480
|
+
colorPopupComponent.steps.clickInColorSaturationPalette();
|
481
|
+
colorPopupComponent.steps.clickOnOkButton();
|
482
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
483
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorInOptions(0, modifiedColor, listType);
|
484
|
+
});
|
485
|
+
},
|
486
|
+
|
487
|
+
verifyFillColorFunctionalityOfListContainerPreviewTab: () => {
|
488
|
+
const modifiedColor = 'rgb(121, 60, 60)'
|
489
|
+
|
490
|
+
it('When the default color block is in selected state in the \'Fill color\' section of \'List Container\', then the background color of the container in the preview tab should be the default selected color', () => {
|
491
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
492
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorOfListContainer('rgb(245, 248, 255)');
|
493
|
+
});
|
494
|
+
|
495
|
+
it('When the user selects the \'None\' color block of \'List Container\', it should get in selected state and the no background color should be present for the container in the preview tab', () => {
|
496
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
497
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(5);
|
498
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
499
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorOfListContainer('rgb(255, 255, 255)');
|
500
|
+
});
|
501
|
+
|
502
|
+
it('When the user clicks on the \'Edit color\' button of \'List Container\', modifies color for the selected color block, then the color block should get updated accordingly', () => {
|
503
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
504
|
+
listOrderingCommonStyleAndLayoutComponent.steps.editColor(2);
|
505
|
+
colorPopupComponent.steps.clickInColorSaturationPalette();
|
506
|
+
colorPopupComponent.steps.clickOnOkButton();
|
507
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
508
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyFillColorOfListContainer(modifiedColor);
|
509
|
+
});
|
510
|
+
},
|
511
|
+
|
512
|
+
verifyBorderColorFunctionalityPreviewTab: (listType) => {
|
513
|
+
const modifiedColor = 'rgb(121, 60, 60)'
|
514
|
+
|
515
|
+
it('When the default color block is in selected state in the \'Border color\' section, then the background color of the options in the preview tab should be the default selected color', () => {
|
516
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
517
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(0);
|
518
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
519
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorInOptions(0, '1px solid rgb(107, 139, 255)', listType);
|
520
|
+
});
|
521
|
+
|
522
|
+
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 options in the preview tab', () => {
|
523
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
524
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(3);
|
525
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
526
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorInOptions(0, '1px solid rgb(255, 255, 255)', listType);
|
527
|
+
});
|
528
|
+
|
529
|
+
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', () => {
|
530
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
531
|
+
listOrderingCommonStyleAndLayoutComponent.steps.editColor(1);
|
532
|
+
colorPopupComponent.steps.clickInColorSaturationPalette();
|
533
|
+
colorPopupComponent.steps.clickOnOkButton();
|
534
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
535
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorInOptions(0, `1px solid ${modifiedColor}`, listType);
|
536
|
+
});
|
537
|
+
},
|
538
|
+
|
539
|
+
verifyBorderColorFunctionalityOfListConatinerPreviewTab: () => {
|
540
|
+
const modifiedColor = 'rgb(121, 60, 60)'
|
541
|
+
|
542
|
+
it('When the default color block is in selected state in the \'Border color\' section of \'List Container\', then the background color of the container in the preview tab should be the default selected color', () => {
|
543
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
544
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(4);
|
545
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(6);
|
546
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
547
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorOfListContainer('2px dotted rgb(82, 0, 255)');
|
548
|
+
});
|
549
|
+
|
550
|
+
it('When the user selects the \'None\' color block of \'List Container\', it should get in selected state and the no background color should be present for the container in the preview tab', () => {
|
551
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
552
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectColorBlock(7);
|
553
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
554
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorOfListContainer('2px dotted rgb(255, 255, 255)');
|
555
|
+
});
|
556
|
+
|
557
|
+
it('When the user clicks on the \'Edit color\' button of \'List Container\', modifies color for the selected color block, then the color block should get updated accordingly', () => {
|
558
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
559
|
+
listOrderingCommonStyleAndLayoutComponent.steps.editColor(3);
|
560
|
+
colorPopupComponent.steps.clickInColorSaturationPalette();
|
561
|
+
colorPopupComponent.steps.clickOnOkButton();
|
562
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
563
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderColorOfListContainer(`2px dotted ${modifiedColor}`);
|
564
|
+
});
|
565
|
+
},
|
566
|
+
|
567
|
+
verifyBorderStyleFunctionalityPreviewTab: (listType) => {
|
568
|
+
const borderStyles = ["Dotted", "Solid"]
|
569
|
+
it('When the "Solid" border style is in selected state, then the border style of the text options in the preview tab should be "solid"', () => {
|
570
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderStyleInOptions(0, 'solid', listType);
|
571
|
+
});
|
572
|
+
|
573
|
+
borderStyles.forEach((style) => {
|
574
|
+
it(`When the user selects ${style}, then the border style of the text options in the preview tab should update to ${style}`, () => {
|
575
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
576
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectBorderStyleToggleButton(style);
|
577
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
578
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderStyleInOptions(0, style, listType);
|
579
|
+
});
|
580
|
+
})
|
581
|
+
},
|
582
|
+
|
583
|
+
verifyBorderStyleFunctionalityOfListContainerPreviewTab: () => {
|
584
|
+
const borderStyles = ["Dotted", "Solid", "None"]
|
585
|
+
it('When the \'Dotted\' border style of \'List Container\' is in selected state, then the border style of the text containers in the preview tab should be "solid"', () => {
|
586
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderStyleOfListContainer('dotted');
|
587
|
+
});
|
588
|
+
|
589
|
+
borderStyles.forEach((style) => {
|
590
|
+
it(`When the user selects ${style} of \'List Container\', then the border style of the text containers in the preview tab should update to ${style}`, () => {
|
591
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToEditTab();
|
592
|
+
listOrderingCommonStyleAndLayoutComponent.steps.selectBorderStyleToggleButtonOfListContainer(style);
|
593
|
+
listOrderingCommonStyleAndLayoutComponent.steps.switchToPreviewTab();
|
594
|
+
listOrderingCommonStyleAndLayoutComponent.steps.verifyBorderStyleOfListContainer(style);
|
595
|
+
});
|
596
|
+
})
|
597
|
+
},
|
598
|
+
}
|
599
|
+
|
600
|
+
export const listOrderingCommonStyleAndLayoutComponent = {
|
601
|
+
...selectors,
|
602
|
+
steps,
|
603
|
+
tests,
|
604
|
+
}
|
@@ -183,7 +183,7 @@ const steps = {
|
|
183
183
|
.eq(index)
|
184
184
|
.find('[data-widget="ngie_equation"]')
|
185
185
|
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
186
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
186
|
+
// .contains(constants.CKEditorInputFieldEnteredEquationText); ;
|
187
187
|
},
|
188
188
|
|
189
189
|
/**
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
2
2
|
import { dialogBoxBase } from "../dialogBoxBase";
|
3
3
|
import { commonComponents } from "./commonComponents";
|
4
|
-
import {
|
4
|
+
import { scoringSectionBaseEditTab } from "./scoringSectionBaseEditTab";
|
5
5
|
|
6
6
|
const selector = {
|
7
7
|
...dialogBoxBase,
|
@@ -34,16 +34,16 @@ const steps = {
|
|
34
34
|
*/
|
35
35
|
allotPointsToSetPointsPopupPointsInputField: (pointsArray) => {
|
36
36
|
pointsArray.forEach((points, index) => {
|
37
|
-
|
37
|
+
scoringSectionBaseEditTab.pointsInputField()
|
38
38
|
.eq(index)
|
39
39
|
.clear()
|
40
40
|
.type(points)
|
41
41
|
cy.wait(1000)
|
42
|
-
|
42
|
+
scoringSectionBaseEditTab.pointsInputField()
|
43
43
|
.eq(index)
|
44
44
|
.click()
|
45
45
|
.blur();
|
46
|
-
|
46
|
+
scoringSectionBaseEditTab.pointsInputField()
|
47
47
|
.eq(index)
|
48
48
|
.should('have.value', points)
|
49
49
|
});
|
@@ -57,7 +57,7 @@ const steps = {
|
|
57
57
|
pointsArray.forEach((points, index) => {
|
58
58
|
setPointsPopupBase.dialogBox()
|
59
59
|
.within(() => {
|
60
|
-
|
60
|
+
scoringSectionBaseEditTab.pointsInputField()
|
61
61
|
.eq(index)
|
62
62
|
.should('have.value', points);
|
63
63
|
});
|
@@ -71,7 +71,7 @@ const steps = {
|
|
71
71
|
verifyPointsErrorMessageInSetPointsPopup: (index) => {
|
72
72
|
setPointsPopupBase.dialogBox()
|
73
73
|
.within(() => {
|
74
|
-
|
74
|
+
scoringSectionBaseEditTab.pointsInputField()
|
75
75
|
.eq(index)
|
76
76
|
.parents('[class*="OptionContainerstyle__PointsWrapper"]')
|
77
77
|
.within(() => {
|