itemengine-cypress-automation 1.0.174-uploadResponseMigrationScript-45ca862.0 → 1.0.175-15thAprilRepoUpdate-cb0f7d0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +0 -18
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +10 -7
- package/cypress/e2e/ILC/FeedbackScaleNew/additionalSettings.js +111 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/colorPopup.js +206 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +262 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +51 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +17 -17
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +1 -0
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +6 -7
- package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +3 -3
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +0 -1
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -0
- package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -4
- package/cypress/e2e/ILC/GridFill/gridLayoutEditTabFunctionality.js +2 -2
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +12 -12
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +91 -90
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +93 -92
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +97 -95
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +62 -62
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +118 -117
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +124 -120
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +128 -125
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +97 -96
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +222 -196
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +34 -34
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +20 -20
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +29 -29
- package/cypress/e2e/ILC/NumberLine/headerSection.js +3 -2
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +40 -37
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +7 -4
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +14 -12
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +24 -23
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +2 -2
- package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +4 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +8 -15
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +1 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +1 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +332 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/manuallyAndNonScored.js +149 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -1
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +11 -11
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +337 -0
- package/cypress/e2e/ILC/TextSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +206 -0
- package/cypress/e2e/ILC/TextSelection/{previewContentsForAllViews.js → previewContentsForAllViews.smoke.js} +3 -3
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +87 -87
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +5 -5
- package/cypress/pages/audioResponsePage.js +1 -0
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +2 -1
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -4
- package/cypress/pages/components/colorPopupComponent.js +11 -0
- package/cypress/pages/components/createCustomCategoryFlyout.js +13 -9
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/equationEditorFlyout.js +0 -1
- package/cypress/pages/components/essayResponseCommonComponents.js +1 -1
- package/cypress/pages/components/imageCanvasComponent.js +1 -1
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/optionsWrapperComponent.js +2 -1
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +19 -7
- package/cypress/pages/components/setPointsPopupBase.js +17 -4
- package/cypress/pages/components/studentViewSettingsLabelComponent.js +2 -2
- package/cypress/pages/drawingResponsePage.js +2 -3
- package/cypress/pages/feedbackScalePage.js +143 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +12 -12
- package/cypress/pages/graphingPage.js +6 -6
- package/cypress/pages/gridFillPage.js +64 -7
- package/cypress/pages/matchingPage.js +3 -3
- package/cypress/pages/numberLinePage.js +342 -215
- package/cypress/pages/readingRulerPage.js +1 -1
- package/cypress/pages/textEntryMathPage.js +9 -0
- package/cypress/pages/textEntryMathWithImagePage.js +11 -11
- package/cypress/pages/textSelectionPage.js +125 -57
- package/package.json +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +0 -355
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
- package/cypress/pages/feedbackScalePage copy.js +0 -716
@@ -53,93 +53,6 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
53
53
|
});
|
54
54
|
});
|
55
55
|
|
56
|
-
describe('Renaming an uploaded file', () => {
|
57
|
-
abortEarlySetup();
|
58
|
-
before(() => {
|
59
|
-
uploadResponsePage.steps.navigateToCreateQuestion('upload response');
|
60
|
-
cy.log('Uploading a file in preview tab');
|
61
|
-
uploadResponsePage.steps.switchToPreviewTab();
|
62
|
-
uploadResponsePage.steps.fileUploadAndVerify(['image.png']);
|
63
|
-
});
|
64
|
-
|
65
|
-
it('On hovering over the \'Edit display text\' icon button, tooltip \'Edit display text\' should be displayed', () => {
|
66
|
-
utilities.hoverOverElement(uploadResponsePage.editDisplayTextIcon());
|
67
|
-
utilities.verifyInnerText(commonComponents.tooltipText(), 'Edit display text');
|
68
|
-
});
|
69
|
-
|
70
|
-
it('Clicking on the \'Edit display text\' icon button should open the \'Display Text\' popup with label \'Display Text\' and the input field in the popup should be prefilled with the name of the file and the name text should be selected by default and \'Save\' and \'Cancel\' buttons should be displayed', () => {
|
71
|
-
uploadResponsePage.steps.clickOnEditDisplayTextIcon(0);
|
72
|
-
utilities.verifyElementVisibilityState(uploadResponsePage.dialogBox(), 'visible');
|
73
|
-
utilities.verifyInnerText(uploadResponsePage.dialogBoxTitle(), 'Display text');
|
74
|
-
uploadResponsePage.steps.verifyEditDisplayTextPopupInputFieldAndSelectedText();
|
75
|
-
utilities.verifyInnerText(uploadResponsePage.acceptButton(), 'Save');
|
76
|
-
utilities.verifyElementVisibilityState(uploadResponsePage.acceptButton(), 'visible');
|
77
|
-
utilities.verifyInnerText(uploadResponsePage.cancelButton(), 'Cancel');
|
78
|
-
utilities.verifyElementVisibilityState(uploadResponsePage.cancelButton(), 'visible');
|
79
|
-
});
|
80
|
-
|
81
|
-
it('CSS of the \'Display Text\' popup', { tags: 'css' }, () => {
|
82
|
-
utilities.verifyCSS(uploadResponsePage.dialogBoxTitle(), {
|
83
|
-
'color': css.color.questionHeading,
|
84
|
-
'font-size': css.fontSize.heading,
|
85
|
-
'font-weight': css.fontWeight.semibold
|
86
|
-
});
|
87
|
-
utilities.verifyCSS(uploadResponsePage.editDisplayTextPopupInputField(), {
|
88
|
-
'color': css.color.text,
|
89
|
-
'font-size': css.fontSize.heading,
|
90
|
-
'font-weight': css.fontWeight.regular,
|
91
|
-
'background-color': css.color.defaultBackground
|
92
|
-
});
|
93
|
-
utilities.verifyCSS(uploadResponsePage.acceptButton(), {
|
94
|
-
'color': css.color.primaryBtn,
|
95
|
-
'font-size': css.fontSize.default,
|
96
|
-
'font-weight': css.fontWeight.semibold,
|
97
|
-
'background-color': css.color.primaryBtnBg
|
98
|
-
});
|
99
|
-
utilities.verifyCSS(uploadResponsePage.cancelButton(), {
|
100
|
-
'color': css.color.secondaryBtn,
|
101
|
-
'font-size': css.fontSize.default,
|
102
|
-
'font-weight': css.fontWeight.semibold,
|
103
|
-
'background-color': css.color.transparent
|
104
|
-
});
|
105
|
-
});
|
106
|
-
|
107
|
-
it('Accessibility of the \'Display Text\' popup', { tags: 'a11y' }, () => {
|
108
|
-
cy.checkAccessibility(uploadResponsePage.dialogBox());
|
109
|
-
});
|
110
|
-
|
111
|
-
it('When the user removes the name of the file from the input field in the \'Display Text\' popup, then placeholder text \'Enter Display Text\' should be displayed', () => {
|
112
|
-
uploadResponsePage.steps.clearEditDisplayTextPopupInputField();
|
113
|
-
uploadResponsePage.steps.verifyEditDisplayTextPopupInputFieldPlaceholderText();
|
114
|
-
});
|
115
|
-
|
116
|
-
it('When the user clicks on \'Save\' button, a validation error text \'Display text is required.\' should be displayed below the input field', () => {
|
117
|
-
uploadResponsePage.steps.clickAcceptButtonInPopup();
|
118
|
-
utilities.verifyInnerText(uploadResponsePage.errorMessage(), 'Error: Display text is required.');
|
119
|
-
});
|
120
|
-
|
121
|
-
it('When the user enters text in Display Text input field i.e. updates the file name, then the validation text should disappear and when user clicks on \'Save\' button, the name of the file should get updated', () => {
|
122
|
-
uploadResponsePage.steps.enterTextInEditDisplayTextPopupInputField('imageEdited.png');
|
123
|
-
uploadResponsePage.steps.verifyTextInEditDisplayTextPopupInputField('imageEdited.png');
|
124
|
-
uploadResponsePage.steps.verifyErrorMessageIsNotDisplayed();
|
125
|
-
uploadResponsePage.steps.clickAcceptButtonInPopup();
|
126
|
-
uploadResponsePage.steps.verifyUploadedFileName(0, 'imageEdited.png');
|
127
|
-
});
|
128
|
-
|
129
|
-
it('When the user updates the file name and clicks on the \'Cancel\' button, the latest changes should be reverted and the \'Display Text\' popup should close', () => {
|
130
|
-
cy.log('clicking on edit display text button')
|
131
|
-
uploadResponsePage.steps.clickOnEditDisplayTextIcon(0);
|
132
|
-
uploadResponsePage.steps.clearEditDisplayTextPopupInputField();
|
133
|
-
uploadResponsePage.steps.enterTextInEditDisplayTextPopupInputField('imageEdited2.png');
|
134
|
-
uploadResponsePage.steps.clickCancelButtonInPopup();
|
135
|
-
uploadResponsePage.steps.verifyUploadedFileName(0, 'imageEdited.png');
|
136
|
-
});
|
137
|
-
|
138
|
-
it('If the user tries to download file after renaming, the file should get downloaded with the original name', () => {
|
139
|
-
cy.verifyUploadFilePreviewDownload('image.png');
|
140
|
-
});
|
141
|
-
});
|
142
|
-
|
143
56
|
describe('Add a description for a file', () => {
|
144
57
|
abortEarlySetup();
|
145
58
|
before(() => {
|
@@ -247,4 +160,91 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
247
160
|
utilities.verifyElementVisibilityState(uploadResponsePage.fileName(), 'notExist');
|
248
161
|
});
|
249
162
|
});
|
163
|
+
|
164
|
+
describe('Renaming an uploaded file', () => {
|
165
|
+
abortEarlySetup();
|
166
|
+
before(() => {
|
167
|
+
uploadResponsePage.steps.navigateToCreateQuestion('upload response');
|
168
|
+
cy.log('Uploading a file in preview tab');
|
169
|
+
uploadResponsePage.steps.switchToPreviewTab();
|
170
|
+
uploadResponsePage.steps.fileUploadAndVerify(['image.png']);
|
171
|
+
});
|
172
|
+
|
173
|
+
it('On hovering over the \'Edit display text\' icon button, tooltip \'Edit display text\' should be displayed', () => {
|
174
|
+
utilities.hoverOverElement(uploadResponsePage.editDisplayTextIcon());
|
175
|
+
utilities.verifyInnerText(commonComponents.tooltipText(), 'Edit display text');
|
176
|
+
});
|
177
|
+
|
178
|
+
it('Clicking on the \'Edit display text\' icon button should open the \'Display Text\' popup with label \'Display Text\' and the input field in the popup should be prefilled with the name of the file and the name text should be selected by default and \'Save\' and \'Cancel\' buttons should be displayed', () => {
|
179
|
+
uploadResponsePage.steps.clickOnEditDisplayTextIcon(0);
|
180
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.dialogBox(), 'visible');
|
181
|
+
utilities.verifyInnerText(uploadResponsePage.dialogBoxTitle(), 'Display text');
|
182
|
+
uploadResponsePage.steps.verifyEditDisplayTextPopupInputFieldAndSelectedText();
|
183
|
+
utilities.verifyInnerText(uploadResponsePage.acceptButton(), 'Save');
|
184
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.acceptButton(), 'visible');
|
185
|
+
utilities.verifyInnerText(uploadResponsePage.cancelButton(), 'Cancel');
|
186
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.cancelButton(), 'visible');
|
187
|
+
});
|
188
|
+
|
189
|
+
it('CSS of the \'Display Text\' popup', { tags: 'css' }, () => {
|
190
|
+
utilities.verifyCSS(uploadResponsePage.dialogBoxTitle(), {
|
191
|
+
'color': css.color.questionHeading,
|
192
|
+
'font-size': css.fontSize.heading,
|
193
|
+
'font-weight': css.fontWeight.semibold
|
194
|
+
});
|
195
|
+
utilities.verifyCSS(uploadResponsePage.editDisplayTextPopupInputField(), {
|
196
|
+
'color': css.color.text,
|
197
|
+
'font-size': css.fontSize.heading,
|
198
|
+
'font-weight': css.fontWeight.regular,
|
199
|
+
'background-color': css.color.defaultBackground
|
200
|
+
});
|
201
|
+
utilities.verifyCSS(uploadResponsePage.acceptButton(), {
|
202
|
+
'color': css.color.primaryBtn,
|
203
|
+
'font-size': css.fontSize.default,
|
204
|
+
'font-weight': css.fontWeight.semibold,
|
205
|
+
'background-color': css.color.primaryBtnBg
|
206
|
+
});
|
207
|
+
utilities.verifyCSS(uploadResponsePage.cancelButton(), {
|
208
|
+
'color': css.color.secondaryBtn,
|
209
|
+
'font-size': css.fontSize.default,
|
210
|
+
'font-weight': css.fontWeight.semibold,
|
211
|
+
'background-color': css.color.transparent
|
212
|
+
});
|
213
|
+
});
|
214
|
+
|
215
|
+
it('Accessibility of the \'Display Text\' popup', { tags: 'a11y' }, () => {
|
216
|
+
cy.checkAccessibility(uploadResponsePage.dialogBox());
|
217
|
+
});
|
218
|
+
|
219
|
+
it('When the user removes the name of the file from the input field in the \'Display Text\' popup, then placeholder text \'Enter Display Text\' should be displayed', () => {
|
220
|
+
uploadResponsePage.steps.clearEditDisplayTextPopupInputField();
|
221
|
+
uploadResponsePage.steps.verifyEditDisplayTextPopupInputFieldPlaceholderText();
|
222
|
+
});
|
223
|
+
|
224
|
+
it('When the user clicks on \'Save\' button, a validation error text \'Display text is required.\' should be displayed below the input field', () => {
|
225
|
+
uploadResponsePage.steps.clickAcceptButtonInPopup();
|
226
|
+
utilities.verifyInnerText(uploadResponsePage.errorMessage(), 'Error: Display text is required.');
|
227
|
+
});
|
228
|
+
|
229
|
+
it('When the user enters text in Display Text input field i.e. updates the file name, then the validation text should disappear and when user clicks on \'Save\' button, the name of the file should get updated', () => {
|
230
|
+
uploadResponsePage.steps.enterTextInEditDisplayTextPopupInputField('imageEdited.png');
|
231
|
+
uploadResponsePage.steps.verifyTextInEditDisplayTextPopupInputField('imageEdited.png');
|
232
|
+
uploadResponsePage.steps.verifyErrorMessageIsNotDisplayed();
|
233
|
+
uploadResponsePage.steps.clickAcceptButtonInPopup();
|
234
|
+
uploadResponsePage.steps.verifyUploadedFileName(0, 'imageEdited.png');
|
235
|
+
});
|
236
|
+
|
237
|
+
it('When the user updates the file name and clicks on the \'Cancel\' button, the latest changes should be reverted and the \'Display Text\' popup should close', () => {
|
238
|
+
cy.log('clicking on edit display text button')
|
239
|
+
uploadResponsePage.steps.clickOnEditDisplayTextIcon(0);
|
240
|
+
uploadResponsePage.steps.clearEditDisplayTextPopupInputField();
|
241
|
+
uploadResponsePage.steps.enterTextInEditDisplayTextPopupInputField('imageEdited2.png');
|
242
|
+
uploadResponsePage.steps.clickCancelButtonInPopup();
|
243
|
+
uploadResponsePage.steps.verifyUploadedFileName(0, 'imageEdited.png');
|
244
|
+
});
|
245
|
+
|
246
|
+
it('If the user tries to download file after renaming, the file should get downloaded with the original name', () => {
|
247
|
+
cy.verifyUploadFilePreviewDownload('image.png');
|
248
|
+
});
|
249
|
+
});
|
250
250
|
});
|
@@ -172,7 +172,7 @@ export const equationEditorCategoriesAndSymbols = {
|
|
172
172
|
},
|
173
173
|
sqrt: {
|
174
174
|
title: 'Square Root',
|
175
|
-
|
175
|
+
textElement: null,
|
176
176
|
ariaLabel: 'Sqrt',
|
177
177
|
displayText: null,
|
178
178
|
},
|
@@ -424,7 +424,7 @@ export const equationEditorCategoriesAndSymbols = {
|
|
424
424
|
},
|
425
425
|
sqrt: {
|
426
426
|
title: 'Square Root',
|
427
|
-
|
427
|
+
textElement: null,
|
428
428
|
ariaLabel: 'Sqrt',
|
429
429
|
displayText: null,
|
430
430
|
},
|
@@ -436,7 +436,7 @@ export const equationEditorCategoriesAndSymbols = {
|
|
436
436
|
},
|
437
437
|
nSqrt: {
|
438
438
|
title: 'Nth root',
|
439
|
-
|
439
|
+
textElement: null,
|
440
440
|
ariaLabel: 'Nsqrt',
|
441
441
|
displayText: null,
|
442
442
|
},
|
@@ -514,7 +514,7 @@ export const equationEditorCategoriesAndSymbols = {
|
|
514
514
|
},
|
515
515
|
sqrt: {
|
516
516
|
title: 'Square Root',
|
517
|
-
|
517
|
+
textElement: null,
|
518
518
|
ariaLabel: 'Sqrt',
|
519
519
|
displayText: null,
|
520
520
|
},
|
@@ -544,7 +544,7 @@ export const equationEditorCategoriesAndSymbols = {
|
|
544
544
|
},
|
545
545
|
nSqrt: {
|
546
546
|
title: 'Nth root',
|
547
|
-
|
547
|
+
textElement: null,
|
548
548
|
ariaLabel: 'Nsqrt',
|
549
549
|
displayText: null,
|
550
550
|
},
|
@@ -45,7 +45,7 @@ const selectors = {
|
|
45
45
|
},
|
46
46
|
roundNegativeScoresToZeroCheckboxLabel: () => cy.get('[data-ngie-testid="round-negative-scores-to-zero-checkbox"]'),
|
47
47
|
roundNegativeScoresToZeroCheckbox: () => cy.get('[data-ngie-testid="round-negative-scores-to-zero-checkbox"] input'),
|
48
|
-
pointsInputField: () => cy.get('[class*="points-input-field"]
|
48
|
+
pointsInputField: () => cy.get('[class*="points-input-field"] input[type="text"]'),
|
49
49
|
pointsLabel: () => cy.get('.points-label')
|
50
50
|
}
|
51
51
|
|
@@ -298,6 +298,7 @@ const steps = {
|
|
298
298
|
.click();
|
299
299
|
break;
|
300
300
|
case 'specify points for each incorrect option':
|
301
|
+
case 'specify points for each incorrect answer':
|
301
302
|
autoScoredScoringSectionMultiResponseType.specifyPointsForEachIncorrectOptionRadioButton()
|
302
303
|
.click();
|
303
304
|
break;
|
@@ -11,7 +11,7 @@ const selectors = {
|
|
11
11
|
maximumCheckAnswerAttemptsDropdown: () => cy.get('#Maximum-check-answer-attempts-select'),
|
12
12
|
maximumCheckAnswerAttemptsDropdownListOptions: (ariaLabel = null) => {
|
13
13
|
if (ariaLabel) {
|
14
|
-
return cy.get(`[aria-labelledby*="Maximum-check-answer-attempts-dropdown-label"] [role="option"][aria-label
|
14
|
+
return cy.get(`[aria-labelledby*="Maximum-check-answer-attempts-dropdown-label"] [role="option"][aria-label*="${ariaLabel}"]`)
|
15
15
|
} else {
|
16
16
|
return cy.get('[aria-labelledby*="Maximum-check-answer-attempts-dropdown-label"] [role="option"]')
|
17
17
|
}
|
@@ -114,10 +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') {
|
118
|
-
imageCanvasComponent.steps.verifyImageIsUploaded();
|
119
|
-
}
|
120
|
-
if (questionType !== 'grid fill') {
|
117
|
+
if (questionType !== 'graphing' && questionType !== 'grid fill') {
|
121
118
|
imageCanvasComponent.steps.verifyImageIsUploaded();
|
122
119
|
}
|
123
120
|
});
|
@@ -260,6 +260,17 @@ const steps = {
|
|
260
260
|
colorPopupComponent.opacityGradientHue()
|
261
261
|
.click();
|
262
262
|
},
|
263
|
+
|
264
|
+
/**
|
265
|
+
* @param {number} blockIndex index of the color block in the recommended colors section
|
266
|
+
* @param {string} color recommended color in rgb format
|
267
|
+
* @description this function verifies the color of the recommended color block
|
268
|
+
*/
|
269
|
+
verifyRecommendedColorBlockValue: (blockIndex, color) => {
|
270
|
+
utilities.verifyCSS(colorPopupComponent.recommendedColorBlock().eq(blockIndex), {
|
271
|
+
'background-color': color
|
272
|
+
});
|
273
|
+
},
|
263
274
|
}
|
264
275
|
|
265
276
|
const tests = {
|
@@ -85,15 +85,19 @@ const steps = {
|
|
85
85
|
verifyCreateCustomCategoryAccordionLabelsAndDefaultCheckbox: () => {
|
86
86
|
createCustomCategoryFlyout.categoryAccordions()
|
87
87
|
.each(($el, index) => {
|
88
|
-
|
89
|
-
.
|
90
|
-
|
91
|
-
|
92
|
-
.
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
88
|
+
if (index !== 0) {
|
89
|
+
cy.wrap($el)
|
90
|
+
.parents('.accordian-structure-equation-editor')
|
91
|
+
.within(() => {
|
92
|
+
createCustomCategoryFlyout.categoryAccordionCheckbox()
|
93
|
+
.should('not.be.checked');
|
94
|
+
utilities.verifyElementVisibilityState(createCustomCategoryFlyout.categoryAccordionCheckbox(), 'exist');
|
95
|
+
utilities.verifyInnerText(createCustomCategoryFlyout.categoryAccordionLabel(), `${equationEditorCategoriesAndSymbols[allCategories[index]].displayName}`)
|
96
|
+
});
|
97
|
+
}
|
98
|
+
createCustomCategoryFlyout.categoryAccordionLabel()
|
99
|
+
.contains(`${equationEditorCategoriesAndSymbols[allCategories[0]].displayName}`)
|
100
|
+
.should('not.exist')
|
97
101
|
});
|
98
102
|
},
|
99
103
|
|
@@ -136,6 +136,7 @@ const steps = {
|
|
136
136
|
.should('be.visible')
|
137
137
|
.within(() => {
|
138
138
|
utilities.verifyElementCount(draggableOptionContainer.draggableOption(), draggableOptionsArray.length);
|
139
|
+
utilities.verifyElementVisibilityState(draggableOptionContainer.draggableOption(), 'visible');
|
139
140
|
draggableOptionsArray.forEach((draggableOption, optionIndex) => {
|
140
141
|
utilities.verifyInnerText(utilities.getNthElement(draggableOptionContainer.draggableOption(), optionIndex), draggableOption);
|
141
142
|
});
|
@@ -385,7 +385,6 @@ const tests = {
|
|
385
385
|
it(`On clicking the ${equationEditorCategoriesAndSymbols[categoryName].displayName} category in the Equation Editor flyout, then the ${equationEditorCategoriesAndSymbols[categoryName].displayName} category tab should get selected`, () => {
|
386
386
|
equationEditorFlyout.categoryTab()
|
387
387
|
.contains(`${equationEditorCategoriesAndSymbols[categoryName].displayName}`, { matchCase: false })
|
388
|
-
.parents('.tool-wrapper')
|
389
388
|
.click()
|
390
389
|
.within(() => {
|
391
390
|
equationEditorFlyout.categoryTabTitle()
|
@@ -36,7 +36,7 @@ const selectors = {
|
|
36
36
|
customizeFormattingOptionsSectionExpandIcon: () => cy.get('.customize-formatting-option-wrapper [class*="expandIconWrapper"]'),
|
37
37
|
customizeFormattingOptionsTiles: (formattingOption = null) => {
|
38
38
|
if (formattingOption) {
|
39
|
-
return cy.get(`.toolbar-options-wrapper .icon-button-custom-format[
|
39
|
+
return cy.get(`.toolbar-options-wrapper .icon-button-custom-format[aria-label*="${formattingOption}"]`)
|
40
40
|
} else {
|
41
41
|
return cy.get('.toolbar-options-wrapper .icon-button-custom-format')
|
42
42
|
}
|
@@ -11,7 +11,7 @@ const css = Cypress.env('css');
|
|
11
11
|
const labels = [colorPopupComponent.selectedColorLabel, colorPopupComponent.hexLabel]
|
12
12
|
const inputFields = [colorPopupComponent.hexInputField];
|
13
13
|
const alignmentOptions = ['Top left', 'Center', 'Top right'];
|
14
|
-
const responseAreaPointerStyles = ['
|
14
|
+
const responseAreaPointerStyles = ['none', 'bottom', 'bottom right', 'right', 'top right', 'top', 'top left', 'left', 'bottom left'];
|
15
15
|
|
16
16
|
const selectors = {
|
17
17
|
insertResponseAreaButton: () => cy.get('[class*="ControlsBtnWrapper"] button').eq(1),
|
@@ -62,4 +62,5 @@ export * from './additionalSettingsAccessibilitySectionComponent';
|
|
62
62
|
export * from './specifyRowsAndColumnsComponent'
|
63
63
|
export * from './toolsAndControlsComponent';
|
64
64
|
export * from './resetPopupComponent';
|
65
|
-
export * from './
|
65
|
+
export * from './setPointsPopupBase';
|
66
|
+
export * from './defaultToolDropdown';
|
@@ -224,6 +224,7 @@ const steps = {
|
|
224
224
|
optionsWrapperComponent.optionsInputField()
|
225
225
|
.eq(index)
|
226
226
|
.type(textContent)
|
227
|
+
.should('have.text', textContent)
|
227
228
|
.blur();
|
228
229
|
});
|
229
230
|
},
|
@@ -352,7 +353,7 @@ const tests = {
|
|
352
353
|
optionsWrapperComponent.steps.verifyImageAndAltTextInOptionsInputField(inputFieldIndex);
|
353
354
|
});
|
354
355
|
},
|
355
|
-
|
356
|
+
|
356
357
|
/**
|
357
358
|
* Verify the ability to add bold text in the 'Options' input field.
|
358
359
|
* @param {number} inputFieldIndex - The index of the 'Options' input field to verify.
|
@@ -138,7 +138,7 @@ const tests = {
|
|
138
138
|
questionInputFieldComponent.steps.clearQuestionInputField();
|
139
139
|
questionInputFieldComponent.steps.verifyQuestionInputFieldPlaceholder();
|
140
140
|
questionInputFieldComponent.steps.addInputToQuestionInputField('Lorem Ipsum');
|
141
|
-
utilities.verifyTextContent(questionInputFieldComponent.questionInputField(), 'Lorem Ipsum');
|
141
|
+
utilities.verifyTextContent(questionInputFieldComponent.questionInputField(), 'Lorem Ipsum');
|
142
142
|
questionInputFieldComponent.steps.verifyQuestionInputFieldPlaceholderNotDisplayed();
|
143
143
|
});
|
144
144
|
},
|
@@ -57,20 +57,33 @@ const steps = {
|
|
57
57
|
verifyQuestionInstructionsTextPreviewTab: (questionText) => {
|
58
58
|
utilities.verifyInnerText(questionInstructionsComponent.questionInstructionsText(), questionText);
|
59
59
|
},
|
60
|
+
|
61
|
+
verifyQuestionInstructionsPlaceholderText: () => {
|
62
|
+
questionInstructionsComponent.questionInstructionsInputField()
|
63
|
+
.should('have.attr', 'data-cke-editorplaceholder', 'Enter question instructions');
|
64
|
+
},
|
65
|
+
|
66
|
+
verifyQuestionInstructionsPlaceholderTextNotExists: () => {
|
67
|
+
questionInstructionsComponent.questionInstructionsInputField()
|
68
|
+
.should('not.have.attr', 'data-cke-editorplaceholder');
|
69
|
+
},
|
70
|
+
|
71
|
+
focusInAndOutOfQuestionInstructionsInputField: () => {
|
72
|
+
questionInstructionsComponent.questionInstructionsInputField()
|
73
|
+
.click()
|
74
|
+
.blur();
|
75
|
+
}
|
60
76
|
}
|
61
77
|
|
62
78
|
const tests = {
|
63
79
|
verifyQuestionInstructionsInputFieldEditTab: () => {
|
64
80
|
it('\'Question Instructions\' label and input field should be displayed and \'Enter Question Instructions\' placeholder text should be displayed on input field', () => {
|
65
81
|
utilities.verifyInnerText(questionInstructionsComponent.questionInstructionsLabelEditTab(), 'Question instructions');
|
66
|
-
questionInstructionsComponent.
|
67
|
-
.should('have.attr', 'data-cke-editorplaceholder', 'Enter question instructions');
|
82
|
+
questionInstructionsComponent.steps.verifyQuestionInstructionsPlaceholderText();
|
68
83
|
});
|
69
84
|
|
70
85
|
it('When user focus in and out of the \'Question Instructions\' input field without typing anything, an error message should be thrown', () => {
|
71
|
-
questionInstructionsComponent.
|
72
|
-
.click()
|
73
|
-
.blur();
|
86
|
+
questionInstructionsComponent.steps.focusInAndOutOfQuestionInstructionsInputField();
|
74
87
|
questionInstructionsComponent.steps.verifyQuestionInstructionsErrorMessage()
|
75
88
|
});
|
76
89
|
|
@@ -95,8 +108,7 @@ const tests = {
|
|
95
108
|
});
|
96
109
|
|
97
110
|
it('When user adds Question instruction the placeholder text should not be displayed', () => {
|
98
|
-
questionInstructionsComponent.
|
99
|
-
.should('not.have.attr', 'data-cke-editorplaceholder');
|
111
|
+
questionInstructionsComponent.steps.verifyQuestionInstructionsPlaceholderTextNotExists();
|
100
112
|
});
|
101
113
|
|
102
114
|
it('CSS of Question Instructions in Edit tab', { tags: 'css' }, () => {
|
@@ -1,12 +1,14 @@
|
|
1
|
+
import utilities from "../../support/helpers/utilities";
|
1
2
|
import { dialogBoxBase } from "../dialogBoxBase";
|
2
3
|
import { commonComponents } from "./commonComponents";
|
3
4
|
import { scoringSectionBase } from "./scoringSectionBase";
|
4
5
|
|
5
6
|
const selector = {
|
6
7
|
...dialogBoxBase,
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
setPointsPopup: () => cy.get('[aria-labelledby="alert-dialog-title"][role="dialog"]'),
|
9
|
+
setPointsPopupTitle: () => cy.get('.dialog-title-wrapper'),
|
10
|
+
setPointsPopupOptions: () => cy.get('[class*="SetPointsPopupstyle__MappedAnswer"]'),
|
11
|
+
setPointsPopupPointsLabel: () => cy.get('[class*="SetPointsPopupstyle__PointLabel"]'),
|
10
12
|
setPointsPopupSaveButton: () => cy.get('.popup-button-wrapper button').eq(1),
|
11
13
|
setPointsPopupCancelButton: () => cy.get('.popup-button-wrapper button').eq(0),
|
12
14
|
}
|
@@ -73,7 +75,18 @@ const steps = {
|
|
73
75
|
.should('have.text', 'Error: Please enter points.');
|
74
76
|
});
|
75
77
|
});
|
76
|
-
}
|
78
|
+
},
|
79
|
+
|
80
|
+
/**
|
81
|
+
* @param {string[]} optionTextArray Array of options displayed in set points popup
|
82
|
+
* @description Verify the options displayed in set points popup
|
83
|
+
*/
|
84
|
+
verifySetPointsPopupOptions: (optionTextArray) => {
|
85
|
+
optionTextArray.forEach((optionText, index) => {
|
86
|
+
utilities.verifyInnerText(setPointsPopupBase.setPointsPopupOptions().eq(index), `${optionText}`);
|
87
|
+
});
|
88
|
+
utilities.verifyElementCount(setPointsPopupBase.setPointsPopupOptions(), optionTextArray.length);
|
89
|
+
},
|
77
90
|
}
|
78
91
|
|
79
92
|
export const setPointsPopupBase = {
|
@@ -7,12 +7,12 @@ const selectors = {
|
|
7
7
|
|
8
8
|
const tests = {
|
9
9
|
verifyStudentViewSettingsLabelAndCSS: () => {
|
10
|
-
it('\'Student
|
10
|
+
it('\'Student view settings\' label should be displayed', () => {
|
11
11
|
utilities.verifyInnerText(studentViewSettingsLabelComponent.studentViewSettingsLabel(), 'Student view settings');
|
12
12
|
utilities.verifyElementVisibilityState(studentViewSettingsLabelComponent.studentViewSettingsLabel(), 'visible');
|
13
13
|
});
|
14
14
|
|
15
|
-
it('CSS of \'Student
|
15
|
+
it('CSS of \'Student view settings\' section', { tags: 'css' }, () => {
|
16
16
|
utilities.verifyCSS(studentViewSettingsLabelComponent.studentViewSettingsLabel(), {
|
17
17
|
'color': css.color.labels,
|
18
18
|
'font-size': css.fontSize.default,
|
@@ -19,7 +19,7 @@ const selectors = {
|
|
19
19
|
customizeToolbarOptionsAndControlsLabel: () => cy.get('.customized-options-label'),
|
20
20
|
toolbarOptionsAndControlsFormattingOptionsTiles: (toolbarOptionTitle = null) => {
|
21
21
|
if (toolbarOptionTitle) {
|
22
|
-
return cy.get(`.icon-button-custom-format[
|
22
|
+
return cy.get(`.icon-button-custom-format[aria-label*="${toolbarOptionTitle}"]`)
|
23
23
|
} else {
|
24
24
|
return cy.get('.icon-button-custom-format')
|
25
25
|
}
|
@@ -197,8 +197,7 @@ const selectors = {
|
|
197
197
|
//Edit tab color picker popup
|
198
198
|
editTabColorPickerPopupOpacityPalette: () => cy.get('.react-colorful__last-control .react-colorful__interactive'),
|
199
199
|
editTabColorPickerPopupOpacityPicker: () => cy.get('.react-colorful__last-control .react-colorful__pointer'),
|
200
|
-
|
201
|
-
editTabColorPickerPopupCancelButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(1),
|
200
|
+
editTabColorPickerPopupCancelButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(0),
|
202
201
|
editTabColorPickerPopupOkButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(2),
|
203
202
|
|
204
203
|
//TODO: Student view: Need to remove once https://redmine.zeuslearning.com/issues/556302 is fixed
|