itemengine-cypress-automation 1.0.115 → 1.0.116
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} +181 -179
- package/cypress/e2e/ILC/AudioResponseNew/{compactRecorderStyle.js → compactRecorderStyle.smoke.js} +178 -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 +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +1 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsBasic.js +0 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +0 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabScoringSection.js +276 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +73 -0
- 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 +1 -1
- 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 +1 -1
- 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 +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- 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
@@ -8,7 +8,7 @@ describe('Preview of Audio response for bar audio recorder style', () => {
|
|
8
8
|
cy.loginAs('admin');
|
9
9
|
});
|
10
10
|
|
11
|
-
describe('Preview of bar audio recorder style', () => {
|
11
|
+
describe('Preview of bar audio recorder style', { tags: 'smoke' }, () => {
|
12
12
|
abortEarlySetup();
|
13
13
|
before(() => {
|
14
14
|
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
@@ -241,7 +241,7 @@ describe('Preview of Audio response for bar audio recorder style', () => {
|
|
241
241
|
});
|
242
242
|
});
|
243
243
|
|
244
|
-
describe('Playback player : Default state', () => {
|
244
|
+
describe('Playback player : Default state', { tags: 'smoke' }, () => {
|
245
245
|
abortEarlySetup();
|
246
246
|
before(() => {
|
247
247
|
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
@@ -305,185 +305,187 @@ describe('Preview of Audio response for bar audio recorder style', () => {
|
|
305
305
|
});
|
306
306
|
});
|
307
307
|
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
.
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
.
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
'
|
343
|
-
|
344
|
-
|
345
|
-
'
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
|
356
|
-
audioResponsePage.steps.startPlayback();
|
357
|
-
audioResponsePage.steps.waitForPlaybackToBeginBarPreview();
|
358
|
-
audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:05', '00:10');
|
359
|
-
audioResponsePage.steps.pauseAndVerifyProgressBarSliderPosition();
|
360
|
-
audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:05', '00:10');
|
361
|
-
utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
|
362
|
-
utilities.verifyElementVisibilityState(audioResponsePage.playbackPauseButton(), 'notExist');
|
363
|
-
});
|
364
|
-
|
365
|
-
it('CSS of \'Preview\' section if playback is paused', { tags: 'css' }, () => {
|
366
|
-
utilities.verifyCSS(audioResponsePage.playbackPlayButton().find('svg rect'), {
|
367
|
-
'fill': css.color.secondaryBtnBg
|
368
|
-
});
|
369
|
-
utilities.verifyCSS(audioResponsePage.playbackPlayButton().find('svg path'), {
|
370
|
-
'stroke': css.color.secondaryBtnActive
|
371
|
-
});
|
372
|
-
});
|
373
|
-
|
374
|
-
it('Accessibility of \'Preview\' section if if playback is paused', { tags: 'a11y' }, () => {
|
375
|
-
cy.checkAccessibility(audioResponsePage.barPreviewPlaybackWrapper());
|
376
|
-
});
|
377
|
-
|
378
|
-
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.', () => {
|
379
|
-
audioResponsePage.steps.startPlayback();
|
380
|
-
utilities.verifyElementVisibilityState(audioResponsePage.playbackPauseButton(), 'visible');
|
381
|
-
utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'notExist');
|
382
|
-
});
|
383
|
-
|
384
|
-
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', () => {
|
385
|
-
audioResponsePage.steps.seekProgressBarSliderToCenter();
|
386
|
-
audioResponsePage.steps.addWaitToPlayAudio(1000);
|
387
|
-
audioResponsePage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
|
388
|
-
});
|
389
|
-
|
390
|
-
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', () => {
|
391
|
-
audioResponsePage.steps.pausePlayback();
|
392
|
-
audioResponsePage.steps.seekProgressBarSliderToCenter();
|
393
|
-
audioResponsePage.steps.startPlayback();
|
394
|
-
audioResponsePage.steps.addWaitToPlayAudio(5000);
|
395
|
-
audioResponsePage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
|
396
|
-
});
|
397
|
-
|
398
|
-
it('When the audio playback is completed, the \'Pause\' button should get replaced with \'Play\' button', () => {
|
399
|
-
audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:45', '00:45');
|
400
|
-
utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
|
401
|
-
utilities.verifyElementVisibilityState(audioResponsePage.playbackPauseButton(), 'notExist');
|
402
|
-
audioResponsePage.steps.verifyProgressBarSliderPosition(99);
|
403
|
-
});
|
404
|
-
|
405
|
-
it('CSS of progress bar in hover state', { tags: 'css' }, () => {
|
406
|
-
audioResponsePage.steps.hoverOnProgressBarSlider();
|
407
|
-
utilities.verifyCSS(audioResponsePage.progressBarSlider().parents('span[class*="MuiSlider-thumb"]'), {
|
408
|
-
'box-shadow': `${css.color.progressBarSliderHoverBackground} 0px 0px 0px 8px`
|
409
|
-
});
|
410
|
-
});
|
411
|
-
});
|
412
|
-
|
413
|
-
describe('Playback player : Volume control', () => {
|
414
|
-
abortEarlySetup();
|
415
|
-
before(() => {
|
416
|
-
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
417
|
-
cy.barsPreLoaderWait();
|
418
|
-
audioResponsePage.steps.selectAudioRecorderStyle('Bar');
|
419
|
-
audioResponsePage.steps.switchToPreviewTab();
|
420
|
-
audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
|
421
|
-
});
|
422
|
-
|
423
|
-
audioResponsePage.tests.verifyVolumeControlFunctionality();
|
424
|
-
});
|
425
|
-
|
426
|
-
describe('Playback player : Playback speed', () => {
|
427
|
-
const playbackSpeedOptions = ['1', '1.25', '1.5', '2'];
|
428
|
-
abortEarlySetup();
|
429
|
-
before(() => {
|
430
|
-
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
431
|
-
cy.barsPreLoaderWait();
|
432
|
-
audioResponsePage.steps.selectAudioRecorderStyle('Bar');
|
433
|
-
audioResponsePage.steps.switchToPreviewTab();
|
434
|
-
audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
|
435
|
-
});
|
436
|
-
|
437
|
-
audioResponsePage.tests.verifyPlaybackSpeedContents();
|
438
|
-
|
439
|
-
for (let index = 0; index < playbackSpeedOptions.length; index++) {
|
440
|
-
it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the audio playback speed should be changed accordingly`, () => {
|
308
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
309
|
+
describe('Playback player : Play, pause and seek', () => {
|
310
|
+
let actualAudioSeekedInPercent = 50
|
311
|
+
abortEarlySetup();
|
312
|
+
before(() => {
|
313
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
314
|
+
cy.barsPreLoaderWait();
|
315
|
+
audioResponsePage.steps.selectAudioRecorderStyle('Bar');
|
316
|
+
audioResponsePage.steps.switchToPreviewTab();
|
317
|
+
audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
|
318
|
+
});
|
319
|
+
|
320
|
+
it('When the user hovers over the \'Play\' button, a tooltip \'Play\' should be displayed and on moving away the focus, the tooltip should disappear', () => {
|
321
|
+
audioResponsePage.playbackPlayButton()
|
322
|
+
.verifyTooltip('Play');
|
323
|
+
});
|
324
|
+
|
325
|
+
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.', () => {
|
326
|
+
audioResponsePage.steps.startPlayback();
|
327
|
+
audioResponsePage.steps.waitForPlaybackToBeginBarPreview();
|
328
|
+
audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:03', '00:10');
|
329
|
+
});
|
330
|
+
|
331
|
+
it('When the user hovers over the \'Pause\' button, a tooltip \'Pause\' should be displayed and on moving away the focus, the tooltip should disappear', () => {
|
332
|
+
audioResponsePage.playbackPauseButton()
|
333
|
+
.verifyTooltip('Pause');
|
334
|
+
});
|
335
|
+
|
336
|
+
it('CSS of \'Preview\' section if playback is initiated', { tags: 'css' }, () => {
|
337
|
+
utilities.verifyCSS(audioResponsePage.barPreviewPlaybackTime(), {
|
338
|
+
'color': css.color.liText,
|
339
|
+
'font-size': css.fontSize.small,
|
340
|
+
'font-weight': css.fontWeight.bold
|
341
|
+
});
|
342
|
+
utilities.verifyCSS(audioResponsePage.playbackPauseButton().find('svg rect'), {
|
343
|
+
'fill': css.color.secondaryBtnBg
|
344
|
+
});
|
345
|
+
utilities.verifyCSS(audioResponsePage.playbackPauseButton().find('svg path'), {
|
346
|
+
'stroke': css.color.secondaryBtnActive
|
347
|
+
});
|
348
|
+
});
|
349
|
+
|
350
|
+
it('Accessibility of \'Preview\' section if playback is initiated', { tags: 'a11y' }, () => {
|
351
|
+
cy.checkAccessibility(audioResponsePage.barPreviewPlaybackWrapper());
|
352
|
+
});
|
353
|
+
|
354
|
+
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', () => {
|
441
355
|
audioResponsePage.steps.resetQuestionPreview();
|
442
|
-
audioResponsePage.steps.recordAndSaveAudioBarPreview(
|
443
|
-
utilities.hoverOverElement(audioResponsePage.playbackSpeedButton());
|
444
|
-
audioResponsePage.steps.selectPlaybackSpeed(`${playbackSpeedOptions[index]}x`);
|
356
|
+
audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
|
445
357
|
audioResponsePage.steps.startPlayback();
|
446
358
|
audioResponsePage.steps.waitForPlaybackToBeginBarPreview();
|
447
|
-
audioResponsePage.steps.
|
448
|
-
audioResponsePage.steps.
|
449
|
-
audioResponsePage.steps.
|
359
|
+
audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:05', '00:10');
|
360
|
+
audioResponsePage.steps.pauseAndVerifyProgressBarSliderPosition();
|
361
|
+
audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:05', '00:10');
|
362
|
+
utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
|
363
|
+
utilities.verifyElementVisibilityState(audioResponsePage.playbackPauseButton(), 'notExist');
|
364
|
+
});
|
365
|
+
|
366
|
+
it('CSS of \'Preview\' section if playback is paused', { tags: 'css' }, () => {
|
367
|
+
utilities.verifyCSS(audioResponsePage.playbackPlayButton().find('svg rect'), {
|
368
|
+
'fill': css.color.secondaryBtnBg
|
369
|
+
});
|
370
|
+
utilities.verifyCSS(audioResponsePage.playbackPlayButton().find('svg path'), {
|
371
|
+
'stroke': css.color.secondaryBtnActive
|
372
|
+
});
|
373
|
+
});
|
374
|
+
|
375
|
+
it('Accessibility of \'Preview\' section if if playback is paused', { tags: 'a11y' }, () => {
|
376
|
+
cy.checkAccessibility(audioResponsePage.barPreviewPlaybackWrapper());
|
377
|
+
});
|
378
|
+
|
379
|
+
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.', () => {
|
380
|
+
audioResponsePage.steps.startPlayback();
|
381
|
+
utilities.verifyElementVisibilityState(audioResponsePage.playbackPauseButton(), 'visible');
|
382
|
+
utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'notExist');
|
450
383
|
});
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
});
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
384
|
+
|
385
|
+
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', () => {
|
386
|
+
audioResponsePage.steps.seekProgressBarSliderToCenter();
|
387
|
+
audioResponsePage.steps.addWaitToPlayAudio(1000);
|
388
|
+
audioResponsePage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
|
389
|
+
});
|
390
|
+
|
391
|
+
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', () => {
|
392
|
+
audioResponsePage.steps.pausePlayback();
|
393
|
+
audioResponsePage.steps.seekProgressBarSliderToCenter();
|
394
|
+
audioResponsePage.steps.startPlayback();
|
395
|
+
audioResponsePage.steps.addWaitToPlayAudio(5000);
|
396
|
+
audioResponsePage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
|
397
|
+
});
|
398
|
+
|
399
|
+
it('When the audio playback is completed, the \'Pause\' button should get replaced with \'Play\' button', () => {
|
400
|
+
audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:45', '00:45');
|
401
|
+
utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
|
402
|
+
utilities.verifyElementVisibilityState(audioResponsePage.playbackPauseButton(), 'notExist');
|
403
|
+
audioResponsePage.steps.verifyProgressBarSliderPosition(99);
|
404
|
+
});
|
405
|
+
|
406
|
+
it('CSS of progress bar in hover state', { tags: 'css' }, () => {
|
407
|
+
audioResponsePage.steps.hoverOnProgressBarSlider();
|
408
|
+
utilities.verifyCSS(audioResponsePage.progressBarSlider().parents('span[class*="MuiSlider-thumb"]'), {
|
409
|
+
'box-shadow': `${css.color.progressBarSliderHoverBackground} 0px 0px 0px 8px`
|
410
|
+
});
|
411
|
+
});
|
412
|
+
});
|
413
|
+
|
414
|
+
describe('Playback player : Volume control', () => {
|
415
|
+
abortEarlySetup();
|
416
|
+
before(() => {
|
417
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
418
|
+
cy.barsPreLoaderWait();
|
419
|
+
audioResponsePage.steps.selectAudioRecorderStyle('Bar');
|
420
|
+
audioResponsePage.steps.switchToPreviewTab();
|
421
|
+
audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
|
422
|
+
});
|
423
|
+
|
424
|
+
audioResponsePage.tests.verifyVolumeControlFunctionality();
|
425
|
+
});
|
426
|
+
|
427
|
+
describe('Playback player : Playback speed', () => {
|
428
|
+
const playbackSpeedOptions = ['1', '1.25', '1.5', '2'];
|
429
|
+
abortEarlySetup();
|
430
|
+
before(() => {
|
431
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
432
|
+
cy.barsPreLoaderWait();
|
433
|
+
audioResponsePage.steps.selectAudioRecorderStyle('Bar');
|
434
|
+
audioResponsePage.steps.switchToPreviewTab();
|
435
|
+
audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
|
436
|
+
});
|
437
|
+
|
438
|
+
audioResponsePage.tests.verifyPlaybackSpeedContents();
|
439
|
+
|
440
|
+
for (let index = 0; index < playbackSpeedOptions.length; index++) {
|
441
|
+
it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the audio playback speed should be changed accordingly`, () => {
|
442
|
+
audioResponsePage.steps.resetQuestionPreview();
|
443
|
+
audioResponsePage.steps.recordAndSaveAudioBarPreview(12000);
|
444
|
+
utilities.hoverOverElement(audioResponsePage.playbackSpeedButton());
|
445
|
+
audioResponsePage.steps.selectPlaybackSpeed(`${playbackSpeedOptions[index]}x`);
|
446
|
+
audioResponsePage.steps.startPlayback();
|
447
|
+
audioResponsePage.steps.waitForPlaybackToBeginBarPreview();
|
448
|
+
audioResponsePage.steps.addWaitToPlayAudio(4000);
|
449
|
+
audioResponsePage.steps.pausePlayback();
|
450
|
+
audioResponsePage.steps.verifyPlaybackElapsedTime(1 + (4 * playbackSpeedOptions[index]), 'Bar');
|
451
|
+
});
|
452
|
+
};
|
453
|
+
});
|
454
|
+
|
455
|
+
describe('Playback player : Retake my audio response', () => {
|
456
|
+
abortEarlySetup();
|
457
|
+
before(() => {
|
458
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
459
|
+
cy.barsPreLoaderWait();
|
460
|
+
audioResponsePage.steps.selectAudioRecorderStyle('Bar');
|
461
|
+
audioResponsePage.steps.setMaximumRecorderLength(10);
|
462
|
+
audioResponsePage.steps.switchToPreviewTab();
|
463
|
+
audioResponsePage.steps.recordAndSaveAudioBarPreview(5000);
|
464
|
+
});
|
465
|
+
|
466
|
+
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', () => {
|
467
|
+
audioResponsePage.steps.retakeRecordingBarPreview();
|
468
|
+
utilities.verifyInnerText(dialogBoxBase.dialogBoxTitle(), 'Retake');
|
469
|
+
audioResponsePage.steps.verifyRetakePopupContents();
|
470
|
+
});
|
471
|
+
|
472
|
+
audioResponsePage.tests.verifyRetakePopupCSSAndA11y();
|
473
|
+
|
474
|
+
it('When the user clicks on \'Cancel\' button, \'Retake\' popup should close and previous state of playback player should persist', () => {
|
475
|
+
audioResponsePage.steps.cancelRetake();
|
476
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
477
|
+
utilities.verifyElementVisibilityState(audioResponsePage.barPreviewRetakeButton(), 'visible');
|
478
|
+
utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
|
479
|
+
audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:00', '00:05');
|
480
|
+
});
|
481
|
+
|
482
|
+
it('When the user clicks on Confirm button of the retake popup, the previous recording should get deleted and a new recording should begin', () => {
|
483
|
+
audioResponsePage.steps.retakeRecordingBarPreview();
|
484
|
+
audioResponsePage.steps.confirmRetake();
|
485
|
+
audioResponsePage.steps.verifyRecordingTimeBarPreview('00:02', '15:00');
|
486
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
487
|
+
utilities.verifyInnerText(audioResponsePage.recordingStatusText(), 'Recording...');
|
488
|
+
});
|
489
|
+
});
|
490
|
+
};
|
489
491
|
});
|