itemengine-cypress-automation 1.0.68 → 1.0.70
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +2 -2
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseScoringSection.js +2 -2
- package/cypress/e2e/ILC/FeedbackScale/feedbackScaleAdditionalSettingsBasic.js +8 -9
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedOptionsPartialEqualWeightsWithAlternateAnswer.js +0 -4
- package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +2 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/allOrNothingScoring.js +2 -0
- package/cypress/e2e/ILC/Highlight/{highlightBasicScoringForTextSelectionTypes.js → HighlightScoring/highlightBasicScoringForTextSelectionTypes.js} +1 -1
- package/cypress/e2e/ILC/Highlight/HighlightScoring/{manualAndNonScored.js → manuallyAndNonScored.js} +1 -1
- package/cypress/e2e/ILC/Highlight/HighlightScoring/{partialDifferentWeightsCorrectEqualToAlternatePoints.js → partialDifferentWeightsCorrectPointsEqualToAlternatePoints.js} +2 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialDifferentWeightsScoring.js +7 -2
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsCorrectPointEqualToAlternatePoints.js +2 -0
- package/cypress/e2e/ILC/Highlight/HighlightScoring/partialEqualWeightsScoring.js +6 -1
- package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsBasic.js +2 -3
- package/cypress/e2e/ILC/Highlight/highlightAdditionalSettingsMaximumNumberOfAnswers.js +0 -2
- package/cypress/e2e/ILC/Highlight/highlightEditTabScoringSection.js +4 -3
- package/cypress/e2e/ILC/HighlightImage/highlightImageAdditionalSettings.js +4 -4
- package/cypress/e2e/ILC/HighlightImage/highlightImageAdditionalSettingsBasic.js +4 -10
- package/cypress/e2e/ILC/HighlightImage/highlightImageAllOrNothingScoring.js +3 -3
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabScoring.js +9 -5
- package/cypress/e2e/ILC/HighlightImage/highlightImageManuallyAndNonScoredScoring.js +1 -1
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialDifferentWeightsScoring.js +14 -15
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialDifferentWeightsWithAlternateAnswer.js +0 -3
- package/cypress/e2e/ILC/HighlightImage/highlightImagePartialEqualWeightsScoring.js +14 -14
- package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +60 -66
- package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +84 -109
- package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +4 -18
- package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +119 -150
- package/cypress/e2e/ILC/UploadResponse/uploadResponseScoringSection.js +2 -2
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +110 -164
- package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettings.js +1 -1
- package/cypress/e2e/ILC/VideoResponse/videoResponseAdditionalSettingsBasic.js +11 -12
- package/cypress/e2e/ILC/VideoResponse/videoResponsePreviewTab.js +6 -5
- package/cypress/fixtures/theme/ilc.json +2 -1
- package/cypress/pages/audioPlayerPage.js +2 -2
- package/cypress/pages/components/additionalSettingsPanel.js +46 -14
- package/cypress/pages/components/autoScoredAdditionalSettings.js +6 -6
- package/cypress/pages/components/autoScoredPreviewBase.js +6 -8
- package/cypress/pages/components/autoScoredScoringSection.js +22 -18
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +60 -9
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +7 -7
- package/cypress/pages/components/createQuestionBasePage.js +8 -2
- package/cypress/pages/components/draggableOptionsContainer.js +2 -1
- package/cypress/pages/components/equationEditorFlyout.js +2 -1
- package/cypress/pages/components/essayResponseCommonComponents.js +10 -4
- package/cypress/pages/components/figOverImageCommonComponent.js +2 -1
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +34 -14
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -1
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +7 -7
- package/cypress/pages/components/listSortingAndOrderingBase.js +1 -1
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +10 -0
- package/cypress/pages/components/mcqQuestionCommonComponents.js +1 -1
- package/cypress/pages/components/mcqScoringComponent.js +1 -1
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +20 -18
- package/cypress/pages/components/questionInstructionsComponent.js +1 -1
- package/cypress/pages/components/scoringSectionBase.js +30 -1
- package/cypress/pages/components/setPointsPopupBase.js +2 -1
- package/cypress/pages/components/uploadImageSectionComponent.js +8 -8
- package/cypress/pages/createItemPage.js +83 -1
- package/cypress/pages/dialogBoxBase.js +3 -7
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +5 -4
- package/cypress/pages/essayResponsePage.js +1 -0
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -0
- package/cypress/pages/fillInTheGapsScoring.js +215 -317
- package/cypress/pages/highlightImagePage.js +6 -4
- package/cypress/pages/highlightPage.js +1 -2
- package/cypress/pages/index.js +4 -0
- package/cypress/pages/listMatchingPage.js +5 -4
- package/cypress/pages/listMatchingScoring.js +274 -272
- package/cypress/pages/listOrderingPage.js +23 -14
- package/cypress/pages/listSortingPage.js +7 -9
- package/cypress/pages/multipleSelectionPage.js +2 -1
- package/cypress/pages/shortTextResponsePage.js +9 -0
- package/cypress/pages/singleSelectionPage.js +1 -0
- package/cypress/pages/uploadResponsePage.js +296 -15
- package/cypress/pages/videoResponsePage.js +5 -6
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
|
-
import { uploadResponsePage
|
2
|
-
import { commonComponents } from "../../../pages/components";
|
1
|
+
import { uploadResponsePage } from "../../../pages";
|
3
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
4
|
let fileTypes = ['CSV', 'Excel', 'GIF', 'JPG', 'PDF', 'PNG', 'Powerpoint', 'Publisher', 'RTF', 'TXT', 'Word', 'XPS', 'ZIP'];
|
5
5
|
let fileTypesString = fileTypes.toString().replaceAll(',', ', ')
|
6
6
|
let infoIconTooltipText = 'Supported file formats: ' + fileTypesString + '.';
|
@@ -19,69 +19,72 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
19
19
|
});
|
20
20
|
|
21
21
|
it('In the Preview tab, the upload response area should have a Cloud icon and text \"Drag & Drop files here or browse files on your device, Google Drive or capture an image\" should be displayed', () => {
|
22
|
-
uploadResponsePage.uploadCloudIcon()
|
23
|
-
|
24
|
-
uploadResponsePage.
|
25
|
-
.verifyInnerText('Drag & Drop files here');
|
26
|
-
uploadResponsePage.fileUploadOptionsLabel()
|
27
|
-
.should('have.text', 'or browse files on your device, Google Drive or capture an image');
|
22
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.uploadCloudIcon(), 'visible');
|
23
|
+
utilities.verifyInnerText(uploadResponsePage.dragAndDropFilesText(), 'Drag & Drop files here');
|
24
|
+
uploadResponsePage.steps.verifyTextInUploadResponseArea('or browse files on your device, Google Drive or capture an image');
|
28
25
|
});
|
29
26
|
|
30
27
|
it('Computer and Google Drive icons should be displayed before link texts \'device\' and \'Google Drive\' respectively', () => {
|
31
28
|
//TODO: NEED to revisit, need to verify unicode
|
32
29
|
uploadResponsePage.deviceLink()
|
33
30
|
.verifyPseudoClassBeforeProperty('content', '""');
|
34
|
-
uploadResponsePage.googleDriveLink()
|
35
|
-
.find('svg')
|
36
|
-
.should('be.visible');
|
31
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.googleDriveLink().find('svg'), 'visible');
|
37
32
|
});
|
38
33
|
|
39
34
|
it('\'Supported file formats\' label should be displayed along with an info icon, hovering over the Supported file formats info icon a tooltip should be displayed with list of all the selected supported file types', () => {
|
40
|
-
uploadResponsePage.supportedFileFormatLabel()
|
41
|
-
|
42
|
-
uploadResponsePage.supportedFileInfoIcon()
|
43
|
-
.should('be.visible');
|
35
|
+
utilities.verifyInnerText(uploadResponsePage.supportedFileFormatLabel(), 'Supported file formats');
|
36
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.supportedFileInfoIcon(), 'visible');
|
44
37
|
uploadResponsePage.supportedFileInfoIcon()
|
45
|
-
.
|
46
|
-
uploadResponsePage.supportedFilesTooltip()
|
47
|
-
.should('have.text', infoIconTooltipText);
|
38
|
+
.verifyTooltip(infoIconTooltipText);
|
48
39
|
});
|
49
40
|
|
50
41
|
it('Accessibility of \'Supported file formats\' tooltip', { tags: 'a11y' }, () => {
|
42
|
+
utilities.triggerMouseover(uploadResponsePage.supportedFileInfoIcon());
|
51
43
|
cy.checkAccessibility(uploadResponsePage.supportedFilesTooltip());
|
52
|
-
uploadResponsePage.supportedFileInfoIcon()
|
53
|
-
.trigger('mouseout');
|
44
|
+
utilities.triggerMouseout(uploadResponsePage.supportedFileInfoIcon());
|
54
45
|
});
|
55
46
|
|
56
47
|
it('Uploaded file count should be displayed on the bottom right corner of the response section and by default it should be 0', () => {
|
57
|
-
uploadResponsePage.
|
58
|
-
.verifyInnerText('0/15 File Limit')
|
48
|
+
uploadResponsePage.steps.verifyUploadedFileLimitCount(0, 15);
|
59
49
|
});
|
60
50
|
|
61
51
|
//Failing due to https://redmine.zeuslearning.com/issues/528358
|
62
52
|
it('CSS of Preview tab', { tags: 'css' }, () => {
|
63
|
-
uploadResponsePage.uploadCloudIcon()
|
64
|
-
|
65
|
-
|
66
|
-
uploadResponsePage.dragAndDropFilesText()
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
53
|
+
utilities.verifyCSS(uploadResponsePage.uploadCloudIcon().find('path'), {
|
54
|
+
'fill': css.color.cloudIconFill
|
55
|
+
});
|
56
|
+
utilities.verifyCSS(uploadResponsePage.dragAndDropFilesText(), {
|
57
|
+
'color': css.color.text,
|
58
|
+
'font-size': css.fontSize.huge,
|
59
|
+
'font-weight': css.fontWeight.bold
|
60
|
+
});
|
61
|
+
utilities.verifyCSS(uploadResponsePage.fileUploadOptionsLabel(), {
|
62
|
+
'color': css.color.text,
|
63
|
+
'font-size': css.fontSize.heading,
|
64
|
+
'font-weight': css.fontWeight.semibold
|
65
|
+
});
|
66
|
+
utilities.verifyCSS(uploadResponsePage.supportedFileFormatLabel(), {
|
67
|
+
'color': css.color.text,
|
68
|
+
'font-size': css.fontSize.normal,
|
69
|
+
'font-weight': css.fontWeight.regular
|
70
|
+
});
|
71
|
+
utilities.verifyCSS(uploadResponsePage.supportedFileInfoIcon().find('path'), {
|
72
|
+
'fill': css.color.activeButtons
|
73
|
+
});
|
74
|
+
utilities.triggerMouseover(uploadResponsePage.supportedFileInfoIcon());
|
75
|
+
utilities.verifyCSS(uploadResponsePage.supportedFilesTooltip(), {
|
76
|
+
'color': css.color.whiteText,
|
77
|
+
'font-size': css.fontSize.extraSmall,
|
78
|
+
'font-weight': css.fontWeight.light,
|
79
|
+
'background-color': css.color.tooltipBg
|
80
|
+
});
|
81
|
+
utilities.triggerMouseout(uploadResponsePage.supportedFileInfoIcon());
|
82
|
+
utilities.verifyCSS(uploadResponsePage.uploadedFileCount(), {
|
83
|
+
'color': css.color.labels,
|
84
|
+
'font-size': css.fontSize.small,
|
85
|
+
'font-weight': css.fontWeight.regular,
|
86
|
+
'background-color': css.color.fileLimitBg
|
87
|
+
});
|
85
88
|
uploadResponsePage.deviceLink()
|
86
89
|
.verifyPseudoClassBeforeProperty('color', css.color.text);
|
87
90
|
uploadResponsePage.googleDriveLink()
|
@@ -89,7 +92,7 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
89
92
|
});
|
90
93
|
|
91
94
|
it('Accessibility of Preview tab', { tags: 'a11y' }, () => {
|
92
|
-
cy.checkAccessibility(
|
95
|
+
cy.checkAccessibility(uploadResponsePage.previewTabQuestionWrapper());
|
93
96
|
});
|
94
97
|
});
|
95
98
|
|
@@ -102,14 +105,15 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
102
105
|
|
103
106
|
it('User should be able to upload supported files in the upload section using link text \'device\' or the icon besides it and the file uploaded by the student should be listed below the upload area with the name of the file. Also, the uploaded file count should get updated in the file limit section', () => {
|
104
107
|
uploadResponsePage.steps.fileUploadAndVerify(['image.png']);
|
105
|
-
uploadResponsePage.
|
106
|
-
.verifyInnerText('1/15 File Limit');
|
108
|
+
uploadResponsePage.steps.verifyUploadedFileLimitCount(1, 15);
|
107
109
|
});
|
108
110
|
|
109
111
|
it('CSS of uploaded file wrapper contents', { tags: 'css' }, () => {
|
110
|
-
uploadResponsePage.uploadedFileLink()
|
111
|
-
.
|
112
|
-
|
112
|
+
utilities.verifyCSS(uploadResponsePage.uploadedFileLink().children(), {
|
113
|
+
'color': css.color.linkText,
|
114
|
+
'font-size': css.fontSize.default,
|
115
|
+
'font-weight': css.fontWeight.regular
|
116
|
+
});
|
113
117
|
uploadResponsePage.editDisplayTextIcon()
|
114
118
|
.verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
|
115
119
|
uploadResponsePage.addFileDescriptionIcon()
|
@@ -123,112 +127,71 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
123
127
|
});
|
124
128
|
|
125
129
|
it('\'Edit display text\', \'Add file description\', \'Delete\' icon buttons should be displayed next to the file name of the uploaded file', () => {
|
126
|
-
uploadResponsePage.
|
127
|
-
.eq(0)
|
128
|
-
.within(() => {
|
129
|
-
uploadResponsePage.editDisplayTextIcon()
|
130
|
-
.should('be.visible');
|
131
|
-
uploadResponsePage.addFileDescriptionIcon()
|
132
|
-
.should('be.visible');
|
133
|
-
uploadResponsePage.deleteButton()
|
134
|
-
.should('be.visible');
|
135
|
-
});
|
130
|
+
uploadResponsePage.steps.uploadedFileContentsPreviewTab(0);
|
136
131
|
});
|
137
132
|
|
138
133
|
it('User should also be able to upload supported files in the upload section using drag and drop feature', () => {
|
139
|
-
uploadResponsePage.
|
140
|
-
.attachFile('uploads/sample.jpg', { subjectType: 'drag-n-drop' });
|
141
|
-
uploadResponsePage.uploadedFileWrapper()
|
142
|
-
.eq(1)
|
143
|
-
.verifyInnerText('sample.jpg');
|
134
|
+
uploadResponsePage.steps.fileUploadAndVerify(['sample.jpg'], { subjectType: 'drag-n-drop' });
|
144
135
|
});
|
145
136
|
|
146
137
|
it('User should be able to upload multiple files at once and the uploaded file count should get updated in the file limit section', () => {
|
147
|
-
uploadResponsePage.
|
148
|
-
|
149
|
-
|
150
|
-
.verifyInnerText('4/15 File Limit');
|
138
|
+
uploadResponsePage.steps.uploadFile(['uploads/sample.csv', 'uploads/sample.gif']);
|
139
|
+
uploadResponsePage.steps.verifyUploadedFileLimitCount(4, 15);
|
140
|
+
|
151
141
|
});
|
152
142
|
|
153
143
|
it('When the user uploads a file that has already been added, then file upload error message \'Error: *File_name* has already been selected.\' should be displayed above the uploaded files', () => {
|
154
|
-
uploadResponsePage.
|
155
|
-
|
156
|
-
commonComponents.errorMessage()
|
157
|
-
.verifyInnerText('Error: image.png has already been selected.');
|
144
|
+
uploadResponsePage.steps.uploadFile('uploads/image.png');
|
145
|
+
utilities.verifyInnerText(uploadResponsePage.errorMessage(), 'Error: image.png has already been selected.');
|
158
146
|
});
|
159
147
|
|
160
148
|
it('CSS of file upload error message', { tags: 'css' }, () => {
|
161
|
-
|
162
|
-
|
149
|
+
utilities.verifyCSS(uploadResponsePage.errorMessage(), {
|
150
|
+
'color': css.color.errorText,
|
151
|
+
'font-size': css.fontSize.small,
|
152
|
+
'font-weight': css.fontWeight.regular
|
153
|
+
});
|
163
154
|
});
|
164
155
|
|
165
156
|
it('Accessibility of file upload error message', { tags: 'a11y' }, () => {
|
166
|
-
cy.checkAccessibility(
|
157
|
+
cy.checkAccessibility(uploadResponsePage.errorMessage());
|
167
158
|
});
|
168
159
|
|
169
160
|
uploadResponsePage.tests.verifyErrorMessageDisappear();
|
170
161
|
|
171
162
|
it('During file upload process, a progress bar, file name, file size, a cross icon to stop upload should be present, the file count should not change while the file is being uploaded, on clicking on the \'cross icon to stop upload\' button, the file should not get uploaded', () => {
|
172
|
-
uploadResponsePage.
|
173
|
-
|
174
|
-
uploadResponsePage.
|
175
|
-
|
176
|
-
uploadResponsePage.
|
177
|
-
|
178
|
-
|
179
|
-
uploadResponsePage.
|
180
|
-
|
181
|
-
uploadResponsePage.
|
182
|
-
|
183
|
-
uploadResponsePage.stopUploadingButton()
|
184
|
-
.click();
|
185
|
-
uploadResponsePage.uploadedFileWrapper()
|
186
|
-
.eq(0)
|
187
|
-
.should('exist')
|
188
|
-
.verifyInnerText('image.png');
|
189
|
-
uploadResponsePage.uploadedFilesSectionWrapper()
|
190
|
-
.should('not.have.text', 'sample1.zip')
|
191
|
-
.children()
|
192
|
-
.should('have.length', 4);
|
193
|
-
uploadResponsePage.uploadedFileCount()
|
194
|
-
.verifyInnerText('4/15 File Limit');
|
163
|
+
uploadResponsePage.steps.uploadFile('uploads/sample1.zip');
|
164
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.uploadingProgressBar(), 'visible');
|
165
|
+
utilities.verifyInnerText(uploadResponsePage.uploadingFileName(), 'sample1.zip');
|
166
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.uploadingFileName(), 'visible');
|
167
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.stopUploadingButton(), 'visible');
|
168
|
+
uploadResponsePage.steps.verifyUploadedFileLimitCount(4, 15);
|
169
|
+
uploadResponsePage.steps.stopUploadingFile();
|
170
|
+
uploadResponsePage.steps.verifyUploadedFileName('image.png', 0);
|
171
|
+
uploadResponsePage.steps.verifyFileNotExistsInUploadedFileSection('sample1.zip');
|
172
|
+
uploadResponsePage.steps.verifyUploadedFileLimitCount(4, 15);
|
173
|
+
utilities.verifyElementCount(uploadResponsePage.uploadedFileWrapper(), 4);
|
195
174
|
});
|
196
175
|
|
197
176
|
it('CSS of File upload - In progress state', { tags: 'css' }, () => {
|
198
|
-
cy.log('
|
199
|
-
uploadResponsePage.steps.
|
200
|
-
uploadResponsePage.steps.switchToPreviewTab();
|
177
|
+
cy.log('Switching to edit tab and again to preview tab')
|
178
|
+
uploadResponsePage.steps.resetQuestionPreview();
|
201
179
|
cy.log('uploading a file to verify in progress CSS')
|
202
|
-
uploadResponsePage.
|
203
|
-
.attachFile('uploads/sample2.jpg')
|
204
|
-
uploadResponsePage.uploadingFileName()
|
205
|
-
.verifyCSS(css.color.text, css.fontSize.normal, css.fontWeight.regular);
|
206
|
-
uploadResponsePage.uploadingFileSize()
|
207
|
-
.verifyCSS(css.color.text, css.fontSize.small, css.fontWeight.regular);
|
208
|
-
uploadResponsePage.stopUploadingButton()
|
209
|
-
.find('svg')
|
210
|
-
.should('have.css', 'color', css.color.successBtn);
|
211
|
-
cy.log('Re-switching to edit tab and again to preview tab')
|
212
|
-
uploadResponsePage.steps.switchToEditTab();
|
213
|
-
uploadResponsePage.steps.switchToPreviewTab();
|
180
|
+
uploadResponsePage.steps.verifyInprogressUploadFileCSS();
|
214
181
|
});
|
215
182
|
|
216
183
|
it('Accessibility of File upload - In progress state', { tags: 'a11y' }, () => {
|
217
|
-
cy.log('
|
218
|
-
uploadResponsePage.steps.
|
219
|
-
uploadResponsePage.steps.switchToPreviewTab();
|
184
|
+
cy.log('Switching to edit tab and again to preview tab')
|
185
|
+
uploadResponsePage.steps.resetQuestionPreview();
|
220
186
|
cy.log('uploading a file to verify in progress CSS')
|
221
|
-
uploadResponsePage.
|
222
|
-
.attachFile('uploads/sample2.jpg')
|
187
|
+
uploadResponsePage.steps.uploadFile('uploads/sample2.jpg')
|
223
188
|
cy.checkAccessibility(uploadResponsePage.uploadingFileName().parents('.uploading-documents'));
|
224
189
|
cy.log('Re-switching to edit tab and again to preview tab')
|
225
|
-
uploadResponsePage.steps.
|
226
|
-
uploadResponsePage.steps.switchToPreviewTab();
|
190
|
+
uploadResponsePage.steps.resetQuestionPreview();
|
227
191
|
});
|
228
192
|
|
229
193
|
it('On clicking on the file name, user should be able to download the file', () => {
|
230
|
-
uploadResponsePage.
|
231
|
-
.attachFile('uploads/image.png');
|
194
|
+
uploadResponsePage.steps.uploadFile('uploads/image.png');
|
232
195
|
cy.verifyUploadFilePreviewDownload('image.png');
|
233
196
|
});
|
234
197
|
});
|
@@ -292,30 +255,42 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
292
255
|
uploadResponsePage.steps.switchToPreviewTab();
|
293
256
|
});
|
294
257
|
|
295
|
-
it('When
|
296
|
-
uploadResponsePage.
|
297
|
-
|
298
|
-
commonComponents.errorMessage()
|
299
|
-
.verifyInnerText('Error: The file could not be uploaded. The file is 80 MB exceeding the maximum size of 75 MB.');
|
258
|
+
it('When user uploads file type which is not selected from the \'Supported file types\' accordion menu, then file upload error message - \'The file type is not supported. Please upload files with the following supported formats: *file format separated by commas*\' should be displayed', () => {
|
259
|
+
uploadResponsePage.steps.uploadFile('uploads/sample.mp4');
|
260
|
+
utilities.verifyInnerText(uploadResponsePage.errorMessage(), 'Error: The file type is not supported. Please upload files with the following supported formats: CSV, Excel, GIF, JPG, PDF, PNG, Powerpoint, Publisher, RTF, TXT, Word, XPS, ZIP.');
|
300
261
|
});
|
301
262
|
|
302
263
|
it('CSS of File Upload error', { tags: 'css' }, () => {
|
303
|
-
|
304
|
-
|
264
|
+
utilities.verifyCSS(uploadResponsePage.errorMessage(), {
|
265
|
+
'color': css.color.errorText,
|
266
|
+
'font-size': css.fontSize.small,
|
267
|
+
'font-weight': css.fontWeight.regular
|
268
|
+
});
|
305
269
|
});
|
306
270
|
|
307
271
|
//Todo: can be added to common for all error messages verifyAccessibilityOfErrorMessage
|
308
272
|
it('Accessibility of File Upload error', { tags: 'a11y' }, () => {
|
309
|
-
cy.checkAccessibility(
|
273
|
+
cy.checkAccessibility(uploadResponsePage.errorMessage());
|
310
274
|
});
|
311
275
|
|
312
276
|
uploadResponsePage.tests.verifyErrorMessageDisappear();
|
313
277
|
|
314
|
-
it('When user uploads file
|
315
|
-
uploadResponsePage.
|
316
|
-
|
317
|
-
|
318
|
-
|
278
|
+
it('When the user uploads file exceeding max file size (more than 75 MB), file upload error message - \'Error: The file could not be uploaded. The file is *File size in MB* exceeding the maximum size of 75 MB.\'. should be displayed', () => {
|
279
|
+
uploadResponsePage.steps.uploadFile('uploads/80mbFile.pdf')
|
280
|
+
utilities.verifyInnerText(uploadResponsePage.errorMessage(), 'Error: The file could not be uploaded. The file is 80 MB exceeding the maximum size of 75 MB.');
|
281
|
+
});
|
282
|
+
|
283
|
+
it('CSS of File Upload error', { tags: 'css' }, () => {
|
284
|
+
utilities.verifyCSS(uploadResponsePage.errorMessage(), {
|
285
|
+
'color': css.color.errorText,
|
286
|
+
'font-size': css.fontSize.small,
|
287
|
+
'font-weight': css.fontWeight.regular
|
288
|
+
});
|
289
|
+
});
|
290
|
+
|
291
|
+
//Todo: can be added to common for all error messages verifyAccessibilityOfErrorMessage
|
292
|
+
it('Accessibility of File Upload error', { tags: 'a11y' }, () => {
|
293
|
+
cy.checkAccessibility(uploadResponsePage.errorMessage());
|
319
294
|
});
|
320
295
|
|
321
296
|
uploadResponsePage.tests.verifyErrorMessageDisappear();
|
@@ -329,18 +304,14 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
329
304
|
|
330
305
|
it('When user modifies supported files types, then in preview tab on hovering over the Supported file formats info icon a tooltip with the modified list of selected supported file types should be displayed', () => {
|
331
306
|
cy.log('Pre-step: checking a new file type and unchecking a default selected file type')
|
332
|
-
uploadResponsePage.
|
333
|
-
|
334
|
-
uploadResponsePage.steps.
|
335
|
-
uploadResponsePage.steps.checkUncheckSupportedFileType(14, 'MP3', 'be.checked');
|
336
|
-
uploadResponsePage.supportedFileTypesCheckboxWrapper(14)
|
307
|
+
uploadResponsePage.steps.expandSupportedFileTypesAccordion();
|
308
|
+
uploadResponsePage.steps.uncheckSupportedFileTypeCheckbox(4);
|
309
|
+
uploadResponsePage.steps.checkSupportedFileTypeCheckbox(14);
|
337
310
|
cy.log('Switching to Preview tab')
|
338
|
-
uploadResponsePage.steps.switchToPreviewTab()
|
339
|
-
uploadResponsePage.supportedFileInfoIcon()
|
340
|
-
.trigger('mouseover');
|
311
|
+
uploadResponsePage.steps.switchToPreviewTab();
|
312
|
+
utilities.triggerMouseover(uploadResponsePage.supportedFileInfoIcon());
|
341
313
|
//https://redmine.zeuslearning.com/issues/533063
|
342
|
-
uploadResponsePage.supportedFilesTooltip()
|
343
|
-
.verifyInnerText('Supported file formats: Excel, GIF, JPG, MP3, PDF, PNG, Powerpoint, Publisher, RTF, TXT, Word, XPS, ZIP.');
|
314
|
+
utilities.verifyInnerText(uploadResponsePage.supportedFilesTooltip(), 'Supported file formats: Excel, GIF, JPG, MP3, PDF, PNG, Powerpoint, Publisher, RTF, TXT, Word, XPS, ZIP.');
|
344
315
|
});
|
345
316
|
|
346
317
|
it('User should be able to upload file of newly added supported file type', () => {
|
@@ -348,11 +319,9 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
348
319
|
});
|
349
320
|
|
350
321
|
it('When the user uploads file type which is now removed from supported file type, then file upload error message - \'Error: The file type is not supported. Please upload files with the following supported formats: *file format separated by commas*\' should be displayed', () => {
|
351
|
-
uploadResponsePage.
|
352
|
-
.attachFile('uploads/sample.csv');
|
322
|
+
uploadResponsePage.steps.uploadFile('uploads/sample.csv');
|
353
323
|
//https://redmine.zeuslearning.com/issues/534957
|
354
|
-
|
355
|
-
.verifyInnerText('Error: The file type is not supported. Please upload files with the following supported formats: Excel, GIF, JPG, MP3, PDF, PNG, Powerpoint, Publisher, RTF, TXT, Word, XPS, ZIP.');
|
324
|
+
utilities.verifyInnerText(uploadResponsePage.errorMessage(), 'Error: The file type is not supported. Please upload files with the following supported formats: Excel, GIF, JPG, MP3, PDF, PNG, Powerpoint, Publisher, RTF, TXT, Word, XPS, ZIP.');
|
356
325
|
});
|
357
326
|
|
358
327
|
uploadResponsePage.tests.verifyErrorMessageDisappear();
|
@@ -35,7 +35,7 @@ describe('Create question page - Upload Response: Scoring', () => {
|
|
35
35
|
uploadResponsePage.steps.switchToPreviewTab();
|
36
36
|
});
|
37
37
|
|
38
|
-
uploadResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab()
|
38
|
+
uploadResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab('Manually scored')
|
39
39
|
});
|
40
40
|
|
41
41
|
describe('Non Scored scoring type - Question creation page', () => {
|
@@ -55,6 +55,6 @@ describe('Create question page - Upload Response: Scoring', () => {
|
|
55
55
|
uploadResponsePage.steps.switchToPreviewTab();
|
56
56
|
});
|
57
57
|
|
58
|
-
uploadResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab()
|
58
|
+
uploadResponsePage.tests.verifyShowCorrectAnswerAndPointsNotDisplayedInPreviewTab('Manually scored')
|
59
59
|
});
|
60
60
|
});
|