itemengine-cypress-automation 1.0.246 → 1.0.247
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
@@ -1,354 +0,0 @@
|
|
1
|
-
import utilities from "../../support/helpers/utilities";
|
2
|
-
import { commonComponents } from "./commonComponents";
|
3
|
-
const css = Cypress.env('css');
|
4
|
-
//Note: deprecated file
|
5
|
-
const selectors = {
|
6
|
-
scoringLabel: () => cy.get('.edit-scoring-label'),
|
7
|
-
scoringTypeLabel: () => cy.get('#Scoring-Type-dropdown-label'),
|
8
|
-
scoringTypeDropdown: () => cy.get('#Scoring-Type-select'),
|
9
|
-
scoringTypeDropdownList: () => cy.get('.dropdown-list-ul[aria-labelledby*="Scoring-Type-dropdown-label"]'),
|
10
|
-
scoringTypeDropdownListOptions: () => cy.get('[aria-labelledby*="Scoring-Type-dropdown-label"] li'),
|
11
|
-
//Enhancement: Remove the below two selectors copy of minimumScoreInputField, minimumScoreInputFieldLabel
|
12
|
-
minimumScoreIfAttemptedLabel: () => cy.get('[class*="min-score-points-label"]'),
|
13
|
-
minimumScoreIfAttemptedInputField: () => cy.get('.min-score-points-input-field input[type="text"]'),
|
14
|
-
pointsLabel: () => cy.get('.points-label'),
|
15
|
-
//TODO: Need to update below selectors, once https://redmine.zeuslearning.com/issues/553983 gets resolved
|
16
|
-
pointsInputField: () => cy.get('[class*="points-input-field"] input[type="text"]'),
|
17
|
-
pleaseEnterPointsErrorMessage: () => cy.get('[class*="ErrorBlockstyles__ErrorText"]:visible'),
|
18
|
-
pointsWrapper: () => cy.get('.set-correct-answer-points-wrapper'),
|
19
|
-
minimumScoringLabel: () => cy.get('#minimum-scoring-dropdown-label'),
|
20
|
-
minimumScoreInputField: () => cy.get('.min-score-points-input-field input[type="text"]'),
|
21
|
-
minimumScoreInputFieldLabel: () => cy.get('[class*="min-score-points-label"]'),
|
22
|
-
minimumScoringDropdown: () => cy.get('#minimum-scoring-select'),
|
23
|
-
minimumScoringDropdownListOptions: (ariaLabel = null) => {
|
24
|
-
if (ariaLabel) {
|
25
|
-
return cy.get(`[aria-labelledby*="minimum-scoring-dropdown-label"] [role="option"][aria-label="${ariaLabel}"]`)
|
26
|
-
} else {
|
27
|
-
return cy.get('[aria-labelledby*="minimum-scoring-dropdown-label"] [role="option"]')
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
const steps = {
|
33
|
-
allotPoints: (points) => {
|
34
|
-
scoringSectionBase.pointsInputField()
|
35
|
-
.clear()
|
36
|
-
.type(points)
|
37
|
-
.should('have.value', points)
|
38
|
-
.blur();
|
39
|
-
},
|
40
|
-
|
41
|
-
verifyDefaultPointsLabelAndInputField: () => {
|
42
|
-
scoringSectionBase.pointsLabel()
|
43
|
-
.verifyInnerText('Points');
|
44
|
-
scoringSectionBase.pointsInputField()
|
45
|
-
.should('have.value', '')
|
46
|
-
.and('be.visible');
|
47
|
-
},
|
48
|
-
|
49
|
-
verifyDefaultMinimumScoreIfAttemptedLabelAndPointsField: () => {
|
50
|
-
//Enhancement: Will need to update these steps when updating scripts
|
51
|
-
scoringSectionBase.steps.expandMinimumScoringDropdown();
|
52
|
-
scoringSectionBase.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
|
53
|
-
scoringSectionBase.minimumScoreIfAttemptedLabel()
|
54
|
-
.verifyInnerText('Minimum points');
|
55
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
56
|
-
.should('have.value', '')
|
57
|
-
.and('be.visible');
|
58
|
-
},
|
59
|
-
|
60
|
-
verifyNonScoredPointsField: () => {
|
61
|
-
scoringSectionBase.pointsInputField()
|
62
|
-
.should('have.value', '0')
|
63
|
-
.and('be.disabled');
|
64
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
65
|
-
.should('not.exist');
|
66
|
-
},
|
67
|
-
|
68
|
-
selectAScoringTypeFromScoringTypeDropdown: (scoringType) => {
|
69
|
-
scoringSectionBase.scoringTypeDropdown()
|
70
|
-
.should('be.visible')
|
71
|
-
.click();
|
72
|
-
scoringSectionBase.scoringTypeDropdownListOptions()
|
73
|
-
.contains(scoringType, { matchCase: false })
|
74
|
-
.click();
|
75
|
-
scoringSectionBase.scoringTypeDropdown()
|
76
|
-
.verifyInnerText(scoringType);
|
77
|
-
},
|
78
|
-
|
79
|
-
//V3 - This function should be updated in all files
|
80
|
-
//Enhancement: Deprecated method
|
81
|
-
allotMinimumScoreAwardedIfAttempted: (points) => {
|
82
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
83
|
-
.type(points)
|
84
|
-
.should('have.value', points);
|
85
|
-
},
|
86
|
-
|
87
|
-
//V3 - This function should be updated in all files
|
88
|
-
verifyPointsFieldValue: (points) => {
|
89
|
-
scoringSectionBase.pointsInputField()
|
90
|
-
.should('have.value', points);
|
91
|
-
},
|
92
|
-
|
93
|
-
//V3 - This function should be updated in all files
|
94
|
-
clearPointsField: () => {
|
95
|
-
scoringSectionBase.pointsInputField()
|
96
|
-
.clear()
|
97
|
-
.should('have.value', '');
|
98
|
-
},
|
99
|
-
|
100
|
-
//V3 - This function should be updated in all files
|
101
|
-
clearMinimumScoreIfAttemptedPointsField: () => {
|
102
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
103
|
-
.clear()
|
104
|
-
.should('have.value', '');
|
105
|
-
},
|
106
|
-
|
107
|
-
//V3 - This function should be updated in all files
|
108
|
-
verifyPointsFieldErrorMessage: () => {
|
109
|
-
scoringSectionBase.pointsWrapper()
|
110
|
-
.within(() => {
|
111
|
-
commonComponents.errorMessage()
|
112
|
-
.verifyInnerText('Error: Please enter points.');
|
113
|
-
});
|
114
|
-
},
|
115
|
-
|
116
|
-
//V3 - This function should be updated in all files
|
117
|
-
verifyPointsFieldErrorMessageIsNotDisplayed: () => {
|
118
|
-
scoringSectionBase.pointsWrapper()
|
119
|
-
.within(() => {
|
120
|
-
commonComponents.errorMessage()
|
121
|
-
.should('not.exist');
|
122
|
-
});
|
123
|
-
},
|
124
|
-
|
125
|
-
//V3 - This function should be updated in all files
|
126
|
-
/**
|
127
|
-
* @param {number} index index of points field
|
128
|
-
* @description this function focuses in and out of points field
|
129
|
-
*/
|
130
|
-
focusInAndFocusOutOfPointsInputField: (index) => {
|
131
|
-
scoringSectionBase.pointsInputField()
|
132
|
-
.eq(index)
|
133
|
-
.focus()
|
134
|
-
.blur();
|
135
|
-
},
|
136
|
-
|
137
|
-
expandMinimumScoringDropdown: () => {
|
138
|
-
scoringSectionBase.minimumScoringDropdown()
|
139
|
-
.click();
|
140
|
-
},
|
141
|
-
|
142
|
-
/**
|
143
|
-
* @param {('No minimum score'| 'Award minimum score'|'Award minimum score only if attempted')} listOption
|
144
|
-
* @description this function selects an option from expanded minimum scoring dropdown
|
145
|
-
*/
|
146
|
-
selectMinimumScoringTypeListOption: (listOption) => {
|
147
|
-
scoringSectionBase.minimumScoringDropdownListOptions(listOption)
|
148
|
-
.click();
|
149
|
-
},
|
150
|
-
|
151
|
-
/**
|
152
|
-
* Sets the minimum score for a question in the scoring section.
|
153
|
-
* @param {number} points - The minimum score to be set for the question.
|
154
|
-
*/
|
155
|
-
allotMinimumScore: (points) => {
|
156
|
-
scoringSectionBase.minimumScoreInputField()
|
157
|
-
.clear()
|
158
|
-
.type(points)
|
159
|
-
.should('have.value', points)
|
160
|
-
.blur();
|
161
|
-
}
|
162
|
-
}
|
163
|
-
|
164
|
-
const tests = {
|
165
|
-
/**
|
166
|
-
* @param {string} scoringType autoScored|manuallyScored
|
167
|
-
* @description autoScored should be passed for TEI with ['Auto scored', 'Manually scored', 'Non scored'] scoring types, manuallyScored should be passed for manually scored TEI with ['Manually scored', 'Non scored']
|
168
|
-
*/
|
169
|
-
verifyScoringTypeLabelAndDropdown: (scoringType) => {
|
170
|
-
const scoringTypeArray = scoringType === 'autoScored' ? ['Auto scored', 'Manually scored', 'Non scored'] : ['Manually scored', 'Non scored'];
|
171
|
-
it(`\'Scoring\' label should be displayed and \'Scoring type\' label and dropdown should be displayed and in \'Scoring type\' dropdown \'${scoringTypeArray[0]}\' option should be selected by default`, () => {
|
172
|
-
scoringSectionBase.scoringLabel()
|
173
|
-
.verifyInnerText('Scoring');
|
174
|
-
scoringSectionBase.scoringTypeLabel()
|
175
|
-
.verifyInnerText('Scoring type');
|
176
|
-
scoringSectionBase.scoringTypeDropdown()
|
177
|
-
.verifyInnerText(scoringTypeArray[0])
|
178
|
-
.and('be.visible');
|
179
|
-
});
|
180
|
-
|
181
|
-
it(`Clicking on Scoring Type dropdown should open a list of scoring types - ${scoringTypeArray}`, () => {
|
182
|
-
let dropdownOptions = scoringTypeArray;
|
183
|
-
scoringSectionBase.scoringTypeDropdown()
|
184
|
-
.click();
|
185
|
-
scoringSectionBase.scoringTypeDropdownListOptions()
|
186
|
-
.eq(0)
|
187
|
-
.should('be.visible');
|
188
|
-
dropdownOptions.forEach((option, count) => {
|
189
|
-
scoringSectionBase.scoringTypeDropdownListOptions()
|
190
|
-
.eq(count)
|
191
|
-
.verifyInnerText(option);
|
192
|
-
});
|
193
|
-
});
|
194
|
-
|
195
|
-
it('CSS of Scoring type dropdown in active state', { tags: 'css' }, () => {
|
196
|
-
scoringSectionBase.scoringTypeDropdownListOptions()
|
197
|
-
.eq(0)
|
198
|
-
.verifyCSS(css.color.liText, css.fontSize.default, css.fontWeight.regular)
|
199
|
-
.should('have.css', 'background-color', css.color.liTextSelectedBg);
|
200
|
-
scoringSectionBase.scoringTypeDropdownListOptions()
|
201
|
-
.eq(1)
|
202
|
-
.should('have.css', 'background-color', css.color.transparent);
|
203
|
-
});
|
204
|
-
|
205
|
-
it('Accessibility of Scoring type dropdown in active state', { tags: 'a11y' }, () => {
|
206
|
-
cy.checkAccessibility(commonComponents.dropdownList())
|
207
|
-
});
|
208
|
-
|
209
|
-
it('Clicking outside the Scoring type dropdown menu should close the dropdown menu', () => {
|
210
|
-
scoringSectionBase.scoringLabel()
|
211
|
-
.click();
|
212
|
-
scoringSectionBase.scoringTypeDropdownList()
|
213
|
-
.should('not.exist');
|
214
|
-
});
|
215
|
-
|
216
|
-
it('CSS of Scoring section label and dropdown', { tags: 'css' }, () => {
|
217
|
-
utilities.verifyCSS(scoringSectionBase.scoringLabel(), {
|
218
|
-
'color': css.color.sectionHeading,
|
219
|
-
'font-size': css.fontSize.default,
|
220
|
-
'font-weight': css.fontWeight.semibold
|
221
|
-
});
|
222
|
-
utilities.verifyCSS(scoringSectionBase.scoringTypeLabel(), {
|
223
|
-
'color': css.color.labels,
|
224
|
-
'font-size': css.fontSize.normal,
|
225
|
-
'font-weight': css.fontWeight.semibold
|
226
|
-
});
|
227
|
-
utilities.verifyCSS(scoringSectionBase.scoringTypeDropdown().find('.dropdown-label-text'), {
|
228
|
-
'color': css.color.liText,
|
229
|
-
'font-size': css.fontSize.default,
|
230
|
-
'font-weight': css.fontWeight.regular
|
231
|
-
});
|
232
|
-
});
|
233
|
-
},
|
234
|
-
|
235
|
-
verifyPointsFieldErrorState: (allocatedPoints) => {
|
236
|
-
it('When the user focuses in and out of the empty points input field, \'Please enter points.\' validation text should be displayed below the Points input field', () => {
|
237
|
-
scoringSectionBase.pointsInputField()
|
238
|
-
.focus()
|
239
|
-
.blur();
|
240
|
-
scoringSectionBase.pleaseEnterPointsErrorMessage()
|
241
|
-
.verifyInnerText('Error: Please enter points.')
|
242
|
-
.and('be.visible');
|
243
|
-
});
|
244
|
-
|
245
|
-
it('CSS of points field error message', { tags: 'css' }, () => {
|
246
|
-
scoringSectionBase.pointsLabel()
|
247
|
-
.parents('.points-wrapper')
|
248
|
-
.within(() => {
|
249
|
-
commonComponents.errorMessage()
|
250
|
-
.verifyCSS(css.color.errorText, css.fontSize.small, css.fontWeight.regular);
|
251
|
-
});
|
252
|
-
});
|
253
|
-
|
254
|
-
it('Accessibility of points field error message', { tags: 'a11y' }, () => {
|
255
|
-
cy.checkAccessibility(commonComponents.errorMessage())
|
256
|
-
});
|
257
|
-
|
258
|
-
it('When the user enters point in Points input field then the \'Please enter points.\' validation text should disappear', () => {
|
259
|
-
scoringSectionBase.pointsInputField()
|
260
|
-
.type(allocatedPoints)
|
261
|
-
.should('have.value', allocatedPoints);
|
262
|
-
scoringSectionBase.pleaseEnterPointsErrorMessage()
|
263
|
-
.should('not.exist');
|
264
|
-
});
|
265
|
-
},
|
266
|
-
|
267
|
-
/**
|
268
|
-
* @param {number} allocatedPoints points entered in the points input field
|
269
|
-
* @param {number} minimumPoints points entered in the minimum score awarded (if attempted) input field
|
270
|
-
* @param {number} maxPoints maximum points that can be achieved for the question
|
271
|
-
* @description this function verifies the error conditions of minimum score awarded (if attempted) input field
|
272
|
-
*/
|
273
|
-
verifyMinimumScoreIfAttemptedFieldErrorState: (allocatedPoints, minimumPoints, maxPoints) => {
|
274
|
-
it('When the user focuses in and out of the empty Minimum score awarded (if attempted) input field, any validation text should not be displayed', () => {
|
275
|
-
cy.log('Pre-step: Selecting minimum scoring');
|
276
|
-
scoringSectionBase.steps.expandMinimumScoringDropdown();
|
277
|
-
scoringSectionBase.steps.selectMinimumScoringTypeListOption('Award minimum score only if attempted');
|
278
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
279
|
-
.click()
|
280
|
-
.blur();
|
281
|
-
scoringSectionBase.pleaseEnterPointsErrorMessage()
|
282
|
-
.should('not.exist');
|
283
|
-
});
|
284
|
-
|
285
|
-
it('If the user enters points more than the allocated points in \'Minimum score awarded (if attempted)\' input field, an error message \'Error: Minimum score cannot be greater than allocated points.: *points in points field*\' should be displayed', () => {
|
286
|
-
cy.log('Pre step: allocating points')
|
287
|
-
scoringSectionBase.steps.allotPoints(allocatedPoints);
|
288
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
289
|
-
.clear()
|
290
|
-
.type(minimumPoints)
|
291
|
-
.should('have.value', minimumPoints)
|
292
|
-
.blur();
|
293
|
-
cy.get('body')
|
294
|
-
.click();
|
295
|
-
commonComponents.errorMessage()
|
296
|
-
.verifyInnerText(`Error: Minimum score cannot be greater than allocated points.: ${maxPoints}`);
|
297
|
-
});
|
298
|
-
|
299
|
-
it('The error message should disappear once the user removes the entered points from the Minimum score awarded (if attempted) input field', () => {
|
300
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
301
|
-
.clear()
|
302
|
-
cy.get('body')
|
303
|
-
.click();
|
304
|
-
commonComponents.errorMessage()
|
305
|
-
.should('not.exist');
|
306
|
-
});
|
307
|
-
},
|
308
|
-
|
309
|
-
//V3- need to update this for all files
|
310
|
-
verifyPointsLabelAndInputField: () => {
|
311
|
-
it('When the user selects \'Auto Scored\' option from the Scoring type dropdown, then \'Points\' label and input field should be displayed', () => {
|
312
|
-
scoringSectionBase.steps.verifyDefaultPointsLabelAndInputField();
|
313
|
-
});
|
314
|
-
|
315
|
-
it('CSS of \'Points\' label and input field', { tags: 'css' }, () => {
|
316
|
-
scoringSectionBase.pointsLabel()
|
317
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
318
|
-
scoringSectionBase.pointsInputField()
|
319
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
320
|
-
});
|
321
|
-
|
322
|
-
it('Accessibility of \'Points\' label and input field', { tags: 'a11y' }, () => {
|
323
|
-
cy.checkAccessibility(scoringSectionBase.pointsInputField().parents('.points-wrapper'));
|
324
|
-
});
|
325
|
-
},
|
326
|
-
|
327
|
-
//V3- need to update this for all files
|
328
|
-
verifyMinimumScoreAwardedLabelAndInputField: () => {
|
329
|
-
it('When the user selects \'Auto Scored\' option from the Scoring type dropdown, then \'Minimum score awarded (if attempted)\' label and input field should be displayed', () => {
|
330
|
-
scoringSectionBase.steps.verifyDefaultMinimumScoreIfAttemptedLabelAndPointsField();
|
331
|
-
});
|
332
|
-
|
333
|
-
it('User should be able to enter points in \'Minimum score awarded (if attempted)\' input field', () => {
|
334
|
-
scoringSectionBase.steps.allotMinimumScoreAwardedIfAttempted(3);
|
335
|
-
});
|
336
|
-
|
337
|
-
it('CSS of \'Minimum score awarded (if attempted)\' label and input field', { tags: 'css' }, () => {
|
338
|
-
scoringSectionBase.minimumScoreIfAttemptedLabel()
|
339
|
-
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
340
|
-
scoringSectionBase.minimumScoreIfAttemptedInputField()
|
341
|
-
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
342
|
-
});
|
343
|
-
|
344
|
-
it('Accessibility of \'Minimum score awarded (if attempted)\' label and input field', { tags: 'a11y' }, () => {
|
345
|
-
cy.checkAccessibility(scoringSectionBase.minimumScoreIfAttemptedInputField().parents('.points-container'));
|
346
|
-
});
|
347
|
-
},
|
348
|
-
}
|
349
|
-
|
350
|
-
export const scoringSectionBase = {
|
351
|
-
...selectors,
|
352
|
-
steps,
|
353
|
-
tests
|
354
|
-
}
|
@@ -1,80 +0,0 @@
|
|
1
|
-
//This file is deprecated
|
2
|
-
const selectors = {
|
3
|
-
specialCharactersLabel: () => cy.get('.special-character-label'),
|
4
|
-
displaySpecialCharactersLabel: () => cy.get('[data-ngie-testid="display-special-characters-checkbox"] .MuiFormControlLabel-label'),
|
5
|
-
displaySpecialCharactersCheckbox: () => cy.get('[data-ngie-testid="display-special-characters-checkbox"] input'),
|
6
|
-
customSpecialCharactersLabel: () => cy.get('.special-character-wrapper [class*="InlineTextFieldWithDebouncestyles__PropertyLabel"]'),
|
7
|
-
customSpecialCharactersInputField: () => cy.get('input[aria-label="Custom Special Characters"]'),
|
8
|
-
setCorrectAnsResponseFieldSpecialCharactersButton: () => cy.get('.custon-special-character-button')
|
9
|
-
}
|
10
|
-
|
11
|
-
const steps = {
|
12
|
-
checkDisplaySpecialCharactersCheckbox: () => {
|
13
|
-
specialAndCustomSpecialCharactersComponent.displaySpecialCharactersCheckbox()
|
14
|
-
.click()
|
15
|
-
.should('be.checked');
|
16
|
-
},
|
17
|
-
|
18
|
-
/**
|
19
|
-
* Click on the special characters button in a response field in the set correct answer section.
|
20
|
-
* @param {number} responseFieldIndex - The index of the response field to click the button.
|
21
|
-
*/
|
22
|
-
clickOnSpecialCharactersButtonSetCorrectAnswerSection: (responseFieldIndex) => {
|
23
|
-
specialAndCustomSpecialCharactersComponent.setCorrectAnsResponseFieldSpecialCharactersButton()
|
24
|
-
.eq(responseFieldIndex)
|
25
|
-
.should('be.visible')
|
26
|
-
.click();
|
27
|
-
},
|
28
|
-
|
29
|
-
/**
|
30
|
-
* Enter text into the custom special characters input field.
|
31
|
-
* @param {string} symbols - The symbols to enter into the input field.
|
32
|
-
*/
|
33
|
-
enterTextInCustomSpecialCharactersInputField: (symbols) => {
|
34
|
-
specialAndCustomSpecialCharactersComponent.customSpecialCharactersInputField()
|
35
|
-
.type(symbols)
|
36
|
-
.should('have.value', symbols);
|
37
|
-
}
|
38
|
-
}
|
39
|
-
|
40
|
-
const tests = {
|
41
|
-
verifyAdditionalSettingsCustomSpecialCharactersSection: () => {
|
42
|
-
it('\'Special characters\' label and \'Display special characters\' label and checkbox should be displayed', () => {
|
43
|
-
specialAndCustomSpecialCharactersComponent.specialCharactersLabel()
|
44
|
-
.verifyInnerText('Special characters')
|
45
|
-
.should('be.visible');
|
46
|
-
specialAndCustomSpecialCharactersComponent.displaySpecialCharactersLabel()
|
47
|
-
.verifyInnerText('Display special characters')
|
48
|
-
.should('be.visible');
|
49
|
-
specialAndCustomSpecialCharactersComponent.displaySpecialCharactersCheckbox()
|
50
|
-
.should('not.be.checked')
|
51
|
-
.and('exist');
|
52
|
-
});
|
53
|
-
|
54
|
-
it('\'Custom special characters\' label and \'Custom special characters\' input field should be displayed, by default the input field should be disabled', () => {
|
55
|
-
specialAndCustomSpecialCharactersComponent.customSpecialCharactersLabel()
|
56
|
-
.verifyInnerText('Custom special characters');
|
57
|
-
specialAndCustomSpecialCharactersComponent.customSpecialCharactersInputField()
|
58
|
-
.should('be.disabled');
|
59
|
-
});
|
60
|
-
|
61
|
-
it('When the \'Custom special characters\' functionality is disabled then the \'Special characters\' button should not be displayed in the set correct answer response field', () => {
|
62
|
-
specialAndCustomSpecialCharactersComponent.setCorrectAnsResponseFieldSpecialCharactersButton()
|
63
|
-
.should('not.exist');
|
64
|
-
});
|
65
|
-
|
66
|
-
it('When user checks the \'Display special characters\' checkbox then the \'Custom special characters\' input field should be enabled', () => {
|
67
|
-
specialAndCustomSpecialCharactersComponent.displaySpecialCharactersCheckbox()
|
68
|
-
.click()
|
69
|
-
.should('be.checked');
|
70
|
-
specialAndCustomSpecialCharactersComponent.customSpecialCharactersInputField()
|
71
|
-
.should('be.enabled');
|
72
|
-
});
|
73
|
-
}
|
74
|
-
}
|
75
|
-
|
76
|
-
export const specialAndCustomSpecialCharactersComponent = {
|
77
|
-
...selectors,
|
78
|
-
steps,
|
79
|
-
tests
|
80
|
-
}
|
@@ -1,59 +0,0 @@
|
|
1
|
-
//This file is deprecated
|
2
|
-
import { specialOrMathCharacters } from "../../fixtures/specialAndMathCharacters"
|
3
|
-
import { dialogBoxBase } from "../dialogBoxBase";
|
4
|
-
|
5
|
-
const selectors = {
|
6
|
-
specialCharactersFlyoutIcon: () => cy.get('.character-wrapper')
|
7
|
-
}
|
8
|
-
|
9
|
-
const steps = {
|
10
|
-
verifySpecialCharactersFlyoutHeaderContents: () => {
|
11
|
-
dialogBoxBase.dialogBox()
|
12
|
-
.should('be.visible');
|
13
|
-
dialogBoxBase.dialogBoxTitle()
|
14
|
-
.verifyInnerText('Special characters')
|
15
|
-
.should('be.visible');
|
16
|
-
dialogBoxBase.buttonClose()
|
17
|
-
.should('be.visible');
|
18
|
-
},
|
19
|
-
|
20
|
-
clickingOnSpecialCharactersSymbolsFromFlyout: () => {
|
21
|
-
specialCharactersFlyoutComponent.specialCharactersFlyoutIcon()
|
22
|
-
.each(($el) => {
|
23
|
-
cy.wrap($el)
|
24
|
-
.click();
|
25
|
-
});
|
26
|
-
},
|
27
|
-
|
28
|
-
/**
|
29
|
-
* Verify the special characters flyout icons.
|
30
|
-
* @param {string[]} customSpecialCharactersArray - An array of expected special characters to verify.
|
31
|
-
*/
|
32
|
-
verifySpecialCharactersFlyoutIcons: (customSpecialCharactersArray) => {
|
33
|
-
specialCharactersFlyoutComponent.specialCharactersFlyoutIcon()
|
34
|
-
.each(($el, index) => {
|
35
|
-
cy.wrap($el)
|
36
|
-
.should('have.text', `${customSpecialCharactersArray[index]}`)
|
37
|
-
});
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
const tests = {
|
42
|
-
verifySpecialCharactersFlyoutSymbols: () => {
|
43
|
-
it(`All the ${specialOrMathCharacters['specialCharacters'].popupTitle} symbols should be displayed in the flyout`, () => {
|
44
|
-
let symbolsArray = Object.values(specialOrMathCharacters['specialCharacters'].characters);
|
45
|
-
specialCharactersFlyoutComponent.specialCharactersFlyoutIcon()
|
46
|
-
.each(($element, count) => {
|
47
|
-
cy.wrap($element)
|
48
|
-
.should('be.visible')
|
49
|
-
.verifyInnerText(symbolsArray[count].symbol);
|
50
|
-
});
|
51
|
-
});
|
52
|
-
}
|
53
|
-
}
|
54
|
-
|
55
|
-
export const specialCharactersFlyoutComponent = {
|
56
|
-
...selectors,
|
57
|
-
steps,
|
58
|
-
tests
|
59
|
-
}
|