itemengine-cypress-automation 1.0.185-repoUpdate26April-b17eb46.0 → 1.0.186-packageUpdate-5632086.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  3. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +8 -5
  6. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +28 -417
  7. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  8. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +1 -29
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  11. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  19. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  20. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -3
  21. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +0 -1
  23. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  24. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  25. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  26. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  27. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  28. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  29. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  30. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -11
  31. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  32. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  33. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  34. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +0 -1
  35. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  36. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  37. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +1 -57
  38. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  39. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  40. package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -2
  41. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  42. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -49
  43. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  44. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  45. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  46. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +1 -0
  47. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -0
  48. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +1 -0
  49. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
  50. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
  51. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +2 -1
  52. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +4 -5
  53. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +7 -6
  54. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  55. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  56. package/cypress/fixtures/constants.js +1 -1
  57. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  58. package/cypress/fixtures/theme/ilc.json +18 -20
  59. package/cypress/pages/audioPlayerPage.js +504 -274
  60. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  61. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  62. package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
  63. package/cypress/pages/components/commonComponents.js +0 -1
  64. package/cypress/pages/components/draggableOptionContainer.js +0 -1
  65. package/cypress/pages/components/equationEditorFlyout.js +2 -3
  66. package/cypress/pages/components/essayResponseCommonComponents.js +2 -8
  67. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -1
  68. package/cypress/pages/components/imageCanvasComponent.js +1 -2
  69. package/cypress/pages/components/index.js +0 -3
  70. package/cypress/pages/components/optionsWrapperComponent.js +2 -13
  71. package/cypress/pages/components/playbackControlsBaseComponent.js +13 -20
  72. package/cypress/pages/components/toolSettingsComponent.js +0 -6
  73. package/cypress/pages/contentBlocksPage.js +2 -18
  74. package/cypress/pages/createItemPage.js +8 -75
  75. package/cypress/pages/dialogBoxBase.js +2 -2
  76. package/cypress/pages/drawingResponsePage.js +4 -24
  77. package/cypress/pages/feedbackScalePage.js +0 -3
  78. package/cypress/pages/graphingPage.js +1 -19
  79. package/cypress/pages/gridFillPage.js +8 -25
  80. package/cypress/pages/index.js +1 -2
  81. package/cypress/pages/itemPreviewSettingsPage.js +0 -4
  82. package/cypress/pages/listOrderingPage.js +557 -435
  83. package/cypress/pages/matchingPage.js +1 -1
  84. package/cypress/pages/multipleSelectionPage.js +1 -23
  85. package/cypress/pages/numberLinePage.js +132 -1370
  86. package/cypress/pages/rulerPage.js +2 -6
  87. package/cypress/pages/textSelectionPage.js +23 -461
  88. package/package.json +1 -1
  89. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +0 -79
  90. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +0 -345
  91. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +0 -429
  92. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +0 -162
  93. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +0 -489
  94. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +0 -313
  95. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +0 -230
  96. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +0 -124
  97. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +0 -201
  98. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -216
  99. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -214
  100. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -251
  101. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +0 -52
  102. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +0 -128
  103. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -279
  104. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +0 -109
  105. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -278
  106. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -278
  107. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +0 -335
  108. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -250
  109. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +0 -161
  110. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -216
  111. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -252
  112. package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +0 -118
  113. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +0 -243
  114. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -128
  115. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +0 -155
  116. package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +0 -195
  117. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +0 -78
  118. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -194
  119. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +0 -176
  120. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +0 -112
  121. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +0 -244
  122. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +0 -181
  123. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +0 -33
  124. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +0 -46
  125. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +0 -696
  126. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -173
  127. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +0 -183
  128. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +0 -73
  129. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +0 -204
  130. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +0 -288
  131. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +0 -153
  132. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +0 -164
  133. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +0 -120
  134. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +0 -125
  135. package/cypress/e2e/ILC/TextSelection/headerSection.js +0 -73
  136. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +0 -179
  137. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +0 -89
  138. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +0 -436
  139. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +0 -277
  140. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +0 -222
  141. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +0 -260
  142. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +0 -380
  143. package/cypress/pages/components/layoutSectionComponent.js +0 -1191
  144. package/cypress/pages/components/numberLineCommonComponent.js +0 -36
  145. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +0 -46
  146. package/cypress/pages/numberLineLabelPage.js +0 -333
