itemengine-cypress-automation 1.0.115 → 1.0.117
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/{barRecorderStyle.js → barRecorderStyle.smoke.js} +183 -179
- package/cypress/e2e/ILC/AudioResponseNew/{compactRecorderStyle.js → compactRecorderStyle.smoke.js} +179 -177
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +2 -1
- package/cypress/e2e/ILC/AudioResponseNew/{standardRecorderStyle.js → standardRecorderStyle.smoke.js} +197 -195
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +3 -3
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +5 -5
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +17 -17
- package/cypress/e2e/ILC/DrawingResponse/{drawingResponsePreviewTabContents.js → drawingResponsePreviewTabContents.smoke.js} +3 -3
- package/cypress/e2e/ILC/EssayResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +3 -5
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsBasic.js +3 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +3 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +3 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabScoringSection.js +276 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +73 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingPenaltyScoring.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/conditionalCheckboxScoring.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +2 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +1 -1
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/pages/audioResponsePage.js +13 -6
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +0 -27
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +2 -2
- package/cypress/pages/components/commonComponents.js +1 -1
- package/cypress/pages/components/figOverImageCanvasComponent.js +1 -1
- package/cypress/pages/components/playbackControlsBaseComponent.js +3 -1
- package/cypress/pages/components/scoringSectionBaseEditTab.js +0 -9
- package/cypress/pages/drawingResponsePage.js +2 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +14 -16
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +112 -3
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -1
- package/cypress/pages/readingRulerPage.js +1 -1
- package/cypress/pages/shortTextResponsePage.js +8 -8
- package/package.json +2 -2
- package/scripts/sorry-cypress.mjs +1 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
package/cypress/e2e/ILC/AudioResponseNew/{compactRecorderStyle.js → compactRecorderStyle.smoke.js}
RENAMED
@@ -3,13 +3,14 @@ import { audioResponsePage } from "../../../pages/audioResponsePage";
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
5
5
|
const css = Cypress.env('css');
|
6
|
+
const grepTags = Cypress.env('grepTags');
|
6
7
|
|
7
8
|
describe('Preview of Audio response for compact audio recorder style', () => {
|
8
9
|
before(() => {
|
9
10
|
cy.loginAs('admin');
|
10
11
|
});
|
11
12
|
|
12
|
-
describe('Preview of Compact audio recorder style', () => {
|
13
|
+
describe('Preview of Compact audio recorder style', { tags: 'smoke' }, () => {
|
13
14
|
abortEarlySetup();
|
14
15
|
before(() => {
|
15
16
|
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
@@ -21,8 +22,8 @@ describe('Preview of Audio response for compact audio recorder style', () => {
|
|
21
22
|
it('If user selects \'Compact\' option from \'Audio recorder style\' toggle buttons, then \'Record\' button and \'Click the button to start recording...\' help text should be displayed in the preview tab', () => {
|
22
23
|
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewRecordButton(), 'visible');
|
23
24
|
utilities.verifyInnerText(audioResponsePage.compactPreviewRecordButton(), 'Record');
|
24
|
-
utilities.verifyInnerText(audioResponsePage.
|
25
|
-
utilities.verifyElementVisibilityState(audioResponsePage.
|
25
|
+
utilities.verifyInnerText(audioResponsePage.compactPreviewRecordingHelpText(), 'Click the button to start recording...');
|
26
|
+
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewRecordingHelpText(), 'visible');
|
26
27
|
});
|
27
28
|
|
28
29
|
it('CSS of Preview section', { tags: 'css' }, () => {
|
@@ -35,7 +36,7 @@ describe('Preview of Audio response for compact audio recorder style', () => {
|
|
35
36
|
utilities.verifyCSS(audioResponsePage.compactPreviewRecordButton().find('svg'), {
|
36
37
|
'fill': css.color.defaultBackground
|
37
38
|
});
|
38
|
-
utilities.verifyCSS(audioResponsePage.
|
39
|
+
utilities.verifyCSS(audioResponsePage.compactPreviewRecordingHelpText(), {
|
39
40
|
'color': css.color.text,
|
40
41
|
'font-size': css.fontSize.normal,
|
41
42
|
'font-weight': css.fontWeight.regular
|
@@ -49,14 +50,14 @@ describe('Preview of Audio response for compact audio recorder style', () => {
|
|
49
50
|
it('When the user clicks on the \'Record\' button, a countdown should begin and help text "Preparing to record" should be displayed. The recording should start, Mic icon, \'Stop\' and \'Pause\' buttons should be displayed. Total recording time should be displayed. \'Recording...\' help text, volume meter, timer should be displayed. User should be able to view the duration of their recorded speech in minutes, displayed as \'(min:secs / min:sec)\'. The volume meter should also detect the sound levels during recording', () => {
|
50
51
|
audioResponsePage.steps.startRecordingCompactPreview();
|
51
52
|
utilities.verifyElementVisibilityState(audioResponsePage.startRecordingCountDown(), 'visible');
|
52
|
-
utilities.verifyInnerText(audioResponsePage.
|
53
|
+
utilities.verifyInnerText(audioResponsePage.compactPreviewRecordingStatusText(), 'Preparing to record');
|
53
54
|
utilities.verifyElementVisibilityState(audioResponsePage.recordingMicIcon(), 'visible');
|
54
55
|
utilities.verifyElementVisibilityState(audioResponsePage.micGlowAnimation(), 'visible');
|
55
56
|
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewStopRecordingButton(), 'visible');
|
56
57
|
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPauseRecordingButton(), 'visible');
|
57
58
|
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewRecordButton(), 'notExist');
|
58
59
|
audioResponsePage.steps.waitForRecordingToStartCompactPreview();
|
59
|
-
utilities.verifyInnerText(audioResponsePage.
|
60
|
+
utilities.verifyInnerText(audioResponsePage.compactPreviewRecordingStatusText(), 'Recording...')
|
60
61
|
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewVolumeMeter(), 'visible');
|
61
62
|
cy.log('Waiting 2 seconds to check updated timer');
|
62
63
|
audioResponsePage.steps.addWaitToRecordAudio(2000);
|
@@ -75,7 +76,7 @@ describe('Preview of Audio response for compact audio recorder style', () => {
|
|
75
76
|
'font-size': css.fontSize.heading,
|
76
77
|
'font-weight': css.fontWeight.bold
|
77
78
|
});
|
78
|
-
utilities.verifyCSS(audioResponsePage.
|
79
|
+
utilities.verifyCSS(audioResponsePage.compactPreviewRecordingStatusText(), {
|
79
80
|
'color': css.color.text,
|
80
81
|
'font-size': css.fontSize.normal,
|
81
82
|
'font-weight': css.fontWeight.regular
|
@@ -108,11 +109,11 @@ describe('Preview of Audio response for compact audio recorder style', () => {
|
|
108
109
|
audioResponsePage.steps.resetQuestionPreview();
|
109
110
|
audioResponsePage.steps.startRecordingCompactPreview();
|
110
111
|
audioResponsePage.steps.waitForRecordingToStartCompactPreview();
|
111
|
-
utilities.verifyInnerText(audioResponsePage.
|
112
|
+
utilities.verifyInnerText(audioResponsePage.compactPreviewRecordingStatusText(), 'Recording...')
|
112
113
|
audioResponsePage.steps.addWaitToRecordAudio(4000);
|
113
114
|
audioResponsePage.steps.pauseRecordingCompactPreview();
|
114
115
|
audioResponsePage.steps.verifyRecordingTimeCompactPreview('00:05', '15:00');
|
115
|
-
utilities.verifyInnerText(audioResponsePage.
|
116
|
+
utilities.verifyInnerText(audioResponsePage.compactPreviewRecordingStatusText(), 'Recording paused');
|
116
117
|
utilities.verifyInnerText(audioResponsePage.compactPreviewVolumeMeter(), '0dB');
|
117
118
|
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewResumeRecordingButton(), 'visible');
|
118
119
|
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewStopRecordingButton(), 'visible');
|
@@ -128,7 +129,7 @@ describe('Preview of Audio response for compact audio recorder style', () => {
|
|
128
129
|
utilities.verifyCSS(audioResponsePage.compactPreviewResumeRecordingButton().find('svg'), {
|
129
130
|
'fill': css.color.defaultBackground
|
130
131
|
});
|
131
|
-
utilities.verifyCSS(audioResponsePage.
|
132
|
+
utilities.verifyCSS(audioResponsePage.compactPreviewRecordingStatusText(), {
|
132
133
|
'color': css.color.text,
|
133
134
|
'font-size': css.fontSize.normal,
|
134
135
|
'font-weight': css.fontWeight.regular
|
@@ -143,7 +144,7 @@ describe('Preview of Audio response for compact audio recorder style', () => {
|
|
143
144
|
audioResponsePage.steps.resumeRecordingCompactPreview();
|
144
145
|
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewResumeRecordingButton(), 'notExist');
|
145
146
|
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPauseRecordingButton(), 'visible');
|
146
|
-
utilities.verifyInnerText(audioResponsePage.
|
147
|
+
utilities.verifyInnerText(audioResponsePage.compactPreviewRecordingStatusText(), 'Recording...')
|
147
148
|
audioResponsePage.steps.addWaitToRecordAudio(1000);
|
148
149
|
audioResponsePage.steps.verifyRecordingLengthAfterResumingCompactPreview();
|
149
150
|
});
|
@@ -173,7 +174,7 @@ describe('Preview of Audio response for compact audio recorder style', () => {
|
|
173
174
|
audioResponsePage.steps.addWaitToRecordAudio(1000);
|
174
175
|
cy.log('Waiting for 1 second pausing the recording and then clicking Stop')
|
175
176
|
audioResponsePage.steps.stopRecordingCompactPreview();
|
176
|
-
utilities.verifyCSS(audioResponsePage.
|
177
|
+
utilities.verifyCSS(audioResponsePage.compactPreviewRecordingStatusText(), {
|
177
178
|
'color': css.color.text,
|
178
179
|
'font-size': css.fontSize.normal,
|
179
180
|
'font-weight': css.fontWeight.regular
|
@@ -198,7 +199,7 @@ describe('Preview of Audio response for compact audio recorder style', () => {
|
|
198
199
|
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPlaybackPlayButton(), 'visible');
|
199
200
|
});
|
200
201
|
|
201
|
-
it('When recording is inprogress, recording should stop at recording length and \'Stop\' button should get replaced with Retake button. Playback button should be displayed in enabled state. \Your response has been recorded\' help message should be displayed in preview. Overlay should not be displayed in player', () => {
|
202
|
+
it('When recording is inprogress, recording should stop at maximum recording length and \'Stop\' button should get replaced with Retake button. Playback button should be displayed in enabled state. \Your response has been recorded\' help message should be displayed in preview. Overlay should not be displayed in player', () => {
|
202
203
|
cy.log('Pre-step: Switch to edit tab and set maximum recording length to 10 secs')
|
203
204
|
audioResponsePage.steps.switchToEditTab();
|
204
205
|
audioResponsePage.steps.setMaximumRecorderLength(10);
|
@@ -227,7 +228,7 @@ describe('Preview of Audio response for compact audio recorder style', () => {
|
|
227
228
|
});
|
228
229
|
});
|
229
230
|
|
230
|
-
describe('Playback player : Default state', () => {
|
231
|
+
describe('Playback player : Default state', { tags: 'smoke' }, () => {
|
231
232
|
abortEarlySetup();
|
232
233
|
before(() => {
|
233
234
|
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
@@ -290,193 +291,194 @@ describe('Preview of Audio response for compact audio recorder style', () => {
|
|
290
291
|
});
|
291
292
|
});
|
292
293
|
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
it('When the user clicks on \'Play\' button, then the audio should start playing. Timer should display the amount of audio that has been played and the total audio length in (mm:ss)/(mm:ss) format.', () => {
|
306
|
-
audioResponsePage.steps.startPlaybackCompactPreview();
|
307
|
-
audioResponsePage.steps.waitForPlaybackToBeginCompactPreview();
|
308
|
-
audioResponsePage.steps.verifyPlaybackTimeCompactPreview('00:03', '00:10');
|
309
|
-
});
|
310
|
-
|
311
|
-
it('CSS of \'Preview\' section if playback is initiated', { tags: 'css' }, () => {
|
312
|
-
utilities.verifyCSS(audioResponsePage.compactPreviewPlaybackTime(), {
|
313
|
-
'color': css.color.liText,
|
314
|
-
'font-size': css.fontSize.heading,
|
315
|
-
'font-weight': css.fontWeight.bold
|
316
|
-
});
|
317
|
-
utilities.verifyCSS(audioResponsePage.compactPreviewPausePlaybackButton(), {
|
318
|
-
'background-color': css.color.secondaryBtnBg,
|
319
|
-
'color': css.color.secondaryBtn,
|
320
|
-
'font-size': css.fontSize.default,
|
321
|
-
'font-weight': css.fontWeight.semibold
|
322
|
-
});
|
323
|
-
utilities.verifyCSS(audioResponsePage.compactPreviewPausePlaybackButton().find('svg path'), {
|
324
|
-
'fill': css.color.secondaryBtn
|
294
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
295
|
+
//Note: Need to add cases of seeking using waveform
|
296
|
+
describe('Playback player : Play, pause and seek', () => {
|
297
|
+
let actualAudioSeekedInPercent = 50
|
298
|
+
abortEarlySetup();
|
299
|
+
before(() => {
|
300
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
301
|
+
cy.barsPreLoaderWait();
|
302
|
+
audioResponsePage.steps.selectAudioRecorderStyle('Compact');
|
303
|
+
audioResponsePage.steps.switchToPreviewTab();
|
304
|
+
audioResponsePage.steps.recordAndSaveAudioCompactPreview(10000);
|
325
305
|
});
|
326
|
-
utilities.verifyCSS(audioResponsePage.compactPreviewRetakeButton(), {
|
327
|
-
'background-color': css.color.recordingIcon,
|
328
|
-
'color': css.color.whiteText,
|
329
|
-
'font-size': css.fontSize.default,
|
330
|
-
'font-weight': css.fontWeight.semibold
|
331
|
-
});
|
332
|
-
utilities.verifyCSS(audioResponsePage.compactPreviewRetakeButton().find('svg path'), {
|
333
|
-
'fill': css.color.defaultBackground
|
334
|
-
});
|
335
|
-
});
|
336
306
|
|
337
|
-
|
338
|
-
|
339
|
-
|
307
|
+
it('When the user clicks on \'Play\' button, then the audio should start playing. Timer should display the amount of audio that has been played and the total audio length in (mm:ss)/(mm:ss) format.', () => {
|
308
|
+
audioResponsePage.steps.startPlaybackCompactPreview();
|
309
|
+
audioResponsePage.steps.waitForPlaybackToBeginCompactPreview();
|
310
|
+
audioResponsePage.steps.verifyPlaybackTimeCompactPreview('00:03', '00:10');
|
311
|
+
});
|
340
312
|
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
313
|
+
it('CSS of \'Preview\' section if playback is initiated', { tags: 'css' }, () => {
|
314
|
+
utilities.verifyCSS(audioResponsePage.compactPreviewPlaybackTime(), {
|
315
|
+
'color': css.color.liText,
|
316
|
+
'font-size': css.fontSize.heading,
|
317
|
+
'font-weight': css.fontWeight.bold
|
318
|
+
});
|
319
|
+
utilities.verifyCSS(audioResponsePage.compactPreviewPausePlaybackButton(), {
|
320
|
+
'background-color': css.color.secondaryBtnBg,
|
321
|
+
'color': css.color.secondaryBtn,
|
322
|
+
'font-size': css.fontSize.default,
|
323
|
+
'font-weight': css.fontWeight.semibold
|
324
|
+
});
|
325
|
+
utilities.verifyCSS(audioResponsePage.compactPreviewPausePlaybackButton().find('svg path'), {
|
326
|
+
'fill': css.color.secondaryBtn
|
327
|
+
});
|
328
|
+
utilities.verifyCSS(audioResponsePage.compactPreviewRetakeButton(), {
|
329
|
+
'background-color': css.color.recordingIcon,
|
330
|
+
'color': css.color.whiteText,
|
331
|
+
'font-size': css.fontSize.default,
|
332
|
+
'font-weight': css.fontWeight.semibold
|
333
|
+
});
|
334
|
+
utilities.verifyCSS(audioResponsePage.compactPreviewRetakeButton().find('svg path'), {
|
335
|
+
'fill': css.color.defaultBackground
|
336
|
+
});
|
337
|
+
});
|
352
338
|
|
353
|
-
|
354
|
-
|
355
|
-
'background-color': css.color.secondaryBtnBg,
|
356
|
-
'color': css.color.secondaryBtn,
|
357
|
-
'font-size': css.fontSize.default,
|
358
|
-
'font-weight': css.fontWeight.semibold
|
339
|
+
it('Accessibility of \'Preview\' section if playback is initiated', { tags: 'a11y' }, () => {
|
340
|
+
cy.checkAccessibility(audioResponsePage.previewTabQuestionWrapper());
|
359
341
|
});
|
360
|
-
|
361
|
-
|
342
|
+
|
343
|
+
it('When the audio player is in playback state and the user clicks on \'Pause\' button, then playback should get paused. Progress bar and timer should not update further and the \'Pause\' button should get replaced with \'Play\' button', () => {
|
344
|
+
audioResponsePage.steps.resetQuestionPreview();
|
345
|
+
audioResponsePage.steps.recordAndSaveAudioCompactPreview(10000);
|
346
|
+
audioResponsePage.steps.startPlaybackCompactPreview();
|
347
|
+
audioResponsePage.steps.waitForPlaybackToBeginCompactPreview();
|
348
|
+
audioResponsePage.steps.verifyPlaybackTimeCompactPreview('00:05', '00:10');
|
349
|
+
audioResponsePage.steps.pauseAndVerifyProgressBarSliderPosition();
|
350
|
+
audioResponsePage.steps.verifyPlaybackTimeCompactPreview('00:05', '00:10');
|
351
|
+
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPlayPlaybackButton(), 'visible');
|
352
|
+
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPausePlaybackButton(), 'notExist');
|
362
353
|
});
|
363
|
-
});
|
364
354
|
|
365
|
-
|
366
|
-
|
367
|
-
|
355
|
+
it('CSS of \'Preview\' section if playback is paused', { tags: 'css' }, () => {
|
356
|
+
utilities.verifyCSS(audioResponsePage.compactPreviewPlayPlaybackButton(), {
|
357
|
+
'background-color': css.color.secondaryBtnBg,
|
358
|
+
'color': css.color.secondaryBtn,
|
359
|
+
'font-size': css.fontSize.default,
|
360
|
+
'font-weight': css.fontWeight.semibold
|
361
|
+
});
|
362
|
+
utilities.verifyCSS(audioResponsePage.compactPreviewPlayPlaybackButton().find('svg path'), {
|
363
|
+
'stroke': css.color.secondaryBtnActive
|
364
|
+
});
|
365
|
+
});
|
368
366
|
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPlayPlaybackButton(), 'notExist');
|
373
|
-
});
|
367
|
+
it('Accessibility of \'Preview\' section if if playback is paused', { tags: 'a11y' }, () => {
|
368
|
+
cy.checkAccessibility(audioResponsePage.previewTabQuestionWrapper());
|
369
|
+
});
|
374
370
|
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
371
|
+
it('When audio player is in paused state and user clicks on \'Play\' button, then playback should get resumed and \'Play\' button should get replaced with \'Pause\' button.', () => {
|
372
|
+
audioResponsePage.steps.startPlaybackCompactPreview();
|
373
|
+
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPausePlaybackButton(), 'visible');
|
374
|
+
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPlayPlaybackButton(), 'notExist');
|
375
|
+
});
|
380
376
|
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
audioResponsePage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
|
387
|
-
});
|
377
|
+
it('When the user seeks the progress bar slider while the audio is playing, then the audio should continue to play from the position where the slider is seeked', () => {
|
378
|
+
audioResponsePage.steps.seekProgressBarSliderToCenter();
|
379
|
+
audioResponsePage.steps.addWaitToPlayAudio(1000);
|
380
|
+
audioResponsePage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
|
381
|
+
});
|
388
382
|
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
383
|
+
it('When the user seeks the progress bar slider while the audio is paused, then the audio playback should be in paused state and on playing the audio, then the audio should play from the position where the slider is seeked', () => {
|
384
|
+
audioResponsePage.steps.pausePlaybackCompactPreview();
|
385
|
+
audioResponsePage.steps.seekProgressBarSliderToCenter();
|
386
|
+
audioResponsePage.steps.startPlaybackCompactPreview();
|
387
|
+
audioResponsePage.steps.addWaitToPlayAudio(5000);
|
388
|
+
audioResponsePage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
|
389
|
+
});
|
395
390
|
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
391
|
+
it('When the audio playback is completed, the \'Pause\' button should get replaced with \'Play\' button', () => {
|
392
|
+
audioResponsePage.steps.verifyPlaybackTimeCompactPreview('00:10', '00:10');
|
393
|
+
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPlayPlaybackButton(), 'visible');
|
394
|
+
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPausePlaybackButton(), 'notExist');
|
395
|
+
audioResponsePage.steps.verifyProgressBarSliderPosition(99);
|
400
396
|
});
|
401
|
-
});
|
402
|
-
});
|
403
397
|
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
audioResponsePage.steps.switchToPreviewTab();
|
411
|
-
audioResponsePage.steps.recordAndSaveAudioCompactPreview(10000);
|
398
|
+
it('CSS of progress bar in hover state', { tags: 'css' }, () => {
|
399
|
+
audioResponsePage.steps.hoverOnProgressBarSlider();
|
400
|
+
utilities.verifyCSS(audioResponsePage.progressBarSlider().parents('span[class*="MuiSlider-thumb"]'), {
|
401
|
+
'box-shadow': `${css.color.progressBarSliderHoverBackground} 0px 0px 0px 8px`
|
402
|
+
});
|
403
|
+
});
|
412
404
|
});
|
413
405
|
|
414
|
-
|
415
|
-
|
406
|
+
describe('Playback player : Volume control', () => {
|
407
|
+
abortEarlySetup();
|
408
|
+
before(() => {
|
409
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
410
|
+
cy.barsPreLoaderWait();
|
411
|
+
audioResponsePage.steps.selectAudioRecorderStyle('Compact');
|
412
|
+
audioResponsePage.steps.switchToPreviewTab();
|
413
|
+
audioResponsePage.steps.recordAndSaveAudioCompactPreview(10000);
|
414
|
+
});
|
416
415
|
|
417
|
-
|
418
|
-
const playbackSpeedOptions = ['1', '1.25', '1.5', '2'];
|
419
|
-
abortEarlySetup();
|
420
|
-
before(() => {
|
421
|
-
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
422
|
-
cy.barsPreLoaderWait();
|
423
|
-
audioResponsePage.steps.selectAudioRecorderStyle('Compact');
|
424
|
-
audioResponsePage.steps.switchToPreviewTab();
|
425
|
-
audioResponsePage.steps.recordAndSaveAudioCompactPreview(10000);
|
416
|
+
audioResponsePage.tests.verifyVolumeControlFunctionality();
|
426
417
|
});
|
427
418
|
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
audioResponsePage.steps.
|
433
|
-
|
434
|
-
|
435
|
-
audioResponsePage.steps.
|
436
|
-
audioResponsePage.steps.
|
437
|
-
audioResponsePage.steps.waitForPlaybackToBeginCompactPreview();
|
438
|
-
audioResponsePage.steps.addWaitToPlayAudio(4000);
|
439
|
-
audioResponsePage.steps.pausePlaybackCompactPreview();
|
440
|
-
audioResponsePage.steps.verifyPlaybackElapsedTime(1 + (4 * playbackSpeedOptions[index]), 'Compact');
|
419
|
+
describe('Playback player : Playback speed', () => {
|
420
|
+
const playbackSpeedOptions = ['1', '1.25', '1.5', '2'];
|
421
|
+
abortEarlySetup();
|
422
|
+
before(() => {
|
423
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
424
|
+
cy.barsPreLoaderWait();
|
425
|
+
audioResponsePage.steps.selectAudioRecorderStyle('Compact');
|
426
|
+
audioResponsePage.steps.switchToPreviewTab();
|
427
|
+
audioResponsePage.steps.recordAndSaveAudioCompactPreview(10000);
|
441
428
|
});
|
442
|
-
};
|
443
|
-
});
|
444
429
|
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
430
|
+
audioResponsePage.tests.verifyPlaybackSpeedContents();
|
431
|
+
|
432
|
+
for (let index = 0; index < playbackSpeedOptions.length; index++) {
|
433
|
+
it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the audio playback speed should be changed accordingly`, () => {
|
434
|
+
audioResponsePage.steps.resetQuestionPreview();
|
435
|
+
audioResponsePage.steps.recordAndSaveAudioCompactPreview(12000);
|
436
|
+
utilities.hoverOverElement(audioResponsePage.playbackSpeedButton());
|
437
|
+
audioResponsePage.steps.selectPlaybackSpeed(`${playbackSpeedOptions[index]}x`);
|
438
|
+
audioResponsePage.steps.startPlaybackCompactPreview();
|
439
|
+
audioResponsePage.steps.waitForPlaybackToBeginCompactPreview();
|
440
|
+
audioResponsePage.steps.addWaitToPlayAudio(4000);
|
441
|
+
audioResponsePage.steps.pausePlaybackCompactPreview();
|
442
|
+
audioResponsePage.steps.verifyPlaybackElapsedTime(1 + (4 * playbackSpeedOptions[index]), 'Compact');
|
443
|
+
});
|
444
|
+
};
|
445
|
+
});
|
446
|
+
|
447
|
+
describe('Playback player : Retake my audio response', () => {
|
448
|
+
abortEarlySetup();
|
449
|
+
before(() => {
|
450
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
451
|
+
cy.barsPreLoaderWait();
|
452
|
+
audioResponsePage.steps.selectAudioRecorderStyle('Compact');
|
453
|
+
audioResponsePage.steps.setMaximumRecorderLength(10);
|
454
|
+
audioResponsePage.steps.switchToPreviewTab();
|
455
|
+
audioResponsePage.steps.recordAndSaveAudioCompactPreview(10000);
|
456
|
+
});
|
455
457
|
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
458
|
+
it('When the user clicks on \'Retake\' icon button, \'Retake\' popup should be displayed along with \'Are you sure you want to overwrite the existing audio recording?\' message', () => {
|
459
|
+
audioResponsePage.steps.retakeRecordingCompactPreview();
|
460
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Retake');
|
461
|
+
audioResponsePage.steps.verifyRetakePopupContents();
|
462
|
+
});
|
461
463
|
|
462
|
-
|
464
|
+
audioResponsePage.tests.verifyRetakePopupCSSAndA11y();
|
463
465
|
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
466
|
+
it('When the user clicks on \'Cancel\' button, \'Retake\' popup should close and previous state of playback player should persist', () => {
|
467
|
+
audioResponsePage.steps.cancelRetake();
|
468
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
469
|
+
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewRetakeButton(), 'visible');
|
470
|
+
utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPlaybackPlayButton(), 'visible');
|
471
|
+
audioResponsePage.steps.verifyResponseIsRecordedHelpText();
|
472
|
+
audioResponsePage.steps.verifyPlaybackTimeCompactPreview('00:00', '00:10');
|
473
|
+
});
|
472
474
|
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
475
|
+
it('When the user clicks on Confirm button of the retake popup, the previous recording should get deleted and a new recording should begin', () => {
|
476
|
+
audioResponsePage.steps.retakeRecordingCompactPreview();
|
477
|
+
audioResponsePage.steps.confirmRetake();
|
478
|
+
audioResponsePage.steps.verifyRecordingTimeCompactPreview('00:02', '15:00');
|
479
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
480
|
+
utilities.verifyInnerText(audioResponsePage.compactPreviewRecordingStatusText(), 'Recording...');
|
481
|
+
});
|
480
482
|
});
|
481
|
-
}
|
483
|
+
};
|
482
484
|
});
|
@@ -78,6 +78,7 @@ describe('Create Item page - Audio response: Question instructions, Audio record
|
|
78
78
|
});
|
79
79
|
|
80
80
|
it('When the user selects "Compact" option in the Audio recorder style toggle buttons section, then "Timer", "Progress indicator", "Audio wave" and "Volume meter" options should be displayed and be selected by default in "Audio indicators" section', () => {
|
81
|
+
audioResponsePage.steps.selectAudioRecorderStyle('Compact');
|
81
82
|
audioResponsePage.steps.verifyAudioIndicatorsTimeButtonSelectedState();
|
82
83
|
audioResponsePage.steps.verifyAudioIndicatorsProgressIndicatorButtonSelectedState();
|
83
84
|
audioResponsePage.steps.verifyAudioIndicatorsAudioWaveButtonSelectedState();
|
@@ -193,7 +194,7 @@ describe('Create Item page - Audio response: Question instructions, Audio record
|
|
193
194
|
|
194
195
|
it('When the user updates the \'Stop recording if silence is detected after\' value the validation text should disappear. User should be able to add only numeric values and should not able to add decimal points', () => {
|
195
196
|
audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('150');
|
196
|
-
utilities.verifyElementVisibilityState(audioResponsePage.errorMessage(), '
|
197
|
+
utilities.verifyElementVisibilityState(audioResponsePage.errorMessage(), 'hidden');
|
197
198
|
audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('.10.0');
|
198
199
|
audioResponsePage.steps.verifyStopRecordingIfSilenceIsDetectedInputFieldValue('100');
|
199
200
|
audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('!@#abcde236');
|