itemengine-cypress-automation 1.0.193-packageUpdated-7f1e306.0 → 1.0.193-packageUpdated-0af2e49.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +3 -3
- package/cypress/e2e/ILC/AudioPlayerNew/audioOverviewAndTranscript.js +568 -0
- package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +4 -4
- package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +5 -5
- package/cypress/e2e/ILC/AudioPlayerNew/customizePlayerLayoutSettings.js +2 -2
- package/cypress/e2e/ILC/AudioPlayerNew/headerSection.js +125 -0
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +5 -5
- package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +4 -4
- package/cypress/e2e/ILC/AudioPlayerNew/studentViewSettings.js +3 -3
- package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +19 -17
- package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +7 -4
- package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +366 -0
- package/cypress/e2e/ILC/ChartsLine/checkAnswerFunctionalityForAllViews.smoke.js +183 -0
- package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +281 -0
- package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +595 -0
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +8 -8
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +241 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +241 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternatePoints.js +285 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/manuallyAndNonScored.js +164 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +281 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsScoring.js +467 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +250 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeigtsCorrectPointsGreaterThanAlternativePoints.js +281 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +260 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsScoring.js +184 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +229 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +261 -0
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +409 -0
- package/cypress/e2e/ILC/chartsDotsPlot/checkAnswerFunctionalityForAllViews.smoke.js +199 -0
- package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +223 -0
- package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +402 -0
- package/cypress/pages/audioPlayerPage.js +229 -9
- package/cypress/pages/chartsBarPage.js +2 -70
- package/cypress/pages/chartsDotPlotPage.js +986 -3
- package/cypress/pages/chartsLinePage.js +368 -9
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +0 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/barAndLineChartComponent.js +27 -1
- package/cypress/pages/components/chartsCommonComponent.js +31 -2
- package/cypress/pages/components/createQuestionBasePage.js +1 -0
- package/cypress/pages/components/layoutSectionComponent.js +2 -2
- package/cypress/pages/components/singleMultipleSelectionModeComponent.js +5 -0
- package/cypress/pages/components/toolSettingsComponent.js +2 -2
- package/cypress/pages/feedbackScalePage.js +1 -1
- package/cypress/pages/gridFillPage.js +13 -6
- package/cypress/pages/imageHighlightPage.js +308 -2
- package/cypress/pages/numberLinePage.js +40 -16
- package/cypress/pages/textEntryMathPage.js +1 -1
- package/cypress/pages/videoResponsePage.js +350 -6
- package/package.json +1 -1
- package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +0 -366
@@ -1,17 +1,96 @@
|
|
1
|
+
import utilities from "../support/helpers/utilities";
|
2
|
+
import { autoScoredScoringPreviewTab, autoScoredStudentViewSettings, barAndLineChartComponent, chartsCommonComponent, commonComponents, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent } from "./components";
|
3
|
+
import { dialogBoxBase } from "./dialogBoxBase";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
1
6
|
const selectors = {
|
7
|
+
...questionInstructionsComponent,
|
8
|
+
...barAndLineChartComponent,
|
9
|
+
...chartsCommonComponent,
|
10
|
+
...commonComponents,
|
11
|
+
...dialogBoxBase,
|
12
|
+
point: () => cy.get('.ngie-chart-point'),
|
2
13
|
selectChartTypePoint: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] .ngie-chart-point'),
|
14
|
+
pointLockIcon: () => cy.get('[class*="ChartGridstyle__LineLockIconWrapper"]'),
|
15
|
+
lineChartDragIcon: () => cy.get('.line-chart-drag-icon'),
|
16
|
+
|
17
|
+
//specify correct answer section
|
18
|
+
specifyCorrectAnswerPoint: () => cy.get('.ngie-accordion .ngie-chart-point'),
|
19
|
+
|
20
|
+
//Preview tab
|
21
|
+
previewTabPoint: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible .ngie-chart-point'),
|
22
|
+
previewTabConnectorLine: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible .line-chart-connector-line'),
|
23
|
+
|
24
|
+
//Preview tab
|
25
|
+
previewTabPointLabel: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartGridstyle__NameDiv-"]'),
|
3
26
|
}
|
4
27
|
|
5
28
|
const steps = {
|
29
|
+
...barAndLineChartComponent.steps,
|
30
|
+
...createQuestionBasePage.steps,
|
31
|
+
...questionInstructionsComponent.steps,
|
32
|
+
...resetPopupComponent.steps,
|
33
|
+
...autoScoredScoringPreviewTab.steps,
|
34
|
+
...autoScoredStudentViewSettings.steps,
|
35
|
+
...chartsCommonComponent.steps,
|
6
36
|
/**
|
7
37
|
* @description set the point height/value in the select chart type section chart
|
8
|
-
* @param {Object} pointProperties - The properties and changes to be done on the
|
9
|
-
* @param {number} pointProperties.pointIndex index of the
|
38
|
+
* @param {Object} pointProperties - The properties and changes to be done on the point
|
39
|
+
* @param {number} pointProperties.pointIndex index of the point
|
40
|
+
* @param {number} pointProperties.value value to which the point is to be set as per Y axis
|
41
|
+
* @param {number} pointProperties.range Maximum value of the axis on which point value is determined
|
42
|
+
*/
|
43
|
+
setPointValueInSelectChartTypeSection: ({ pointIndex, value, range }) => {
|
44
|
+
utilities.getNthElement(chartsLinePage.selectChartTypePoint(), pointIndex)
|
45
|
+
.invoke('attr', 'height')
|
46
|
+
.then((pointValue) => {
|
47
|
+
let updatedPointValue = parseFloat(value /= range)
|
48
|
+
let originalPointValue = parseFloat(pointValue)
|
49
|
+
let unitChange = parseFloat(1 / range)
|
50
|
+
if (originalPointValue < updatedPointValue) {
|
51
|
+
for (let i = originalPointValue; i < updatedPointValue; i = parseFloat((i + unitChange).toFixed(2))) {
|
52
|
+
utilities.getNthElement(chartsLinePage.selectChartTypePoint(), pointIndex)
|
53
|
+
.focus()
|
54
|
+
.type('{upArrow}');
|
55
|
+
}
|
56
|
+
} else if (originalPointValue > updatedPointValue) {
|
57
|
+
for (let i = originalPointValue; i > updatedPointValue; i = parseFloat((i - unitChange).toFixed(2))) {
|
58
|
+
utilities.getNthElement(chartsLinePage.selectChartTypePoint(), pointIndex)
|
59
|
+
.focus()
|
60
|
+
.type('{downArrow}');
|
61
|
+
}
|
62
|
+
}
|
63
|
+
utilities.getNthElement(chartsLinePage.selectChartTypePoint(), pointIndex)
|
64
|
+
.should('have.attr', 'height', updatedPointValue);
|
65
|
+
});
|
66
|
+
},
|
67
|
+
|
68
|
+
/**
|
69
|
+
* @description Lock the point in select chart type section chart
|
70
|
+
* @param {number} pointIndex Index of the point to be locked
|
71
|
+
*/
|
72
|
+
lockPoint: (pointIndex) => {
|
73
|
+
utilities.hoverOverElement(utilities.getNthElement(chartsLinePage.selectChartTypePoint(), pointIndex))
|
74
|
+
barAndLineChartComponent.barAndPointTooltipLockUnlockButton()
|
75
|
+
.click();
|
76
|
+
barAndLineChartComponent.barAndPointTooltipLockUnlockButton()
|
77
|
+
.should('have.attr', 'aria-label', 'locked bar');
|
78
|
+
utilities.hoverAwayFromElement();
|
79
|
+
utilities.getNthElement(chartsLinePage.selectChartTypePoint(), pointIndex)
|
80
|
+
.within(() => {
|
81
|
+
utilities.verifyElementVisibilityState(chartsLinePage.pointLockIcon(), 'visible');
|
82
|
+
});
|
83
|
+
},
|
84
|
+
|
85
|
+
/**
|
86
|
+
* @description set the point height/value in the specify correct answer section
|
87
|
+
* @param {Object} pointProperties - The properties and changes to be done on the point
|
88
|
+
* @param {number} pointProperties.pointIndex index of the point
|
10
89
|
* @param {number} pointProperties.value value to which the point is to be set as per Y axis
|
11
|
-
* @param {number} pointProperties.range Maximum value of the axis on which
|
90
|
+
* @param {number} pointProperties.range Maximum value of the axis on which point value is determined
|
12
91
|
*/
|
13
|
-
|
14
|
-
utilities.getNthElement(
|
92
|
+
setPointValueInSpecifyCorrectAnswerSection: ({ pointIndex, value, range }) => {
|
93
|
+
utilities.getNthElement(chartsLinePage.specifyCorrectAnswerPoint(), pointIndex)
|
15
94
|
.invoke('attr', 'height')
|
16
95
|
.then((pointValue) => {
|
17
96
|
let updatedPointValue = parseFloat(value /= range)
|
@@ -19,24 +98,304 @@ const steps = {
|
|
19
98
|
let unitChange = parseFloat(1 / range)
|
20
99
|
if (originalPointValue < updatedPointValue) {
|
21
100
|
for (let i = originalPointValue; i < updatedPointValue; i = parseFloat((i + unitChange).toFixed(2))) {
|
22
|
-
utilities.getNthElement(
|
101
|
+
utilities.getNthElement(chartsLinePage.specifyCorrectAnswerPoint(), pointIndex)
|
23
102
|
.focus()
|
24
103
|
.type('{upArrow}');
|
25
104
|
}
|
26
105
|
} else if (originalPointValue > updatedPointValue) {
|
27
106
|
for (let i = originalPointValue; i > updatedPointValue; i = parseFloat((i - unitChange).toFixed(2))) {
|
28
|
-
utilities.getNthElement(
|
107
|
+
utilities.getNthElement(chartsLinePage.specifyCorrectAnswerPoint(), pointIndex)
|
29
108
|
.focus()
|
30
109
|
.type('{downArrow}');
|
31
110
|
}
|
32
111
|
}
|
33
|
-
utilities.getNthElement(
|
112
|
+
utilities.getNthElement(chartsLinePage.specifyCorrectAnswerPoint(), pointIndex)
|
34
113
|
.should('have.attr', 'height', updatedPointValue);
|
35
114
|
});
|
36
115
|
},
|
116
|
+
|
117
|
+
//Preview tab
|
118
|
+
/**
|
119
|
+
* Verify the point value in preview tab
|
120
|
+
* @param {Object} pointProperties - The properties of the point
|
121
|
+
* @param {number} pointProperties.pointIndex index of the point
|
122
|
+
* @param {number} pointProperties.value Height of the point as per the axis
|
123
|
+
* @param {number} pointProperties.range Maximum value of the axis on which point value is determined
|
124
|
+
*/
|
125
|
+
verifyPointValueInPreviewTab: ({ pointIndex, value, range }) => {
|
126
|
+
let pointHeight = parseFloat(value /= range)
|
127
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
128
|
+
.should('have.attr', 'height', pointHeight);
|
129
|
+
},
|
130
|
+
|
131
|
+
/**
|
132
|
+
* Verify the point is locked in preview tab
|
133
|
+
* @param {number} pointIndex index of the line
|
134
|
+
*/
|
135
|
+
verifyPointIsLockedInPreviewTab: (pointIndex) => {
|
136
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
137
|
+
.within(() => {
|
138
|
+
utilities.verifyElementVisibilityState(chartsLinePage.pointLockIcon(), 'visible');
|
139
|
+
});
|
140
|
+
},
|
141
|
+
|
142
|
+
/**
|
143
|
+
* Verify locked point is uneditable in preview tab
|
144
|
+
* @param {number} pointIndex index of the point
|
145
|
+
*/
|
146
|
+
verifyLockedPointIsUneditableInPreviewTab: (pointIndex) => {
|
147
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
148
|
+
.invoke('attr', 'height')
|
149
|
+
.then((pointValue) => {
|
150
|
+
let originalPointValue = parseFloat(pointValue)
|
151
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
152
|
+
.focus()
|
153
|
+
.type('{upArrow}{upArrow}{upArrow}{downArrow}{downArrow}{downArrow}', { force: true });
|
154
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
155
|
+
.should('have.attr', 'height', originalPointValue);
|
156
|
+
});
|
157
|
+
},
|
158
|
+
|
159
|
+
/**
|
160
|
+
* @description set the point height/value in the preview tab
|
161
|
+
* @param {Object} pointProperties - The properties and changes to be done on the point
|
162
|
+
* @param {number} pointProperties.pointIndex index of the point
|
163
|
+
* @param {number} pointProperties.value value to which the point is to be set as per Y axis
|
164
|
+
* @param {number} pointProperties.range Maximum value of the axis on which point value is determined
|
165
|
+
*/
|
166
|
+
setPointValueInPreviewTab: ({ pointIndex, value, range }) => {
|
167
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
168
|
+
.invoke('attr', 'height')
|
169
|
+
.then((pointValue) => {
|
170
|
+
let updatedPointValue = parseFloat(value /= range)
|
171
|
+
let originalPointValue = parseFloat(pointValue)
|
172
|
+
let unitChange = parseFloat(1 / range)
|
173
|
+
if (originalPointValue < updatedPointValue) {
|
174
|
+
for (let i = originalPointValue; i < updatedPointValue; i = parseFloat((i + unitChange).toFixed(2))) {
|
175
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
176
|
+
.focus()
|
177
|
+
.type('{upArrow}');
|
178
|
+
}
|
179
|
+
} else if (originalPointValue > updatedPointValue) {
|
180
|
+
for (let i = originalPointValue; i > updatedPointValue; i = parseFloat((i - unitChange).toFixed(2))) {
|
181
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
182
|
+
.focus()
|
183
|
+
.type('{downArrow}');
|
184
|
+
}
|
185
|
+
}
|
186
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
187
|
+
.should('have.attr', 'height', updatedPointValue);
|
188
|
+
});
|
189
|
+
},
|
190
|
+
|
191
|
+
keyBoardUpPointInPreviewTab: (pointIndex) => {
|
192
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
193
|
+
.focus()
|
194
|
+
.type('{upArrow}');
|
195
|
+
},
|
196
|
+
|
197
|
+
keyBoardDownPointInPreviewTab: (pointIndex) => {
|
198
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
199
|
+
.focus()
|
200
|
+
.type('{downArrow}');
|
201
|
+
},
|
202
|
+
|
203
|
+
/**
|
204
|
+
* @description Edit point label in preview tab chart
|
205
|
+
* @param {number} pointIndex Index of the point to be edited
|
206
|
+
* @param {string} pointLabel Label to be given to the point
|
207
|
+
*/
|
208
|
+
editPointLabelInPreviewTab: (pointIndex, pointLabel) => {
|
209
|
+
utilities.hoverOverElement(utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex))
|
210
|
+
chartsLinePage.barAndPointTooltipLabelButton()
|
211
|
+
.click();
|
212
|
+
chartsLinePage.steps.addInputToChartLabelPopupInputField(pointLabel);
|
213
|
+
chartsLinePage.steps.saveGraphLabelPopup();
|
214
|
+
utilities.hoverAwayFromElement();
|
215
|
+
utilities.verifyInnerText(utilities.getNthElement(chartsLinePage.previewTabPointLabel(), pointIndex), pointLabel);
|
216
|
+
},
|
217
|
+
|
218
|
+
/**
|
219
|
+
* @description Delete point in preview tab
|
220
|
+
* @param {number} pointIndex Index of the point to be deleted
|
221
|
+
*/
|
222
|
+
deletePointInPreviewTab: (pointIndex) => {
|
223
|
+
utilities.hoverOverElement(utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex))
|
224
|
+
chartsLinePage.barAndPointTooltipDeleteButton()
|
225
|
+
.click();
|
226
|
+
},
|
227
|
+
|
228
|
+
/**
|
229
|
+
* Verify the point value in correct answer section tab
|
230
|
+
* @param {Object} pointProperties - The properties of the point
|
231
|
+
* @param {number} pointProperties.pointIndex index of the point
|
232
|
+
* @param {number} pointProperties.value Height of the point as per the axis
|
233
|
+
* @param {number} pointProperties.range Maximum value of the axis on which point value is determined
|
234
|
+
*/
|
235
|
+
verifyPointValueInCorrectAnswerSection: ({ pointIndex, value, range }) => {
|
236
|
+
let pointValue = parseFloat(value /= range)
|
237
|
+
chartsLinePage.previewTabChartWrapper()
|
238
|
+
.eq(1)
|
239
|
+
.within(() => {
|
240
|
+
utilities.getNthElement(chartsLinePage.point(), pointIndex)
|
241
|
+
.should('have.attr', 'height', pointValue);
|
242
|
+
});
|
243
|
+
},
|
244
|
+
|
245
|
+
/**
|
246
|
+
* Verify the correct/incorrect icon of point in correct answer section
|
247
|
+
* @param {number} pointIndex index of the point
|
248
|
+
* @example verifyPointCorrectIconInCorrectAnswerSection(0)
|
249
|
+
*/
|
250
|
+
verifyPointCorrectIconInCorrectAnswerSection: (pointIndex) => {
|
251
|
+
chartsLinePage.previewTabChartWrapper()
|
252
|
+
.eq(1)
|
253
|
+
.within(() => {
|
254
|
+
utilities.getNthElement(chartsLinePage.point(), pointIndex)
|
255
|
+
.within(() => {
|
256
|
+
chartsLinePage.tickIconWrapper()
|
257
|
+
.and('have.class', 'correct-option-icon')
|
258
|
+
.parent()
|
259
|
+
.should('be.visible');
|
260
|
+
});
|
261
|
+
});
|
262
|
+
},
|
263
|
+
|
264
|
+
/**
|
265
|
+
* Verify the correct/incorrect icon not exists for point in correct answer section
|
266
|
+
* @param {number} pointIndex index of the point
|
267
|
+
*/
|
268
|
+
verifyPointCorrectIncorrectIconNotExistsInCorrectAnswerSection: (pointIndex) => {
|
269
|
+
chartsLinePage.previewTabChartWrapper()
|
270
|
+
.eq(1)
|
271
|
+
.within(() => {
|
272
|
+
utilities.getNthElement(chartsLinePage.point(), pointIndex)
|
273
|
+
.within(() => {
|
274
|
+
utilities.verifyElementVisibilityState(chartsLinePage.tickIconWrapper(), 'notExist');
|
275
|
+
});
|
276
|
+
});
|
277
|
+
},
|
278
|
+
|
279
|
+
/**
|
280
|
+
* Verify the correct/incorrect icon of point in preview tab
|
281
|
+
* @param {number} pointIndex index of the point
|
282
|
+
* @param {string} icon correct or incorrect icon
|
283
|
+
* @example verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct')
|
284
|
+
*/
|
285
|
+
verifyPointCorrectIncorrectIconInPreviewTab: (pointIndex, icon) => {
|
286
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
287
|
+
.within(() => {
|
288
|
+
chartsLinePage.tickIconWrapper()
|
289
|
+
.and('have.class', `${icon}-option-icon`)
|
290
|
+
.parent()
|
291
|
+
.should('be.visible');
|
292
|
+
});
|
293
|
+
},
|
294
|
+
|
295
|
+
/**
|
296
|
+
* Verify the correct/incorrect icon not exists for point in preview tab
|
297
|
+
* @param {number} pointIndex index of the point
|
298
|
+
*/
|
299
|
+
verifyPointCorrectIncorrectIconNotExistsInPreviewTab: (pointIndex) => {
|
300
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
301
|
+
.within(() => {
|
302
|
+
utilities.verifyElementVisibilityState(chartsLinePage.tickIconWrapper(), 'notExist');
|
303
|
+
});
|
304
|
+
},
|
305
|
+
|
306
|
+
/**
|
307
|
+
* @description verify point in correct answer section
|
308
|
+
* @param {Object} pointProperties - The properties and changes to be done on the point
|
309
|
+
* @param {number} pointProperties.pointIndex index of the point
|
310
|
+
* @param {number} pointProperties.value value of th point as per Y axis
|
311
|
+
* @param {number} pointProperties.range Maximum value of the axis on which point value is determined
|
312
|
+
*/
|
313
|
+
verifyPointInCorrectAnswerSection: ({ pointIndex, value, range }) => {
|
314
|
+
chartsLinePage.steps.verifyPointValueInCorrectAnswerSection({ pointIndex: pointIndex, value: value, range: range });
|
315
|
+
chartsLinePage.steps.verifyPointCorrectIconInCorrectAnswerSection(pointIndex);
|
316
|
+
},
|
317
|
+
|
318
|
+
/**
|
319
|
+
* @description verify locked point in correct answer section
|
320
|
+
* @param {Object} pointProperties - The properties and changes to be done on the point
|
321
|
+
* @param {number} pointProperties.pointIndex index of the point
|
322
|
+
* @param {number} pointProperties.value value of th point as per Y axis
|
323
|
+
* @param {number} pointProperties.range Maximum value of the axis on which point value is determined
|
324
|
+
*/
|
325
|
+
verifyLockedPointInCorrectAnswerSection: ({ pointIndex, value, range }) => {
|
326
|
+
chartsLinePage.steps.verifyPointValueInCorrectAnswerSection({ pointIndex: pointIndex, value: value, range: range });
|
327
|
+
chartsLinePage.steps.verifyPointIsLockedInCorrectAnswerSection(pointIndex);
|
328
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInCorrectAnswerSection(pointIndex);
|
329
|
+
},
|
330
|
+
|
331
|
+
/**
|
332
|
+
* Verify the point is locked in correct answer section
|
333
|
+
* @param {number} pointIndex index of the point
|
334
|
+
*/
|
335
|
+
verifyPointIsLockedInCorrectAnswerSection: (pointIndex) => {
|
336
|
+
chartsLinePage.previewTabChartWrapper()
|
337
|
+
.eq(1)
|
338
|
+
.within(() => {
|
339
|
+
utilities.getNthElement(chartsLinePage.point(), pointIndex)
|
340
|
+
.within(() => {
|
341
|
+
utilities.verifyElementVisibilityState(chartsLinePage.pointLockIcon(), 'visible');
|
342
|
+
});
|
343
|
+
});
|
344
|
+
},
|
345
|
+
}
|
346
|
+
|
347
|
+
const tests = {
|
348
|
+
...resetPopupComponent.tests,
|
349
|
+
...autoScoredScoringPreviewTab.tests,
|
350
|
+
/**
|
351
|
+
* Verify point tooltip contents with css and a11y in preview tab
|
352
|
+
* @param {number} pointIndex index of the point
|
353
|
+
* @param {string} pointLabel label of the point
|
354
|
+
*/
|
355
|
+
verifyPointTooltipContentsCSSAndA11yInPreviewTab: (pointIndex, pointLabel) => {
|
356
|
+
it('When user hovers over the point, then point tooltip should be displayed', () => {
|
357
|
+
utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex)
|
358
|
+
.realHover({ position: 'left' });
|
359
|
+
utilities.verifyElementVisibilityState(chartsLinePage.barAndPointTooltipWrapper(), 'visible');
|
360
|
+
});
|
361
|
+
|
362
|
+
it('The point tooltip should contain and point label button, and delete button', () => {
|
363
|
+
utilities.verifyInnerText(barAndLineChartComponent.barAndPointTooltipLabelButton(), pointLabel);
|
364
|
+
utilities.verifyElementVisibilityState(barAndLineChartComponent.barAndPointTooltipDeleteButton(), 'visible');
|
365
|
+
});
|
366
|
+
|
367
|
+
it('When user hovers on the delete button, then \'Delete point\' tooltip should be displayed', () => {
|
368
|
+
chartsLinePage.barAndPointTooltipDeleteButton()
|
369
|
+
.verifyTooltip('Delete point');
|
370
|
+
});
|
371
|
+
|
372
|
+
it('When user hovers away from the point, then point tooltip should be not be displayed', () => {
|
373
|
+
utilities.hoverAwayFromElement();
|
374
|
+
utilities.verifyElementVisibilityState(chartsLinePage.barAndPointTooltipWrapper(), 'hidden');
|
375
|
+
});
|
376
|
+
|
377
|
+
it('CSS of point tooltip', { tags: 'css' }, () => {
|
378
|
+
utilities.hoverOverElement(utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex));
|
379
|
+
utilities.verifyCSS(barAndLineChartComponent.barAndPointTooltipLabelButton(), {
|
380
|
+
'color': css.color.activeButtons,
|
381
|
+
'font-size': css.fontSize.default,
|
382
|
+
'font-weight': css.fontWeight.bold
|
383
|
+
});
|
384
|
+
barAndLineChartComponent.barAndPointTooltipDeleteButton()
|
385
|
+
.verifyPseudoClassBeforeProperty('color', css.color.deleteIcon);
|
386
|
+
utilities.hoverAwayFromElement();
|
387
|
+
});
|
388
|
+
|
389
|
+
it('Accessibility of point tooltip', { tags: 'a11y' }, () => {
|
390
|
+
utilities.hoverOverElement(utilities.getNthElement(chartsLinePage.previewTabPoint(), pointIndex));
|
391
|
+
cy.checkAccessibility(chartsLinePage.barAndPointTooltipWrapper());
|
392
|
+
utilities.hoverAwayFromElement();
|
393
|
+
});
|
394
|
+
}
|
37
395
|
}
|
38
396
|
|
39
397
|
export const chartsLinePage = {
|
40
398
|
...selectors,
|
41
|
-
steps
|
399
|
+
steps,
|
400
|
+
tests
|
42
401
|
}
|
@@ -275,7 +275,6 @@ const steps = {
|
|
275
275
|
utilities.verifyElementVisibilityState(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'visible');
|
276
276
|
},
|
277
277
|
|
278
|
-
|
279
278
|
verifyAutomaticallySetPenaltyPointsCheckboxUncheckedState: () => {
|
280
279
|
autoScoredScoringSectionMultiResponseType.automaticallySetPenaltyPointsCheckbox()
|
281
280
|
.should('not.be.checked');
|
@@ -213,6 +213,9 @@ const tests = {
|
|
213
213
|
case 'number line - label':
|
214
214
|
helpText = 'You can set the correct answer by dragging the correct answer(s) in the response area(s).';
|
215
215
|
break;
|
216
|
+
case 'image highlight':
|
217
|
+
helpText = 'You can set the correct answer by selecting the correct answer option.'
|
218
|
+
break;
|
216
219
|
default:
|
217
220
|
throw new Error('Invalid question type');
|
218
221
|
}
|
@@ -114,7 +114,7 @@ const tests = {
|
|
114
114
|
backgroundImageUploadComponent.steps.uploadFile('highlightImage.jpg');
|
115
115
|
utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadImageProgressBar(), 'visible');
|
116
116
|
backgroundImageUploadComponent.steps.verifyFileNameLabel('highlightImage.jpg');
|
117
|
-
if (questionType !== 'graphing' && questionType !== 'grid fill') {
|
117
|
+
if (questionType !== 'graphing' && questionType !== 'grid fill' && questionType !== 'image highlight') {
|
118
118
|
imageCanvasComponent.steps.verifyImageIsUploaded();
|
119
119
|
}
|
120
120
|
});
|
@@ -1,9 +1,12 @@
|
|
1
|
+
import utilities from "../../support/helpers/utilities";
|
1
2
|
import { chartsCommonComponent } from "./chartsCommonComponent";
|
2
3
|
|
3
4
|
const selectors = {
|
4
5
|
toolsLabel: () => cy.get('[class*="SelectChartTypestyles__OptionTitle"]'),
|
5
6
|
addBarOrPointOptionButton: () => cy.get('#add .icon-button-custom-format'),
|
6
7
|
addBarOrPointOptionLabel: () => cy.get('.drag-item-label-wrapper'),
|
8
|
+
selectChartTypeMaxYLabel: () => cy.get('[class*="ChartsPreviewstyles__CustomInputFieldLabel"]'),
|
9
|
+
selectChartTypeMaxYInputField: () => cy.get('[class*="ChartsPreviewstyles__CustomInputFieldWrapper"] input'),
|
7
10
|
yAxisCoordinate: () => cy.get('[class*="ChartGridstyle__ValueDiv"]'),
|
8
11
|
yAxisLabel: () => cy.get('[class*="ChartsPreviewstyles__LeftWrapper"] .title-container'),
|
9
12
|
selectChartTypeChartToolsAddBarOrPointButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(0),
|
@@ -34,6 +37,17 @@ const selectors = {
|
|
34
37
|
}
|
35
38
|
|
36
39
|
const steps = {
|
40
|
+
/**
|
41
|
+
* @description Set the Max Y value in its input field
|
42
|
+
* @param {number} value Max Y value to be set
|
43
|
+
*/
|
44
|
+
setMaxYValue: (value) => {
|
45
|
+
barAndLineChartComponent.selectChartTypeMaxYInputField()
|
46
|
+
.type(`{backspace}{backspace}${value}`, { force: true })
|
47
|
+
.should('have.value', value)
|
48
|
+
.blur();
|
49
|
+
},
|
50
|
+
|
37
51
|
selectAddBarOrPointToolbarOption: () => {
|
38
52
|
barAndLineChartComponent.addBarOrPointOptionButton()
|
39
53
|
.click()
|
@@ -114,7 +128,19 @@ const steps = {
|
|
114
128
|
barAndLineChartComponent.steps.clickOnYAxisLabelButtonInPreviewTab();
|
115
129
|
chartsCommonComponent.steps.addInputToChartLabelPopupInputField(text);
|
116
130
|
chartsCommonComponent.steps.saveGraphLabelPopup();
|
117
|
-
}
|
131
|
+
},
|
132
|
+
|
133
|
+
/**
|
134
|
+
* @description Verify Y axis label in correct answer section
|
135
|
+
* @param {string} yAxisLabel
|
136
|
+
*/
|
137
|
+
verifyYAxisLabelInCorrectAnswerSection: (yAxisLabel) => {
|
138
|
+
chartsCommonComponent.previewTabChartWrapper()
|
139
|
+
.eq(1)
|
140
|
+
.within(() => {
|
141
|
+
utilities.verifyTextContent(utilities.getNthElement(barAndLineChartComponent.yAxisLabel(), 0), yAxisLabel);
|
142
|
+
});
|
143
|
+
},
|
118
144
|
}
|
119
145
|
|
120
146
|
export const barAndLineChartComponent = {
|
@@ -26,11 +26,16 @@ const selectors = {
|
|
26
26
|
previewTabChartWrapper: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible'),
|
27
27
|
previewTabGraphTitle: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartsPreviewstyles__TopWrapper"] .title-container'),
|
28
28
|
previewTabXAxisLabelButton: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartsPreviewstyles__BottomWrapper"] .title-container'),
|
29
|
-
tickIconWrapper: () => cy.get('
|
29
|
+
tickIconWrapper: () => cy.get('[class*="tick-icon-wrapper"] svg'),
|
30
30
|
correctAnswersLabel: () => cy.get('[class*="Chartsstyle__CorrectAnswerHeader"]')
|
31
31
|
}
|
32
32
|
|
33
33
|
const steps = {
|
34
|
+
selectLineButton: () => {
|
35
|
+
chartsCommonComponent.lineToggleButton()
|
36
|
+
.click();
|
37
|
+
},
|
38
|
+
|
34
39
|
/**
|
35
40
|
* @description Set graph title
|
36
41
|
* @param {string} text text to be set as graph title
|
@@ -129,7 +134,31 @@ const steps = {
|
|
129
134
|
chartsCommonComponent.previewTabChartWrapper()
|
130
135
|
.eq(1)
|
131
136
|
.should('not.exist');
|
132
|
-
}
|
137
|
+
},
|
138
|
+
|
139
|
+
/**
|
140
|
+
* @description Verify graph title in correct answer section
|
141
|
+
* @param {string} graphTitle Title of graph
|
142
|
+
*/
|
143
|
+
verifyGraphTitleInCorrectAnswerSection: (graphTitle) => {
|
144
|
+
chartsCommonComponent.previewTabChartWrapper()
|
145
|
+
.eq(1)
|
146
|
+
.within(() => {
|
147
|
+
utilities.verifyTextContent(utilities.getNthElement(chartsCommonComponent.graphTitle(), 0), graphTitle);
|
148
|
+
});
|
149
|
+
},
|
150
|
+
|
151
|
+
/**
|
152
|
+
* @description Verify X axis label in correct answer section
|
153
|
+
* @param {string} yAxisLabel
|
154
|
+
*/
|
155
|
+
verifyXAxisLabelInCorrectAnswerSection: (XAxisLabel) => {
|
156
|
+
chartsCommonComponent.previewTabChartWrapper()
|
157
|
+
.eq(1)
|
158
|
+
.within(() => {
|
159
|
+
utilities.verifyTextContent(utilities.getNthElement(chartsCommonComponent.xAxisLabel(), 0), XAxisLabel);
|
160
|
+
});
|
161
|
+
},
|
133
162
|
}
|
134
163
|
|
135
164
|
export const chartsCommonComponent = {
|
@@ -3,6 +3,7 @@ import { createItemPage } from "../createItemPage";
|
|
3
3
|
import { dialogBoxBase } from "../dialogBoxBase";
|
4
4
|
import { selectQuestionResourceToolPage } from "../selectQuestionResourceToolPage";
|
5
5
|
import { commonComponents } from "./commonComponents";
|
6
|
+
import { playbackControlsBaseComponent } from "./playbackControlsBaseComponent";
|
6
7
|
import { questionInstructionsComponent } from "./questionInstructionsComponent";
|
7
8
|
import { scoringSectionBase } from "./scoringSectionBase";
|
8
9
|
const css = Cypress.env('css');
|
@@ -63,9 +63,9 @@ const selectors = {
|
|
63
63
|
maxLabel: () => cy.get('[class*="LineGraphComponentsstyles__GraphRightLeft"] [class*="LineGraphComponentsstyles__CustomInputFieldLabel"]').eq(1),
|
64
64
|
maxInputField: () => cy.get('[class*="LineGraphComponentsstyles__GraphRightLeft"] input').eq(1),
|
65
65
|
intervalLabel: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [aria-labelledby="Interval"]'),
|
66
|
-
intervalInputField: () => cy.get('
|
66
|
+
intervalInputField: () => cy.get('input[id="Interval"]'),
|
67
67
|
annotateEveryLabel: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [aria-labelledby="Annotate every"]'),
|
68
|
-
annotateEveryInputField: () => cy.get('
|
68
|
+
annotateEveryInputField: () => cy.get('input[id="Annotate every"]'),
|
69
69
|
lineSettingsToggleButtonWrapper: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(0),
|
70
70
|
lineSettingsLabel: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] .single-select-toggle-group-title').eq(0),
|
71
71
|
lineSettingsToggleButton: (ariaLabel = null) => {
|
@@ -7,6 +7,11 @@ const steps = {
|
|
7
7
|
selectMultipleSelectionToggle: () => {
|
8
8
|
singleMultipleSelectionModeComponent.multipleSelectionToggleButton()
|
9
9
|
.click();
|
10
|
+
},
|
11
|
+
|
12
|
+
selectSingleSelectionToggle: () => {
|
13
|
+
singleMultipleSelectionModeComponent.singleSelectionToggleButton()
|
14
|
+
.click();
|
10
15
|
}
|
11
16
|
}
|
12
17
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
2
2
|
const css = Cypress.env('css');
|
3
3
|
|
4
|
-
const tools = ['Ruler', 'Protractor', 'Reading ruler', 'Simple Calculator', 'Scientific Calculator'];
|
4
|
+
const tools = ['Ruler', 'Protractor', 'Reading ruler', 'Simple Calculator', 'Scientific Calculator', 'Compass'];
|
5
5
|
const selectors = {
|
6
6
|
toolSettingsPanel: () => cy.get('.tool-settings-customization-wrapper .ngie-accordion-summary'),
|
7
7
|
toolSettingsRegion: () => cy.get('.tool-settings-customization-wrapper [role="region"]'),
|
@@ -149,7 +149,7 @@ const tests = {
|
|
149
149
|
it(`When \'Tool settings\' accordion is expanded, then \'Add tools\' and \'Select the tools that will be displayed to the students.\' labels should be displayed. Five tools ${tools} should be displayed with their labels, icons, drag handle button and edit icon. By default tools should not be selected`, () => {
|
150
150
|
utilities.verifyInnerText(toolSettingsComponent.addToolsLabel(), 'Add tools');
|
151
151
|
utilities.verifyInnerText(toolSettingsComponent.toolSettingsHelpText(), 'Select the tools that will be displayed to the students.');
|
152
|
-
utilities.verifyElementCount(toolSettingsComponent.toolButton(),
|
152
|
+
utilities.verifyElementCount(toolSettingsComponent.toolButton(), 6);
|
153
153
|
tools.forEach((toolName, toolIndex) => {
|
154
154
|
toolSettingsComponent.steps.verifyToolButton(toolIndex, toolName);
|
155
155
|
});
|
@@ -38,7 +38,7 @@ const selectors = {
|
|
38
38
|
deleteOptionAccordionButton: () => cy.get('[aria-label*="Delete"][aria-label*="ption"]'),
|
39
39
|
optionTextInputField: () => cy.get('input[aria-label="Option text"]'),
|
40
40
|
legendTextLabel: () => cy.get('.legend-wrapper [class*="LabelWrapper"]'),
|
41
|
-
legendTextInputField: () => cy.get('.legend-wrapper
|
41
|
+
legendTextInputField: () => cy.get('.legend-wrapper [role="textbox"]'),
|
42
42
|
optionTextLabel: () => cy.get('[class*="FeedbackScaleOptionWrapper"] [class*="LabelWrapper"]'),
|
43
43
|
addOptionButton: () => cy.get('.feedback-scale-add-option button'),
|
44
44
|
colorSectionLabel: () => cy.get('[class*="FeedbackScalestyles__ColorLabelWrapper"]'),
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { commonComponents, autoScoredScoringSectionMultiResponseType, questionInputFieldComponent, correctIncorrectAnswerLabelComponent, questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, studentViewSettingsLabelComponent, colorPopupComponent, backgroundImageUploadComponent, imageCanvasComponent, imageActionsComponent } from "./components";
|
2
|
-
import { dialogBoxBase } from ".";
|
2
|
+
import { dialogBoxBase, studentViewPage } from ".";
|
3
3
|
import utilities from "../support/helpers/utilities";
|
4
4
|
const css = Cypress.env('css');
|
5
5
|
|
@@ -2867,11 +2867,18 @@ const steps = {
|
|
2867
2867
|
utilities.verifyElementVisibilityState(gridFillPage.gridWrapperPreviewTab().eq(1), 'notExist');
|
2868
2868
|
},
|
2869
2869
|
|
2870
|
-
|
2871
|
-
|
2872
|
-
|
2873
|
-
|
2874
|
-
|
2870
|
+
clickOnGoToGradingViewButton: () => {
|
2871
|
+
studentViewPage.buttonGoToGradingView()
|
2872
|
+
.click({ force: true });
|
2873
|
+
cy.url()
|
2874
|
+
.should('contain', 'grading-view');
|
2875
|
+
},
|
2876
|
+
|
2877
|
+
/**
|
2878
|
+
* @param {number} points - The points to be allotted.
|
2879
|
+
* @description - Allots points in the scoring section.
|
2880
|
+
*/
|
2881
|
+
allotPoints: (points) => {
|
2875
2882
|
scoringSectionBaseEditTab.pointsInputField()
|
2876
2883
|
.eq(0)
|
2877
2884
|
.clear()
|