@@ -1,79 +0,0 @@
1
- import { audioPlayerPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import constants from "../../../fixtures/constants";
4
- import utilities from "../../../support/helpers/utilities";
5
-
6
- describe('Audio player: Preview tab', () => {
7
- before(() => {
8
- cy.loginAs('admin');
9
- });
10
-
11
- describe('Uploading all supported files via \'Source URL\' field', () => {
12
- abortEarlySetup();
13
- before(() => {
14
- audioPlayerPage.steps.navigateToCreateResource('audio player');
15
- audioPlayerPage.steps.selectAddAudioURLRadioButton();
16
- });
17
-
18
- it('When user adds link of MP3 audio file, audio player should be displayed in preview tab and user should be able to play MP3 audio file.', () => {
19
- audioPlayerPage.steps.enterTextInSourceURLInputField(constants.sampleMp3Link);
20
- audioPlayerPage.steps.switchToPreviewTab();
21
- audioPlayerPage.steps.startPlayback();
22
- audioPlayerPage.steps.waitForPlaybackToBegin();
23
- });
24
-
25
- it('When user adds link of WAV audio file, audio player should be displayed in preview tab and user should be able to play WAV audio file.', () => {
26
- audioPlayerPage.steps.switchToEditTab();
27
- audioPlayerPage.steps.clearTextInSourceURLInputField();
28
- audioPlayerPage.steps.enterTextInSourceURLInputField(constants.sampleWAVLink);
29
- audioPlayerPage.steps.switchToPreviewTab();
30
- audioPlayerPage.steps.startPlayback();
31
- audioPlayerPage.steps.waitForPlaybackToBegin();
32
- });
33
-
34
- it('When user adds link of AAC audio file, audio player should be displayed in preview tab and user should be able to play AAC audio file.', () => {
35
- audioPlayerPage.steps.switchToEditTab();
36
- audioPlayerPage.steps.clearTextInSourceURLInputField();
37
- audioPlayerPage.steps.enterTextInSourceURLInputField(constants.sampleAACLink);
38
- audioPlayerPage.steps.switchToPreviewTab();
39
- audioPlayerPage.steps.startPlayback();
40
- audioPlayerPage.steps.waitForPlaybackToBegin();
41
- });
42
- });
43
-
44
- describe('Uploading all supported files via \'Upload\' field', () => {
45
- const MP3File = "uploads/sample.mp3";
46
- const WAVFile = "uploads/sample.wav";
47
- const AACFile = "uploads/sample.aac";
48
- abortEarlySetup();
49
- before(() => {
50
- audioPlayerPage.steps.navigateToCreateResource('audio player');
51
- });
52
-
53
- it('When user uploads MP3 audio file, audio player should be displayed in preview tab and user should be able to play MP3 audio file.', () => {
54
- audioPlayerPage.steps.uploadFile(MP3File);
55
- audioPlayerPage.steps.switchToPreviewTab();
56
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
57
- audioPlayerPage.steps.startPlayback();
58
- audioPlayerPage.steps.waitForPlaybackToBegin();
59
- });
60
-
61
- it('When user uploads WAV audio file, audio player should be displayed in preview tab and user should be able to play WAV audio file.', () => {
62
- audioPlayerPage.steps.switchToEditTab();
63
- audioPlayerPage.steps.uploadFile(WAVFile);
64
- audioPlayerPage.steps.switchToPreviewTab();
65
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
66
- audioPlayerPage.steps.startPlayback();
67
- audioPlayerPage.steps.waitForPlaybackToBegin();
68
- });
69
-
70
- it('When user uploads AAC audio file, audio player should be displayed in preview tab and user should be able to play AAC audio file.', () => {
71
- audioPlayerPage.steps.switchToEditTab();
72
- audioPlayerPage.steps.uploadFile(AACFile);
73
- audioPlayerPage.steps.switchToPreviewTab();
74
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
75
- audioPlayerPage.steps.startPlayback();
76
- audioPlayerPage.steps.waitForPlaybackToBegin();
77
- });
78
- });
79
- });
@@ -1,345 +0,0 @@
1
- import { audioPlayerPage } from "../../../pages";
2
- import abortEarlySetup from "../../../support/helpers/abortEarly";
3
- import utilities from "../../../support/helpers/utilities";
4
- const css = Cypress.env('css');
5
-
6
- describe('Bar audio player style: Preview tab functionality', () => {
7
- before(() => {
8
- cy.loginAs('admin');
9
- });
10
-
11
- describe('Bar playback preview : Play, pause and seek', () => {
12
- let actualAudioSeekedInPercent = 50
13
- abortEarlySetup();
14
- before(() => {
15
- audioPlayerPage.steps.navigateToCreateResource('audio player');
16
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
17
- audioPlayerPage.steps.switchToPreviewTab();
18
- });
19
-
20
- it('When the user switches to preview tab, then the bar playback player preview with \'Backward\', \'Play\', \'Forward\', \'Volume control\', \'Elapsed time\', \'Progress bar\', \'Total time\', \'Playback speed\' and \'Add pin\' buttons should be displayed', () => {
21
- utilities.verifyElementVisibilityState(audioPlayerPage.standardPreviewPlayerWrapper(), 'notExist');
22
- utilities.verifyElementVisibilityState(audioPlayerPage.audioPlayerToolbar(), 'visible');
23
- utilities.verifyElementVisibilityState(audioPlayerPage.backwardButton(), 'visible');
24
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
25
- utilities.verifyElementVisibilityState(audioPlayerPage.forwardButton(), 'visible');
26
- utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlButton(), 'visible');
27
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackElapsedTime(), 'visible');
28
- utilities.verifyInnerText(audioPlayerPage.playbackElapsedTime(), '00:00');
29
- utilities.verifyElementVisibilityState(audioPlayerPage.progressBar(), 'visible');
30
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackTotalTime(), 'visible');
31
- utilities.verifyInnerText(audioPlayerPage.playbackTotalTime(), '00:00');
32
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackSpeedButton(), 'visible');
33
- utilities.verifyElementVisibilityState(audioPlayerPage.addPinButton(), 'visible');
34
- });
35
-
36
- it('Accessibility of bar playback player in default state', { tags: 'a11y' }, () => {
37
- cy.checkAccessibility(audioPlayerPage.playbackPlayButton().parents('.audio-resource-preview-wrapper'));
38
- });
39
-
40
- 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', () => {
41
- audioPlayerPage.playbackPlayButton()
42
- .verifyTooltip('Play');
43
- });
44
-
45
- it('When the user clicks on \'Play\' button, then the audio file should load and the user should be able to play the audio. Timer should display the amount of audio that has been played and the total audio length in (mm:ss)/(mm:ss) format.', () => {
46
- audioPlayerPage.steps.startPlayback();
47
- audioPlayerPage.steps.waitForPlaybackToBegin();
48
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:03/00:45');
49
- });
50
-
51
- 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', () => {
52
- audioPlayerPage.playbackPauseButton()
53
- .verifyTooltip('Pause');
54
- });
55
-
56
- it('CSS of \'Preview\' section if playback is initiated', { tags: 'css' }, () => {
57
- utilities.verifyCSS(audioPlayerPage.playbackPauseButton().find('#pause'), {
58
- 'stroke': css.color.secondaryBtnActive,
59
- });
60
- utilities.verifyCSS(audioPlayerPage.playbackElapsedTime(), {
61
- 'color': css.color.playbackTime,
62
- 'font-size': css.fontSize.small,
63
- 'font-weight': css.fontWeight.bold
64
- });
65
- utilities.verifyCSS(audioPlayerPage.playbackTotalTime(), {
66
- 'color': css.color.playbackTime,
67
- 'font-size': css.fontSize.small,
68
- 'font-weight': css.fontWeight.bold
69
- });
70
- utilities.verifyCSS(audioPlayerPage.progressBar().find('.MuiSlider-rail'), {
71
- 'background-color': css.color.progressBarRemainingFill
72
- });
73
- utilities.verifyCSS(audioPlayerPage.progressBar().find('.MuiSlider-track'), {
74
- 'background-color': css.color.progressBarElapsedFill
75
- });
76
- });
77
-
78
- it('Accessibility of \'Preview\' section if playback is initiated', { tags: 'a11y' }, () => {
79
- cy.checkAccessibility(audioPlayerPage.playbackPauseButton().parents('.audio-resource-preview-wrapper'));
80
- });
81
-
82
- 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', () => {
83
- audioPlayerPage.steps.resetQuestionPreview();
84
- audioPlayerPage.steps.startPlayback();
85
- audioPlayerPage.steps.waitForPlaybackToBegin();
86
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:10/00:45');
87
- audioPlayerPage.steps.pauseAndVerifyProgressBarSliderPosition();
88
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:10/00:45');
89
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
90
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'notExist');
91
- });
92
-
93
- it('Accessibility of \'Preview\' section if if playback is paused', { tags: 'a11y' }, () => {
94
- cy.checkAccessibility(audioPlayerPage.playbackPlayButton().parents('.audio-resource-preview-wrapper'));
95
- });
96
-
97
- 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.', () => {
98
- audioPlayerPage.steps.startPlayback();
99
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'visible');
100
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'notExist');
101
- });
102
-
103
- 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', () => {
104
- audioPlayerPage.steps.seekProgressBarSliderToCenter();
105
- audioPlayerPage.steps.addWaitToPlayAudio(1000);
106
- audioPlayerPage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
107
- });
108
-
109
- 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', () => {
110
- audioPlayerPage.steps.pausePlayback();
111
- audioPlayerPage.steps.seekProgressBarSliderToCenter();
112
- audioPlayerPage.steps.startPlayback();
113
- audioPlayerPage.steps.addWaitToPlayAudio(3000);
114
- audioPlayerPage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
115
- });
116
-
117
- it('When the audio playback is completed, the \'Pause\' button should get replaced with \'Play\' button', () => {
118
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:45/00:45');
119
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
120
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'notExist');
121
- audioPlayerPage.steps.verifyProgressBarSliderPosition(99);
122
- });
123
-
124
- it('CSS of progress bar in hover state', { tags: 'css' }, () => {
125
- audioPlayerPage.steps.hoverOnProgressBarSlider();
126
- utilities.verifyCSS(audioPlayerPage.progressBarSlider().parents('span[class*="MuiSlider-thumb"]'), {
127
- 'box-shadow': `${css.color.progressBarSliderHoverBackground} 0px 0px 0px 8px`
128
- });
129
- });
130
- });
131
-
132
- describe('Bar playback preview : Volume control', () => {
133
- abortEarlySetup();
134
- before(() => {
135
- audioPlayerPage.steps.navigateToCreateResource('audio player');
136
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
137
- audioPlayerPage.steps.switchToPreviewTab();
138
- audioPlayerPage.steps.startPlayback();
139
- audioPlayerPage.steps.waitForPlaybackToBegin();
140
- });
141
-
142
- it('When the user hovers over \'Volume control\' button, volume control settings should open and by default it should be set to full volume and on hovering away from the button, the volume slider should disappear', () => {
143
- audioPlayerPage.steps.hoverOnVolumeControlButton();
144
- utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlSlider(), 'visible');
145
- audioPlayerPage.steps.verifyVolumeOfPlaybackPlayer('100');
146
- utilities.hoverAwayFromElement();
147
- utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlSlider(), 'notExist');
148
- });
149
-
150
- it('When volume is not set as 0 and user hovers on \'Volume control\' button, then \'Mute\' text should be displayed in a tooltip and on hovering away from the button, the tooltip should disappear', () => {
151
- audioPlayerPage.steps.hoverOnVolumeControlButton();
152
- utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'visible');
153
- utilities.verifyInnerText(audioPlayerPage.tooltipText(), 'Mute');
154
- utilities.hoverAwayFromElement();
155
- utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'notExist');
156
- });
157
-
158
- it('When the user hovers over \'Volume control slider\', then \'Volume control\' text should be displayed in a tooltip and on hovering away from the button, the tooltip should disappear', () => {
159
- audioPlayerPage.steps.hoverOnVolumeControlButton();
160
- audioPlayerPage.steps.hoverOnVolumeControlSlider();
161
- audioPlayerPage.steps.hoverAwayFromVolumeControlButton();
162
- utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'visible');
163
- utilities.verifyInnerText(audioPlayerPage.tooltipText(), 'Volume control');
164
- utilities.hoverAwayFromElement();
165
- utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlSlider(), 'notExist');
166
- utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'notExist');
167
- });
168
-
169
- it('When volume is not set as 0 and user clicks on volume control button, then the audio should be muted and the volume control button should change to a muted state', () => {
170
- audioPlayerPage.steps.clickOnVolumeButton();
171
- audioPlayerPage.steps.hoverOnVolumeControlButton();
172
- audioPlayerPage.steps.verifyVolumeOfPlaybackPlayer('0');
173
- utilities.hoverAwayFromElement();
174
- utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlSlider(), 'notExist');
175
- utilities.verifyElementVisibilityState(audioPlayerPage.muteVolumeIcon(), 'visible');
176
- utilities.hoverAwayFromElement();
177
- });
178
-
179
- it('When the user hovers on muted \'Volume control\' button, \'Unmute\' text should be displayed in tooltip', () => {
180
- audioPlayerPage.steps.hoverOnVolumeControlButton();
181
- utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'visible');
182
- utilities.verifyInnerText(audioPlayerPage.tooltipText(), 'Unmute');
183
- utilities.hoverAwayFromElement();
184
- utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'notExist');
185
- });
186
-
187
- it('When the user clicks on the muted volume control button then the volume setting slider should return to full volume and the volume control button should change to an unmuted state', () => {
188
- audioPlayerPage.steps.clickOnVolumeButton();
189
- audioPlayerPage.steps.hoverOnVolumeControlButton();
190
- audioPlayerPage.steps.verifyVolumeOfPlaybackPlayer('100');
191
- audioPlayerPage.steps.verifyUnmutedVolumeIconIsDisplayedInPreviewTab();
192
- });
193
-
194
- it('CSS of volume control section', { tags: 'css' }, () => {
195
- utilities.verifyCSS(audioPlayerPage.volumeControlSlider(), {
196
- 'background': `${css.color.transparent} linear-gradient(to right, ${css.color.progressBarElapsedFill} 0%, ${css.color.progressBarElapsedFill} 100%, ${css.color.defaultBackground} 0%, ${css.color.defaultBackground} 100%) repeat scroll 0% 0% / auto padding-box border-box`
197
- });
198
- audioPlayerPage.unmutedVolumeIcon()
199
- .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
200
- });
201
-
202
- it('Accessibility of volume control section', { tags: 'a11y' }, () => {
203
- cy.checkAccessibility(audioPlayerPage.volumeControlSlider());
204
- cy.checkAccessibility(audioPlayerPage.playbackPauseButton().parents('.audio-resource-preview-wrapper'));
205
- });
206
-
207
- it('When the user drags the volume control all the way down, audio should be muted and the button should update to a muted state', () => {
208
- audioPlayerPage.steps.setVolumeSliderForPlayback(0);
209
- audioPlayerPage.steps.verifyVolumeOfPlaybackPlayer('0');
210
- utilities.verifyElementVisibilityState(audioPlayerPage.muteVolumeIcon(), 'visible');
211
- });
212
-
213
- it('CSS of volume control section in muted state', { tags: 'css' }, () => {
214
- utilities.verifyCSS(audioPlayerPage.volumeControlSlider(), {
215
- 'background': `${css.color.transparent} linear-gradient(to right, ${css.color.progressBarElapsedFill} 0%, ${css.color.progressBarElapsedFill} 0%, ${css.color.defaultBackground} -100%, ${css.color.defaultBackground} 100%) repeat scroll 0% 0% / auto padding-box border-box`
216
- });
217
- audioPlayerPage.muteVolumeIcon()
218
- .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
219
- });
220
-
221
- it('Accessibility of volume control section in muted state', { tags: 'a11y' }, () => {
222
- cy.checkAccessibility(audioPlayerPage.volumeControlSlider());
223
- cy.checkAccessibility(audioPlayerPage.playbackPauseButton().parents('.audio-resource-preview-wrapper'));
224
- });
225
-
226
- it('User should be able to unmute the audio by dragging the volume control higher again', () => {
227
- audioPlayerPage.steps.setVolumeSliderForPlayback(99);
228
- audioPlayerPage.steps.verifyVolumeOfPlaybackPlayer('100');
229
- audioPlayerPage.steps.verifyUnmutedVolumeIconIsDisplayedInPreviewTab();
230
- });
231
- });
232
-
233
- describe('Bar playback preview : Playback speed', () => {
234
- const playbackSpeedOptions = ['0.5', '1', '1.25', '1.5', '1.75', '2'];
235
- abortEarlySetup();
236
- before(() => {
237
- audioPlayerPage.steps.navigateToCreateResource('audio player');
238
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
239
- audioPlayerPage.steps.switchToPreviewTab();
240
- });
241
-
242
- audioPlayerPage.tests.verifyPlaybackSpeedContents(playbackSpeedOptions);
243
-
244
- for (let index = 0; index < playbackSpeedOptions.length; index++) {
245
- it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the audio playback speed should be changed accordingly`, () => {
246
- audioPlayerPage.steps.resetQuestionPreview();
247
- audioPlayerPage.steps.hoverOnPlaybackSpeedButton();
248
- audioPlayerPage.steps.selectPlaybackSpeed(`${playbackSpeedOptions[index]}x`);
249
- utilities.verifyElementVisibilityState(audioPlayerPage.playbackSpeedOption(), 'notExist');
250
- audioPlayerPage.steps.startPlayback();
251
- audioPlayerPage.steps.waitForPlaybackToBegin();
252
- audioPlayerPage.steps.addWaitToPlayAudio(4000);
253
- audioPlayerPage.steps.pausePlayback();
254
- utilities.verifyInnerText(audioPlayerPage.playbackElapsedTime(), `00:0${1 + (2 * playbackSpeedOptions[index])}`);
255
- });
256
- };
257
- });
258
-
259
- describe('Bar playback preview : Backward and Forward buttons', () => {
260
- abortEarlySetup();
261
- before(() => {
262
- audioPlayerPage.steps.navigateToCreateResource('audio player');
263
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
264
- audioPlayerPage.steps.switchToPreviewTab();
265
- });
266
-
267
- it('When the user hovers over the \'Backward\' button, a tooltip \'Backward Button\' should be displayed and on moving away the focus, the tooltip should disappear', () => {
268
- audioPlayerPage.backwardButton()
269
- .verifyTooltip('Backward Button');
270
- });
271
-
272
- it('When the user hovers over the \'Forward\' button, a tooltip \'Forward Button\' should be displayed and on moving away the focus, the tooltip should disappear', () => {
273
- audioPlayerPage.forwardButton()
274
- .verifyTooltip('Forward Button');
275
- });
276
-
277
- it('CSS of \'Backward\' and \'Forward\' button in default and hover state', { tags: 'css' }, () => {
278
- utilities.verifyCSS(audioPlayerPage.backwardButton().find('path').eq(1), {
279
- 'stroke': css.color.activeButtons
280
- });
281
- utilities.verifyCSS(audioPlayerPage.forwardButton().find('path').eq(1), {
282
- 'stroke': css.color.activeButtons
283
- });
284
- utilities.triggerMouseover(audioPlayerPage.backwardButton());
285
- utilities.verifyCSS(audioPlayerPage.backwardButton(), {
286
- 'background-color': css.color.selectToolbarOptionBg
287
- });
288
- utilities.triggerMouseout(audioPlayerPage.backwardButton());
289
- utilities.triggerMouseover(audioPlayerPage.forwardButton());
290
- utilities.verifyCSS(audioPlayerPage.forwardButton(), {
291
- 'background-color': css.color.selectToolbarOptionBg
292
- });
293
- utilities.triggerMouseout(audioPlayerPage.forwardButton());
294
- });
295
-
296
- it('When playback is not initiated and user clicks on forward or backward button, then there should not be any changes', () => {
297
- audioPlayerPage.steps.clickOnForwardButton();
298
- audioPlayerPage.steps.verifyProgressBarSliderPosition(0);
299
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:00/00:00');
300
- audioPlayerPage.steps.clickOnBackwardButton();
301
- audioPlayerPage.steps.verifyProgressBarSliderPosition(0);
302
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:00/00:00');
303
- });
304
-
305
- it('When the audio player is in playback state and the user clicks on \'Forward\' button, then playback should get forwarded by 10 seconds and both the progress bar and elapsed time should be updated accordingly', () => {
306
- audioPlayerPage.steps.startPlayback();
307
- audioPlayerPage.steps.waitForPlaybackToBegin();
308
- audioPlayerPage.steps.addWaitToPlayAudio(4000);
309
- audioPlayerPage.steps.clickOnForwardButton();
310
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:15/00:45');
311
- });
312
-
313
- it('When audio player is in paused state and the user clicks on \'Forward\' button, then playback should get forwarded by 10 seconds and both the progress bar and elapsed time should be updated accordingly', () => {
314
- audioPlayerPage.steps.pausePlayback();
315
- audioPlayerPage.steps.clickOnForwardButton();
316
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:25/00:45');
317
- });
318
-
319
- it('When the audio player is in playback state and the user clicks on \'Backward\' button, then playback should get backtracked by 10 seconds and both the progress bar and elapsed time should be updated accordingly', () => {
320
- audioPlayerPage.steps.startPlayback();
321
- audioPlayerPage.steps.addWaitToPlayAudio(3000);
322
- audioPlayerPage.steps.clickOnBackwardButton();
323
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:18/00:45');
324
- });
325
-
326
- it('When audio player is in paused state and the user clicks on \'Backward\' button, then playback should get backtracked by 10 seconds and both the progress bar and elapsed time should be updated accordingly', () => {
327
- audioPlayerPage.steps.pausePlayback();
328
- audioPlayerPage.steps.clickOnBackwardButton();
329
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:09/00:45');
330
- });
331
-
332
- it('When the elapsed time is less than 10 seconds and user clicks on backward button, then the playback should be backtracked to 0 and both the progress bar and elapsed time should be updated accordingly', () => {
333
- audioPlayerPage.steps.clickOnBackwardButton();
334
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:00/00:45');
335
- });
336
-
337
- it('When the difference between total time and elapsed time is less than 10 seconds and user clicks on forward button, then the playback should be forwarded to its completed state and both the progress bar and elapsed time should be updated accordingly', () => {
338
- audioPlayerPage.steps.seekProgressBarSliderToCenter();
339
- audioPlayerPage.steps.startPlayback();
340
- audioPlayerPage.steps.addWaitToPlayAudio(15000);
341
- audioPlayerPage.steps.clickOnForwardButton();
342
- audioPlayerPage.steps.verifyAudioPlaybackTimer('00:45/00:45');
343
- });
344
- });
345
- });