itemengine-cypress-automation 1.0.69 → 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/package.json +1 -1
@@ -1,9 +1,7 @@
|
|
1
1
|
import { uploadResponsePage, dialogBoxBase } from "../../../pages";
|
2
2
|
import { commonComponents } from "../../../pages/components";
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
-
|
5
|
-
let fileTypesString = fileTypes.toString().replaceAll(',', ', ')
|
6
|
-
let infoIconTooltipText = 'Supported file formats: ' + fileTypesString + '.';
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
7
5
|
const css = Cypress.env('css');
|
8
6
|
|
9
7
|
describe('Create question page - Upload Response: Preview', () => {
|
@@ -19,59 +17,39 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
19
17
|
});
|
20
18
|
|
21
19
|
it('When user uploads any file without any virus, the system should scan the file for viruses and \'Scanning for viruses…\' message should be displayed along with a pre-loader', () => {
|
22
|
-
uploadResponsePage.
|
23
|
-
|
24
|
-
uploadResponsePage.uploadedFileWrapper()
|
25
|
-
.eq(0)
|
26
|
-
.within(() => {
|
27
|
-
uploadResponsePage.virusErrorMessageWrapper()
|
28
|
-
.verifyInnerText('Scanning for viruses...')
|
29
|
-
uploadResponsePage.scanningForVirusPreLoader()
|
30
|
-
.should('be.visible');
|
31
|
-
});
|
20
|
+
uploadResponsePage.steps.uploadFile('uploads/sample1.zip');
|
21
|
+
uploadResponsePage.steps.verifyScanningForVirusMessageAndPreLoader();
|
32
22
|
});
|
33
23
|
|
34
24
|
it('As long as the file is scanning for viruses, the users should not be able to download the file', () => {
|
35
|
-
uploadResponsePage.
|
36
|
-
.eq(0)
|
37
|
-
.parents('.uploaded-document-wrapper')
|
38
|
-
.should('not.have.attr', 'href');
|
25
|
+
uploadResponsePage.steps.verifyInabilityOfFileDownloadWhenVirusScanningIsInProgress();
|
39
26
|
});
|
40
27
|
|
41
28
|
it('As soon as the scanning for viruses is complete, the preloader should disappear', () => {
|
42
|
-
uploadResponsePage.scanningForVirusPreLoader()
|
43
|
-
.should('not.be.visible');
|
29
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.scanningForVirusPreLoader(), 'hidden');
|
44
30
|
});
|
45
31
|
|
46
32
|
it('When the user uploads a file containing virus \'Error: A virus was detected, please upload another file\' error message should be displayed inline with file name, the uploaded file count should increase after a virus file gets uploaded', () => {
|
47
|
-
uploadResponsePage.
|
48
|
-
|
49
|
-
uploadResponsePage.uploadedFileWrapper()
|
50
|
-
.eq(1)
|
51
|
-
.within(() => {
|
52
|
-
uploadResponsePage.virusErrorMessageWrapper()
|
53
|
-
.verifyInnerText('Error: A virus was detected, please upload another file.')
|
54
|
-
.and('be.visible');
|
55
|
-
});
|
33
|
+
uploadResponsePage.steps.uploadFile('uploads/sampleVirus.zip');
|
34
|
+
uploadResponsePage.steps.verifyVirusScanningErrorMessage();
|
56
35
|
cy.log('checking if uploaded file count increases after a virus file gets uploaded')
|
57
|
-
uploadResponsePage.
|
58
|
-
.verifyInnerText('2/15 File Limit');
|
36
|
+
uploadResponsePage.steps.verifyUploadedFileLimitCount(2, 15);
|
59
37
|
});
|
60
38
|
|
61
39
|
it('CSS of virus error message', { tags: 'css' }, () => {
|
62
40
|
uploadResponsePage.uploadedFileWrapper()
|
63
41
|
.eq(1)
|
64
42
|
.within(() => {
|
65
|
-
uploadResponsePage.virusErrorMessageWrapper()
|
66
|
-
|
43
|
+
utilities.verifyCSS(uploadResponsePage.virusErrorMessageWrapper(), {
|
44
|
+
'color': css.color.errorText,
|
45
|
+
'font-size': css.fontSize.small,
|
46
|
+
'font-weight': css.fontWeight.regular
|
47
|
+
});
|
67
48
|
});
|
68
49
|
});
|
69
50
|
|
70
51
|
it('User should not be able to download the file containing virus and the file name should be in disabled state', () => {
|
71
|
-
uploadResponsePage.
|
72
|
-
.eq(1)
|
73
|
-
.parents('.uploaded-document-wrapper')
|
74
|
-
.should('not.have.attr', 'href');
|
52
|
+
uploadResponsePage.steps.verifyInabilityOfFileDownloadWhenVirusScanningIsInProgress();
|
75
53
|
});
|
76
54
|
});
|
77
55
|
|
@@ -85,43 +63,45 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
85
63
|
});
|
86
64
|
|
87
65
|
it('On hovering over the \'Edit display text\' icon button, tooltip \'Edit display text\' should be displayed', () => {
|
88
|
-
uploadResponsePage.editDisplayTextIcon()
|
89
|
-
|
90
|
-
commonComponents.tooltipText()
|
91
|
-
.verifyInnerText('Edit display text');
|
66
|
+
utilities.hoverOverElement(uploadResponsePage.editDisplayTextIcon());
|
67
|
+
utilities.verifyInnerText(commonComponents.tooltipText(), 'Edit display text');
|
92
68
|
});
|
93
69
|
|
94
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', () => {
|
95
|
-
uploadResponsePage.
|
96
|
-
|
97
|
-
dialogBoxBase.
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
.parent()
|
104
|
-
.and('have.class', 'Mui-focused');
|
105
|
-
uploadResponsePage.acceptButton()
|
106
|
-
.verifyInnerText('Save')
|
107
|
-
.and('be.visible');
|
108
|
-
uploadResponsePage.rejectButton()
|
109
|
-
.verifyInnerText('Cancel')
|
110
|
-
.and('be.visible');
|
71
|
+
uploadResponsePage.steps.clickOnEditDisplayTextIcon();
|
72
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
73
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Display text');
|
74
|
+
uploadResponsePage.steps.verifyEditDisplayTextPopupInputFieldAndSelectedText();
|
75
|
+
utilities.verifyInnerText(uploadResponsePage.buttonAccept(), 'Save');
|
76
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.buttonAccept(), 'visible');
|
77
|
+
utilities.verifyInnerText(dialogBoxBase.buttonReject(), 'Cancel');
|
78
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.buttonReject(), 'visible');
|
111
79
|
});
|
112
80
|
|
113
81
|
it('CSS of the \'Display Text\' popup', { tags: 'css' }, () => {
|
114
|
-
dialogBoxBase.dialogBoxTitle()
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
uploadResponsePage.
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
82
|
+
utilities.verifyCSS(dialogBoxBase.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(dialogBoxBase.buttonAccept(), {
|
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(dialogBoxBase.buttonReject(), {
|
100
|
+
'color': css.color.secondaryBtn,
|
101
|
+
'font-size': css.fontSize.default,
|
102
|
+
'font-weight': css.fontWeight.semibold,
|
103
|
+
'background-color': css.color.transparent
|
104
|
+
});
|
125
105
|
});
|
126
106
|
|
127
107
|
it('Accessibility of the \'Display Text\' popup', { tags: 'a11y' }, () => {
|
@@ -129,46 +109,30 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
129
109
|
});
|
130
110
|
|
131
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', () => {
|
132
|
-
uploadResponsePage.
|
133
|
-
|
134
|
-
.should('have.attr', 'placeholder', 'Enter display text')
|
135
|
-
.and('be.visible');
|
112
|
+
uploadResponsePage.steps.clearEditDisplayTextPopupInputField();
|
113
|
+
uploadResponsePage.steps.verifyEditDisplayTextPopupInputFieldPlaceholderText();
|
136
114
|
});
|
137
115
|
|
138
116
|
it('When the user clicks on \'Save\' button, a validation error text \'Display text is required.\' should be displayed below the input field', () => {
|
139
|
-
|
140
|
-
|
141
|
-
commonComponents.errorMessage()
|
142
|
-
.verifyInnerText('Error: Display text is required.')
|
117
|
+
dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
|
118
|
+
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Display text is required.');
|
143
119
|
});
|
144
120
|
|
145
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', () => {
|
146
|
-
uploadResponsePage.
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
uploadResponsePage.acceptButton()
|
152
|
-
.click();
|
153
|
-
uploadResponsePage.uploadedFileWrapper()
|
154
|
-
.eq(0)
|
155
|
-
.verifyInnerText('imageEdited.png')
|
122
|
+
uploadResponsePage.steps.enterTextInEditDisplayTextPopupInputField('imageEdited.png');
|
123
|
+
uploadResponsePage.steps.verifyTextInEditDisplayTextPopupInputField('imageEdited.png');
|
124
|
+
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
|
125
|
+
dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
|
126
|
+
uploadResponsePage.steps.verifyUploadedFileName('imageEdited.png', 0);
|
156
127
|
});
|
157
128
|
|
158
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', () => {
|
159
130
|
cy.log('clicking on edit display text button')
|
160
|
-
uploadResponsePage.
|
161
|
-
|
162
|
-
uploadResponsePage.
|
163
|
-
|
164
|
-
|
165
|
-
.should('have.value', 'imageEdited2.png');
|
166
|
-
uploadResponsePage.rejectButton()
|
167
|
-
.click();
|
168
|
-
uploadResponsePage.uploadedFileWrapper()
|
169
|
-
.eq(0)
|
170
|
-
.verifyInnerText('imageEdited.png')
|
171
|
-
.and('not.have.text', 'imageEdited2.png');
|
131
|
+
uploadResponsePage.steps.clickOnEditDisplayTextIcon();
|
132
|
+
uploadResponsePage.steps.clearEditDisplayTextPopupInputField();
|
133
|
+
uploadResponsePage.steps.enterTextInEditDisplayTextPopupInputField('imageEdited2.png');
|
134
|
+
dialogBoxBase.steps.clickOnRejectButtonInDialogBox();
|
135
|
+
uploadResponsePage.steps.verifyUploadedFileName('imageEdited.png', 0);
|
172
136
|
});
|
173
137
|
|
174
138
|
it('If the user tries to download file after renaming, the file should get downloaded with the original name', () => {
|
@@ -186,23 +150,21 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
186
150
|
});
|
187
151
|
|
188
152
|
it('On hovering over the \'Add file description\' icon button, tooltip \'Add file description\' should be displayed', () => {
|
189
|
-
uploadResponsePage.addFileDescriptionIcon()
|
190
|
-
|
191
|
-
commonComponents.tooltipText()
|
192
|
-
.should('have.text', 'Add file description');
|
153
|
+
utilities.hoverOverElement(uploadResponsePage.addFileDescriptionIcon());
|
154
|
+
utilities.verifyInnerText(commonComponents.tooltipText(), 'Add file description');
|
193
155
|
});
|
194
156
|
|
195
157
|
it('When the user clicks on the \'Add file description\' icon button, an input area should be displayed along with a placeholder text: \'Add file description\'', () => {
|
196
|
-
uploadResponsePage.
|
197
|
-
|
198
|
-
uploadResponsePage.addFileDescriptionInput()
|
199
|
-
.should('have.attr', 'placeholder', 'Add file description')
|
200
|
-
.and('be.visible');
|
158
|
+
uploadResponsePage.steps.clickOnAddFileDescriptionIcon();
|
159
|
+
uploadResponsePage.steps.verifyAddFileDescriptionInputFieldPlaceholderText();
|
201
160
|
});
|
202
161
|
|
203
162
|
it('CSS of \'Add file description\' input field', { tags: 'css' }, () => {
|
204
|
-
uploadResponsePage.addFileDescriptionInput()
|
205
|
-
|
163
|
+
utilities.verifyCSS(uploadResponsePage.addFileDescriptionInput(), {
|
164
|
+
'color': css.color.optionsText,
|
165
|
+
'font-size': css.fontSize.default,
|
166
|
+
'font-weight': css.fontWeight.regular
|
167
|
+
});
|
206
168
|
});
|
207
169
|
|
208
170
|
it('Accessibility of \'Add file description\' input field', { tags: 'a11y' }, () => {
|
@@ -210,16 +172,13 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
210
172
|
});
|
211
173
|
|
212
174
|
it('User should be able to add description text for uploaded file', () => {
|
213
|
-
uploadResponsePage.
|
214
|
-
|
215
|
-
.should('have.value', 'This is an image');
|
175
|
+
uploadResponsePage.steps.enterTextInAddFileDescriptionInputField('This is an image');
|
176
|
+
uploadResponsePage.steps.verifyTextInAddFileDescriptionInputField('This is an image');
|
216
177
|
});
|
217
178
|
|
218
179
|
it('When user again clicks on the \'Add file description\' icon button, the \'Add file description\' input field section should get hidden', () => {
|
219
|
-
uploadResponsePage.
|
220
|
-
|
221
|
-
uploadResponsePage.addFileDescriptionInput()
|
222
|
-
.should('not.exist');
|
180
|
+
uploadResponsePage.steps.clickOnAddFileDescriptionIcon();
|
181
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.addFileDescriptionInput(), 'notExist');
|
223
182
|
});
|
224
183
|
});
|
225
184
|
|
@@ -232,40 +191,40 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
232
191
|
uploadResponsePage.steps.fileUploadAndVerify(['image.png']);
|
233
192
|
});
|
234
193
|
|
235
|
-
it('On hovering over the \'Delete\' icon button, tooltip \'Delete\' should be displayed', () => {
|
236
|
-
uploadResponsePage.deleteButton()
|
237
|
-
|
238
|
-
|
239
|
-
|
194
|
+
it('On hovering over the \'Delete\' icon button, tooltip \'Delete\' should be displayed and the tooltip should disappear if focus is removed from the \'Delete\' icon button', () => {
|
195
|
+
utilities.hoverOverElement(uploadResponsePage.deleteButton())
|
196
|
+
utilities.verifyInnerText(commonComponents.tooltipText(), 'Delete');
|
197
|
+
utilities.hoverAwayFromElement();
|
198
|
+
utilities.verifyElementVisibilityState(commonComponents.tooltipText(), 'notExist');
|
240
199
|
});
|
241
200
|
|
242
201
|
it('When the user clicks on the \'Delete\' icon button, then \'Delete file\' popup with label \'Delete file\' and message \'Are you sure you want to delete this file?\' should be displayed and \'Delete File\' and \'Cancel\' buttons should be displayed', () => {
|
243
|
-
uploadResponsePage.
|
244
|
-
|
245
|
-
dialogBoxBase.
|
246
|
-
|
247
|
-
dialogBoxBase.
|
248
|
-
|
249
|
-
dialogBoxBase.dialogBoxContent()
|
250
|
-
.should('contain', 'Are you sure you want to delete this file?');
|
251
|
-
uploadResponsePage.rejectButton()
|
252
|
-
.should('be.visible')
|
253
|
-
.verifyInnerText('Cancel');
|
254
|
-
uploadResponsePage.acceptButton()
|
255
|
-
.should('be.visible')
|
256
|
-
.verifyInnerText('Delete file');
|
202
|
+
uploadResponsePage.steps.deleteFile();
|
203
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
204
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Delete file');
|
205
|
+
utilities.verifyInnerText(uploadResponsePage.deletePopupContent(), 'Are you sure you want to delete this file?');
|
206
|
+
utilities.verifyInnerText(dialogBoxBase.buttonReject(), 'Cancel');
|
207
|
+
utilities.verifyInnerText(dialogBoxBase.buttonAccept(), 'Delete file');
|
257
208
|
});
|
258
209
|
|
259
210
|
it('CSS of the \'Delete file\' popup', { tags: 'css' }, () => {
|
260
|
-
dialogBoxBase.dialogBoxTitle()
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
211
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle().find('span'), {
|
212
|
+
'color': css.color.questionHeading,
|
213
|
+
'font-size': css.fontSize.heading,
|
214
|
+
'font-weight': css.fontWeight.bold
|
215
|
+
});
|
216
|
+
utilities.verifyCSS(dialogBoxBase.buttonReject(), {
|
217
|
+
'color': css.color.secondaryBtn,
|
218
|
+
'font-size': css.fontSize.default,
|
219
|
+
'font-weight': css.fontWeight.semibold,
|
220
|
+
'background-color': css.color.transparent
|
221
|
+
});
|
222
|
+
utilities.verifyCSS(dialogBoxBase.buttonAccept(), {
|
223
|
+
'color': css.color.primaryBtn,
|
224
|
+
'font-size': css.fontSize.default,
|
225
|
+
'font-weight': css.fontWeight.semibold,
|
226
|
+
'background-color': css.color.deleteBtn
|
227
|
+
});
|
269
228
|
});
|
270
229
|
|
271
230
|
it('Accessibility of the \'Delete file\' popup', { tags: 'a11y' }, () => {
|
@@ -274,31 +233,18 @@ describe('Create question page - Upload Response: Preview', () => {
|
|
274
233
|
|
275
234
|
it('When the user clicks on the \'Cancel\' button, then \'Delete File\' popup should close and file should not get deleted', () => {
|
276
235
|
cy.log('Clicking on Delete icon for popup to appear')
|
277
|
-
uploadResponsePage.
|
278
|
-
.click();
|
236
|
+
uploadResponsePage.steps.deleteFile();
|
279
237
|
cy.log('Clicking on \'Cancel\' button')
|
280
|
-
|
281
|
-
|
282
|
-
dialogBoxBase.dialogBox()
|
283
|
-
.should('not.exist');
|
284
|
-
uploadResponsePage.uploadedFileWrapper()
|
285
|
-
.eq(0)
|
286
|
-
.should('exist');
|
238
|
+
dialogBoxBase.steps.clickOnRejectButtonInDialogBox();
|
239
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.uploadedFileWrapper(), 'exist');
|
287
240
|
});
|
288
241
|
|
289
242
|
it('When the user clicks on the \'Delete File\' button, the delete confirmation dialog box should disappear and the uploaded file should get deleted', () => {
|
290
|
-
uploadResponsePage.
|
291
|
-
|
292
|
-
uploadResponsePage.
|
293
|
-
|
294
|
-
|
295
|
-
.should('not.exist');
|
296
|
-
uploadResponsePage.uploadedFilesSectionWrapper()
|
297
|
-
.should('not.have.text', 'image.png')
|
298
|
-
.children()
|
299
|
-
.should('have.length', 0);
|
300
|
-
uploadResponsePage.uploadedFileCount()
|
301
|
-
.verifyInnerText('0/15 File Limit');
|
243
|
+
uploadResponsePage.steps.deleteFile();
|
244
|
+
dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
|
245
|
+
uploadResponsePage.steps.verifyFileNotExistsInUploadedFileSection('image.png');
|
246
|
+
utilities.verifyElementVisibilityState(uploadResponsePage.uploadedFileWrapper(), 'notExist');
|
247
|
+
uploadResponsePage.steps.verifyUploadedFileLimitCount(0, 15);
|
302
248
|
});
|
303
249
|
});
|
304
250
|
});
|
@@ -2,7 +2,7 @@ import { videoResponsePage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
const css = Cypress.env('css');
|
5
|
-
const fontSizeDropdownOptions = ['
|
5
|
+
const fontSizeDropdownOptions = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
|
6
6
|
const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
|
7
7
|
|
8
8
|
describe('Create item page - Video response: Additional settings', () => {
|
@@ -2,8 +2,7 @@ import { videoResponsePage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
const css = Cypress.env('css');
|
5
|
-
const
|
6
|
-
const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
|
5
|
+
const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
|
7
6
|
|
8
7
|
describe('Create item page - Video response: Additional settings', () => {
|
9
8
|
before(() => {
|
@@ -62,17 +61,17 @@ describe('Create item page - Video response: Additional settings', () => {
|
|
62
61
|
videoResponsePage.steps.expandAdditonalSettings();
|
63
62
|
});
|
64
63
|
|
65
|
-
|
66
|
-
it(`When the user selects
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
64
|
+
Object.keys(fontSizes).forEach((option, fontsIndex) => {
|
65
|
+
it(`When the user selects '${option}' option from the Font Size dropdown, then font size of the preview content should be changed to ${fontSizes[option]} in the preview tab`, () => {
|
66
|
+
videoResponsePage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
|
67
|
+
utilities.verifyInnerText(videoResponsePage.fontSizeDropdown(), option);
|
68
|
+
videoResponsePage.steps.switchToPreviewTab();
|
69
|
+
utilities.verifyCSS(videoResponsePage.questionInstructionsText(), {
|
70
|
+
'font-size': fontSizes[option]
|
71
|
+
});
|
72
|
+
videoResponsePage.steps.switchToEditTab();
|
74
73
|
});
|
75
|
-
|
74
|
+
});
|
76
75
|
});
|
77
76
|
|
78
77
|
describe('Video response: Details section', () => {
|
@@ -218,7 +218,8 @@ describe('Create item page - Video response: Preview tab - default state, record
|
|
218
218
|
videoResponsePage.steps.stopAndVerifySavingAndRecordingLength();
|
219
219
|
});
|
220
220
|
|
221
|
-
|
221
|
+
//Adding skip here since unable to check the recording status text (Disappears too fast)
|
222
|
+
it.skip('CSS of \'Preview\' section if recording is saved', { tags: 'css' }, () => {
|
222
223
|
videoResponsePage.steps.resetQuestionPreview();
|
223
224
|
videoResponsePage.steps.recordAndSaveVideo(3000);
|
224
225
|
utilities.verifyCSS(videoResponsePage.recordingStatusText(), {
|
@@ -448,7 +449,7 @@ describe('Create item page - Video response: Preview tab - default state, record
|
|
448
449
|
|
449
450
|
it('CSS of volume control section', { tags: 'css' }, () => {
|
450
451
|
utilities.verifyCSS(videoResponsePage.volumeControlSlider(), {
|
451
|
-
'background': `${css.color.transparent} linear-gradient(
|
452
|
+
'background': `${css.color.transparent} linear-gradient(to right, ${css.color.progressBarElapsedFill} 0%, ${css.color.progressBarElapsedFill} 100%, ${css.color.progressBarRemainingFill} 0%, ${css.color.progressBarRemainingFill} 100%) repeat scroll 0% 0% / auto padding-box border-box`
|
452
453
|
});
|
453
454
|
utilities.verifyCSS(videoResponsePage.volumeControlButton().find('g path'), {
|
454
455
|
'fill': css.color.secondaryBtnBg,
|
@@ -468,7 +469,7 @@ describe('Create item page - Video response: Preview tab - default state, record
|
|
468
469
|
|
469
470
|
it('CSS of volume control section in muted state', { tags: 'css' }, () => {
|
470
471
|
utilities.verifyCSS(videoResponsePage.volumeControlSlider(), {
|
471
|
-
'background': `${css.color.transparent} linear-gradient(
|
472
|
+
'background': `${css.color.transparent} linear-gradient(to right, ${css.color.progressBarElapsedFill} 0%, ${css.color.progressBarElapsedFill} 0%, ${css.color.progressBarRemainingFill} -100%, ${css.color.progressBarRemainingFill} 100%) repeat scroll 0% 0% / auto padding-box border-box`
|
472
473
|
});
|
473
474
|
utilities.verifyCSS(videoResponsePage.volumeControlButton().find('g g path'), {
|
474
475
|
'fill': css.color.secondaryBtnBg,
|
@@ -517,12 +518,12 @@ describe('Create item page - Video response: Preview tab - default state, record
|
|
517
518
|
utilities.verifyCSS(videoResponsePage.playbackSpeedOption().eq(0), {
|
518
519
|
'color': css.color.liText,
|
519
520
|
'background-color': css.color.liTextSelectedBg,
|
520
|
-
'font-size': css.fontSize.
|
521
|
+
'font-size': css.fontSize.small
|
521
522
|
});
|
522
523
|
utilities.verifyCSS(videoResponsePage.playbackSpeedOption().eq(1), {
|
523
524
|
'color': css.color.liText,
|
524
525
|
'background-color': css.color.transparent,
|
525
|
-
'font-size': css.fontSize.
|
526
|
+
'font-size': css.fontSize.small
|
526
527
|
});
|
527
528
|
});
|
528
529
|
|