itemengine-cypress-automation 1.0.184 → 1.0.185
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +8 -5
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +28 -417
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +1 -29
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -11
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +0 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +1 -57
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +1 -2
- package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -49
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +1 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +1 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +4 -5
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +7 -6
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
- package/cypress/fixtures/constants.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
- package/cypress/fixtures/theme/ilc.json +18 -20
- package/cypress/pages/audioPlayerPage.js +504 -274
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
- package/cypress/pages/components/commonComponents.js +0 -1
- package/cypress/pages/components/draggableOptionContainer.js +0 -1
- package/cypress/pages/components/equationEditorFlyout.js +2 -3
- package/cypress/pages/components/essayResponseCommonComponents.js +2 -8
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -1
- package/cypress/pages/components/imageCanvasComponent.js +1 -2
- package/cypress/pages/components/index.js +0 -3
- package/cypress/pages/components/optionsWrapperComponent.js +2 -13
- package/cypress/pages/components/playbackControlsBaseComponent.js +13 -20
- package/cypress/pages/components/toolSettingsComponent.js +0 -6
- package/cypress/pages/contentBlocksPage.js +2 -18
- package/cypress/pages/createItemPage.js +8 -75
- package/cypress/pages/dialogBoxBase.js +2 -2
- package/cypress/pages/drawingResponsePage.js +4 -24
- package/cypress/pages/feedbackScalePage.js +0 -3
- package/cypress/pages/graphingPage.js +1 -19
- package/cypress/pages/gridFillPage.js +8 -25
- package/cypress/pages/index.js +1 -2
- package/cypress/pages/itemPreviewSettingsPage.js +0 -4
- package/cypress/pages/listOrderingPage.js +557 -435
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +1 -23
- package/cypress/pages/numberLinePage.js +132 -1370
- package/cypress/pages/rulerPage.js +2 -6
- package/cypress/pages/textSelectionPage.js +23 -461
- package/package.json +1 -1
- package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +0 -79
- package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +0 -345
- package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +0 -429
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +0 -162
- package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +0 -489
- package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +0 -313
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +0 -230
- package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +0 -124
- package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +0 -201
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -216
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -214
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -251
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +0 -52
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +0 -128
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -279
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +0 -109
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +0 -278
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -278
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +0 -335
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -250
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +0 -161
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +0 -216
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -252
- package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +0 -118
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +0 -243
- package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +0 -128
- package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +0 -155
- package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +0 -195
- package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +0 -78
- package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -194
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +0 -176
- package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +0 -112
- package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +0 -244
- package/cypress/e2e/ILC/NumberLine/LayoutSection.js +0 -181
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +0 -33
- package/cypress/e2e/ILC/NumberLine/numberLineSection.js +0 -46
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +0 -696
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -173
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +0 -183
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +0 -73
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +0 -204
- package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +0 -288
- package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +0 -153
- package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +0 -164
- package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +0 -120
- package/cypress/e2e/ILC/TextSelection/additionalSettings.js +0 -125
- package/cypress/e2e/ILC/TextSelection/headerSection.js +0 -73
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +0 -179
- package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +0 -89
- package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +0 -436
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +0 -277
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +0 -222
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +0 -260
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +0 -380
- package/cypress/pages/components/layoutSectionComponent.js +0 -1191
- package/cypress/pages/components/numberLineCommonComponent.js +0 -36
- package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +0 -46
- package/cypress/pages/numberLineLabelPage.js +0 -333
@@ -1,429 +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('Compact audio player style - Default : Preview tab functionality', () => {
|
7
|
-
before(() => {
|
8
|
-
cy.loginAs('admin');
|
9
|
-
});
|
10
|
-
|
11
|
-
describe('Compact playback preview - Default : Play and Stop buttons', () => {
|
12
|
-
abortEarlySetup();
|
13
|
-
before(() => {
|
14
|
-
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
15
|
-
audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
|
16
|
-
audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Compact');
|
17
|
-
audioPlayerPage.steps.switchToPreviewTab();
|
18
|
-
});
|
19
|
-
|
20
|
-
it('When the user switches to preview tab, then the \'Play\' button should be displayed and audio player should not be displayed', () => {
|
21
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playButton(), 'visible');
|
22
|
-
utilities.verifyInnerText(audioPlayerPage.playButton(), 'Play');
|
23
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.standardPreviewPlayerWrapper(), 'notExist');
|
24
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.audioPlayerToolbar(), 'notExist');
|
25
|
-
});
|
26
|
-
|
27
|
-
it('When the user clicks on \'Play\' button, then the audio player should be displayed and audio file should load and start playing. Timer should display the amount of audio that has been played and the total audio length in (mm:ss)/(mm:ss) format.', () => {
|
28
|
-
audioPlayerPage.steps.clickOnPlayButton();
|
29
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.standardPreviewPlayerWrapper(), 'notExist');
|
30
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.audioPlayerToolbar(), 'visible');
|
31
|
-
audioPlayerPage.steps.waitForPlaybackToBegin();
|
32
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:03/00:45');
|
33
|
-
});
|
34
|
-
|
35
|
-
it('The displayed playback player preview should have \'Backward\', \'Pause\', \'Forward\', \'Volume control\', \'Elapsed time\', \'Progress bar\', \'Total time\' and \'Playback speed\' buttons', () => {
|
36
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.standardPreviewPlayerWrapper(), 'notExist');
|
37
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.audioPlayerToolbar(), 'visible');
|
38
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.backwardButton(), 'visible');
|
39
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'visible');
|
40
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.forwardButton(), 'visible');
|
41
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlButton(), 'visible');
|
42
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackElapsedTime(), 'visible');
|
43
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.progressBar(), 'visible');
|
44
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackTotalTime(), 'visible');
|
45
|
-
utilities.verifyInnerText(audioPlayerPage.playbackTotalTime(), '00:45');
|
46
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackSpeedButton(), 'visible');
|
47
|
-
});
|
48
|
-
|
49
|
-
it('Accessibility of compact playback player in playing state', { tags: 'a11y' }, () => {
|
50
|
-
cy.checkAccessibility(audioPlayerPage.playbackPauseButton().parents('.audio-resource-preview-wrapper'));
|
51
|
-
});
|
52
|
-
|
53
|
-
it('When the user has clicked on Play button and audio player is displayed, then the above play button should change to \'Stop\' button', () => {
|
54
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playButton(), 'notExist');
|
55
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.stopButton(), 'visible');
|
56
|
-
utilities.verifyInnerText(audioPlayerPage.stopButton(), 'Stop');
|
57
|
-
});
|
58
|
-
|
59
|
-
it('User should be able to pause the playback', () => {
|
60
|
-
audioPlayerPage.steps.pausePlayback();
|
61
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:06/00:45');
|
62
|
-
});
|
63
|
-
|
64
|
-
it('CSS of stop button', { tags: 'css' }, () => {
|
65
|
-
utilities.verifyCSS(audioPlayerPage.stopButton(), {
|
66
|
-
'background-color': css.color.stopButtonBg,
|
67
|
-
'border': `1px solid ${css.color.stopButtonBorder}`
|
68
|
-
});
|
69
|
-
utilities.verifyCSS(audioPlayerPage.stopButton().find('p'), {
|
70
|
-
'color': css.color.whiteText,
|
71
|
-
'font-size': css.fontSize.default,
|
72
|
-
'font-weight': css.fontWeight.semibold
|
73
|
-
});
|
74
|
-
utilities.verifyCSS(audioPlayerPage.stopButton().find('path').eq(0), {
|
75
|
-
'color': css.color.defaultBackground
|
76
|
-
});
|
77
|
-
});
|
78
|
-
|
79
|
-
it('Accessibility of stop button', { tags: 'a11y' }, () => {
|
80
|
-
cy.checkAccessibility(audioPlayerPage.stopButton().parents('.audio-resource-preview-wrapper'));
|
81
|
-
});
|
82
|
-
|
83
|
-
it('When the user clicks on stop button, then the \'Play\' button should be displayed and audio player should not be displayed', () => {
|
84
|
-
audioPlayerPage.steps.clickOnStopButton();
|
85
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playButton(), 'visible');
|
86
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.standardPreviewPlayerWrapper(), 'notExist');
|
87
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.audioPlayerToolbar(), 'notExist');
|
88
|
-
});
|
89
|
-
|
90
|
-
it('CSS of play button', { tags: 'css' }, () => {
|
91
|
-
utilities.verifyCSS(audioPlayerPage.playButton(), {
|
92
|
-
'background-color': css.color.transparent,
|
93
|
-
'border': `1px solid ${css.color.secondaryBtnBorder}`
|
94
|
-
});
|
95
|
-
utilities.verifyCSS(audioPlayerPage.playButton().find('p'), {
|
96
|
-
'color': css.color.secondaryBtn,
|
97
|
-
'font-size': css.fontSize.default,
|
98
|
-
'font-weight': css.fontWeight.semibold
|
99
|
-
});
|
100
|
-
utilities.verifyCSS(audioPlayerPage.playButton().find('path').eq(0), {
|
101
|
-
'color': css.color.secondaryBtn
|
102
|
-
});
|
103
|
-
});
|
104
|
-
|
105
|
-
it('Accessibility of play button', { tags: 'a11y' }, () => {
|
106
|
-
cy.checkAccessibility(audioPlayerPage.playButton().parents('.audio-resource-preview-wrapper'));
|
107
|
-
});
|
108
|
-
|
109
|
-
it('When user clicks on \'Play\' button again, then the audio player should be displayed again in default state and start automatically playing again', () => {
|
110
|
-
audioPlayerPage.steps.clickOnPlayButton();
|
111
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:00/00:45');
|
112
|
-
audioPlayerPage.steps.waitForPlaybackToBegin();
|
113
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:03/00:45');
|
114
|
-
});
|
115
|
-
|
116
|
-
it('When the audio playback is completed, the \'Stop\' button and the audio player should be displayed', () => {
|
117
|
-
audioPlayerPage.steps.addWaitToPlayAudio(20000);
|
118
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:45/00:45');
|
119
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.stopButton(), 'visible');
|
120
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playButton(), 'notExist');
|
121
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.audioPlayerToolbar(), 'visible');
|
122
|
-
audioPlayerPage.steps.verifyProgressBarSliderPosition(99);
|
123
|
-
});
|
124
|
-
});
|
125
|
-
|
126
|
-
describe('Compact playback preview - Default : Play, pause and seek', () => {
|
127
|
-
let actualAudioSeekedInPercent = 50
|
128
|
-
abortEarlySetup();
|
129
|
-
before(() => {
|
130
|
-
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
131
|
-
audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
|
132
|
-
audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Compact');
|
133
|
-
audioPlayerPage.steps.switchToPreviewTab();
|
134
|
-
audioPlayerPage.steps.clickOnPlayButton();
|
135
|
-
audioPlayerPage.steps.waitForPlaybackToBegin();
|
136
|
-
});
|
137
|
-
|
138
|
-
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', () => {
|
139
|
-
audioPlayerPage.playbackPauseButton()
|
140
|
-
.verifyTooltip('Pause');
|
141
|
-
});
|
142
|
-
|
143
|
-
it('CSS of \'Preview\' section if playback is initiated', { tags: 'css' }, () => {
|
144
|
-
utilities.verifyCSS(audioPlayerPage.playbackPauseButton().find('#pause'), {
|
145
|
-
'stroke': css.color.secondaryBtnActive,
|
146
|
-
});
|
147
|
-
utilities.verifyCSS(audioPlayerPage.playbackElapsedTime(), {
|
148
|
-
'color': css.color.playbackTime,
|
149
|
-
'font-size': css.fontSize.small,
|
150
|
-
'font-weight': css.fontWeight.bold
|
151
|
-
});
|
152
|
-
utilities.verifyCSS(audioPlayerPage.playbackTotalTime(), {
|
153
|
-
'color': css.color.playbackTime,
|
154
|
-
'font-size': css.fontSize.small,
|
155
|
-
'font-weight': css.fontWeight.bold
|
156
|
-
});
|
157
|
-
utilities.verifyCSS(audioPlayerPage.progressBar().find('.MuiSlider-rail'), {
|
158
|
-
'background-color': css.color.progressBarRemainingFill
|
159
|
-
});
|
160
|
-
utilities.verifyCSS(audioPlayerPage.progressBar().find('.MuiSlider-track'), {
|
161
|
-
'background-color': css.color.progressBarElapsedFill
|
162
|
-
});
|
163
|
-
});
|
164
|
-
|
165
|
-
it('Accessibility of \'Preview\' section if playback is initiated', { tags: 'a11y' }, () => {
|
166
|
-
cy.checkAccessibility(audioPlayerPage.playbackPauseButton().parents('.audio-resource-preview-wrapper'));
|
167
|
-
});
|
168
|
-
|
169
|
-
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', () => {
|
170
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:10/00:45');
|
171
|
-
audioPlayerPage.steps.pauseAndVerifyProgressBarSliderPosition();
|
172
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:10/00:45');
|
173
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
|
174
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'notExist');
|
175
|
-
});
|
176
|
-
|
177
|
-
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', () => {
|
178
|
-
audioPlayerPage.playbackPlayButton()
|
179
|
-
.verifyTooltip('Play');
|
180
|
-
});
|
181
|
-
|
182
|
-
it('Accessibility of \'Preview\' section if if playback is paused', { tags: 'a11y' }, () => {
|
183
|
-
cy.checkAccessibility(audioPlayerPage.playbackPlayButton().parents('.audio-resource-preview-wrapper'));
|
184
|
-
});
|
185
|
-
|
186
|
-
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.', () => {
|
187
|
-
audioPlayerPage.steps.startPlayback();
|
188
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'visible');
|
189
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'notExist');
|
190
|
-
});
|
191
|
-
|
192
|
-
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', () => {
|
193
|
-
audioPlayerPage.steps.seekProgressBarSliderToCenter();
|
194
|
-
audioPlayerPage.steps.addWaitToPlayAudio(1000);
|
195
|
-
audioPlayerPage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
|
196
|
-
});
|
197
|
-
|
198
|
-
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', () => {
|
199
|
-
audioPlayerPage.steps.pausePlayback();
|
200
|
-
audioPlayerPage.steps.seekProgressBarSliderToCenter();
|
201
|
-
audioPlayerPage.steps.startPlayback();
|
202
|
-
audioPlayerPage.steps.addWaitToPlayAudio(3000);
|
203
|
-
audioPlayerPage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
|
204
|
-
});
|
205
|
-
|
206
|
-
it('When the audio playback is completed, the \'Pause\' button should get replaced with \'Play\' button', () => {
|
207
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:45/00:45');
|
208
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
|
209
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'notExist');
|
210
|
-
audioPlayerPage.steps.verifyProgressBarSliderPosition(99);
|
211
|
-
});
|
212
|
-
|
213
|
-
it('CSS of progress bar in hover state', { tags: 'css' }, () => {
|
214
|
-
audioPlayerPage.steps.hoverOnProgressBarSlider();
|
215
|
-
utilities.verifyCSS(audioPlayerPage.progressBarSlider().parents('span[class*="MuiSlider-thumb"]'), {
|
216
|
-
'box-shadow': `${css.color.progressBarSliderHoverBackground} 0px 0px 0px 8px`
|
217
|
-
});
|
218
|
-
});
|
219
|
-
});
|
220
|
-
|
221
|
-
describe('Compact playback preview - Default : Volume control', () => {
|
222
|
-
abortEarlySetup();
|
223
|
-
before(() => {
|
224
|
-
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
225
|
-
audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
|
226
|
-
audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Compact');
|
227
|
-
audioPlayerPage.steps.switchToPreviewTab();
|
228
|
-
audioPlayerPage.steps.clickOnPlayButton();
|
229
|
-
audioPlayerPage.steps.waitForPlaybackToBegin();
|
230
|
-
});
|
231
|
-
|
232
|
-
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', () => {
|
233
|
-
audioPlayerPage.steps.hoverOnVolumeControlButton();
|
234
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlSlider(), 'visible');
|
235
|
-
audioPlayerPage.steps.verifyVolumeOfPlaybackPlayer('100');
|
236
|
-
utilities.hoverAwayFromElement();
|
237
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlSlider(), 'notExist');
|
238
|
-
});
|
239
|
-
|
240
|
-
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', () => {
|
241
|
-
audioPlayerPage.steps.hoverOnVolumeControlButton();
|
242
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'visible');
|
243
|
-
utilities.verifyInnerText(audioPlayerPage.tooltipText(), 'Mute');
|
244
|
-
utilities.hoverAwayFromElement();
|
245
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'notExist');
|
246
|
-
});
|
247
|
-
|
248
|
-
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', () => {
|
249
|
-
audioPlayerPage.steps.hoverOnVolumeControlButton();
|
250
|
-
audioPlayerPage.steps.hoverOnVolumeControlSlider();
|
251
|
-
audioPlayerPage.steps.hoverAwayFromVolumeControlButton();
|
252
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'visible');
|
253
|
-
utilities.verifyInnerText(audioPlayerPage.tooltipText(), 'Volume control');
|
254
|
-
utilities.hoverAwayFromElement();
|
255
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlSlider(), 'notExist');
|
256
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'notExist');
|
257
|
-
});
|
258
|
-
|
259
|
-
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', () => {
|
260
|
-
audioPlayerPage.steps.clickOnVolumeButton();
|
261
|
-
audioPlayerPage.steps.hoverOnVolumeControlButton();
|
262
|
-
audioPlayerPage.steps.verifyVolumeOfPlaybackPlayer('0');
|
263
|
-
utilities.hoverAwayFromElement();
|
264
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlSlider(), 'notExist');
|
265
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.muteVolumeIcon(), 'visible');
|
266
|
-
utilities.hoverAwayFromElement();
|
267
|
-
});
|
268
|
-
|
269
|
-
it('When the user hovers on muted \'Volume control\' button, \'Unmute\' text should be displayed in tooltip', () => {
|
270
|
-
audioPlayerPage.steps.hoverOnVolumeControlButton();
|
271
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'visible');
|
272
|
-
utilities.verifyInnerText(audioPlayerPage.tooltipText(), 'Unmute');
|
273
|
-
utilities.hoverAwayFromElement();
|
274
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.tooltipText(), 'notExist');
|
275
|
-
});
|
276
|
-
|
277
|
-
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', () => {
|
278
|
-
audioPlayerPage.steps.clickOnVolumeButton();
|
279
|
-
audioPlayerPage.steps.hoverOnVolumeControlButton();
|
280
|
-
audioPlayerPage.steps.verifyVolumeOfPlaybackPlayer('100');
|
281
|
-
audioPlayerPage.steps.verifyUnmutedVolumeIconIsDisplayedInPreviewTab();
|
282
|
-
});
|
283
|
-
|
284
|
-
it('CSS of volume control section', { tags: 'css' }, () => {
|
285
|
-
utilities.verifyCSS(audioPlayerPage.volumeControlSlider(), {
|
286
|
-
'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`
|
287
|
-
});
|
288
|
-
audioPlayerPage.unmutedVolumeIcon()
|
289
|
-
.verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
|
290
|
-
});
|
291
|
-
|
292
|
-
it('Accessibility of volume control section', { tags: 'a11y' }, () => {
|
293
|
-
cy.checkAccessibility(audioPlayerPage.volumeControlSlider());
|
294
|
-
cy.checkAccessibility(audioPlayerPage.playbackPauseButton().parents('.audio-resource-preview-wrapper'));
|
295
|
-
});
|
296
|
-
|
297
|
-
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', () => {
|
298
|
-
audioPlayerPage.steps.setVolumeSliderForPlayback(0);
|
299
|
-
audioPlayerPage.steps.verifyVolumeOfPlaybackPlayer('0');
|
300
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.muteVolumeIcon(), 'visible');
|
301
|
-
});
|
302
|
-
|
303
|
-
it('CSS of volume control section in muted state', { tags: 'css' }, () => {
|
304
|
-
utilities.verifyCSS(audioPlayerPage.volumeControlSlider(), {
|
305
|
-
'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`
|
306
|
-
});
|
307
|
-
audioPlayerPage.muteVolumeIcon()
|
308
|
-
.verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
|
309
|
-
});
|
310
|
-
|
311
|
-
it('Accessibility of volume control section in muted state', { tags: 'a11y' }, () => {
|
312
|
-
cy.checkAccessibility(audioPlayerPage.volumeControlSlider());
|
313
|
-
cy.checkAccessibility(audioPlayerPage.playbackPauseButton().parents('.audio-resource-preview-wrapper'));
|
314
|
-
});
|
315
|
-
|
316
|
-
it('User should be able to unmute the audio by dragging the volume control higher again', () => {
|
317
|
-
audioPlayerPage.steps.setVolumeSliderForPlayback(99);
|
318
|
-
audioPlayerPage.steps.verifyVolumeOfPlaybackPlayer('100');
|
319
|
-
audioPlayerPage.steps.verifyUnmutedVolumeIconIsDisplayedInPreviewTab();
|
320
|
-
});
|
321
|
-
});
|
322
|
-
|
323
|
-
describe('Compact playback preview - Default : Playback speed', () => {
|
324
|
-
const playbackSpeedOptions = ['0.5', '1', '1.25', '1.5', '1.75', '2'];
|
325
|
-
abortEarlySetup();
|
326
|
-
before(() => {
|
327
|
-
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
328
|
-
audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
|
329
|
-
audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Compact');
|
330
|
-
audioPlayerPage.steps.switchToPreviewTab();
|
331
|
-
audioPlayerPage.steps.clickOnPlayButton();
|
332
|
-
audioPlayerPage.steps.waitForPlaybackToBegin();
|
333
|
-
});
|
334
|
-
|
335
|
-
audioPlayerPage.tests.verifyPlaybackSpeedContents(playbackSpeedOptions);
|
336
|
-
|
337
|
-
for (let index = 0; index < playbackSpeedOptions.length; index++) {
|
338
|
-
it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the audio playback speed should be changed accordingly`, () => {
|
339
|
-
audioPlayerPage.steps.resetQuestionPreview();
|
340
|
-
audioPlayerPage.steps.clickOnPlayButton();
|
341
|
-
audioPlayerPage.steps.hoverOnPlaybackSpeedButton();
|
342
|
-
audioPlayerPage.steps.selectPlaybackSpeed(`${playbackSpeedOptions[index]}x`);
|
343
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackSpeedOption(), 'notExist');
|
344
|
-
audioPlayerPage.steps.waitForPlaybackToBegin();
|
345
|
-
audioPlayerPage.steps.addWaitToPlayAudio(4000);
|
346
|
-
audioPlayerPage.steps.pausePlayback();
|
347
|
-
utilities.verifyInnerText(audioPlayerPage.playbackElapsedTime(), `00:0${1 + (4 * playbackSpeedOptions[index])}`);
|
348
|
-
});
|
349
|
-
};
|
350
|
-
});
|
351
|
-
|
352
|
-
describe('Compact playback preview - Default : Backward and Forward buttons', () => {
|
353
|
-
abortEarlySetup();
|
354
|
-
before(() => {
|
355
|
-
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
356
|
-
audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
|
357
|
-
audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Compact');
|
358
|
-
audioPlayerPage.steps.switchToPreviewTab();
|
359
|
-
audioPlayerPage.steps.clickOnPlayButton();
|
360
|
-
audioPlayerPage.steps.waitForPlaybackToBegin();
|
361
|
-
});
|
362
|
-
|
363
|
-
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', () => {
|
364
|
-
audioPlayerPage.backwardButton()
|
365
|
-
.verifyTooltip('Backward Button');
|
366
|
-
});
|
367
|
-
|
368
|
-
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', () => {
|
369
|
-
audioPlayerPage.forwardButton()
|
370
|
-
.verifyTooltip('Forward Button');
|
371
|
-
});
|
372
|
-
|
373
|
-
it('CSS of \'Backward\' and \'Forward\' button in default and hover state', { tags: 'css' }, () => {
|
374
|
-
utilities.verifyCSS(audioPlayerPage.backwardButton().find('path').eq(1), {
|
375
|
-
'stroke': css.color.activeButtons
|
376
|
-
});
|
377
|
-
utilities.verifyCSS(audioPlayerPage.forwardButton().find('path').eq(1), {
|
378
|
-
'stroke': css.color.activeButtons
|
379
|
-
});
|
380
|
-
utilities.triggerMouseover(audioPlayerPage.backwardButton());
|
381
|
-
utilities.verifyCSS(audioPlayerPage.backwardButton(), {
|
382
|
-
'background-color': css.color.selectToolbarOptionBg
|
383
|
-
});
|
384
|
-
utilities.triggerMouseout(audioPlayerPage.backwardButton());
|
385
|
-
utilities.triggerMouseover(audioPlayerPage.forwardButton());
|
386
|
-
utilities.verifyCSS(audioPlayerPage.forwardButton(), {
|
387
|
-
'background-color': css.color.selectToolbarOptionBg
|
388
|
-
});
|
389
|
-
utilities.triggerMouseout(audioPlayerPage.forwardButton());
|
390
|
-
});
|
391
|
-
|
392
|
-
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', () => {
|
393
|
-
audioPlayerPage.steps.clickOnForwardButton();
|
394
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:15/00:45');
|
395
|
-
});
|
396
|
-
|
397
|
-
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', () => {
|
398
|
-
audioPlayerPage.steps.pausePlayback();
|
399
|
-
audioPlayerPage.steps.clickOnForwardButton();
|
400
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:25/00:45');
|
401
|
-
});
|
402
|
-
|
403
|
-
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', () => {
|
404
|
-
audioPlayerPage.steps.startPlayback();
|
405
|
-
audioPlayerPage.steps.addWaitToPlayAudio(3000);
|
406
|
-
audioPlayerPage.steps.clickOnBackwardButton();
|
407
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:18/00:45');
|
408
|
-
});
|
409
|
-
|
410
|
-
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', () => {
|
411
|
-
audioPlayerPage.steps.pausePlayback();
|
412
|
-
audioPlayerPage.steps.clickOnBackwardButton();
|
413
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:08/00:45');
|
414
|
-
});
|
415
|
-
|
416
|
-
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', () => {
|
417
|
-
audioPlayerPage.steps.clickOnBackwardButton();
|
418
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:00/00:45');
|
419
|
-
});
|
420
|
-
|
421
|
-
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', () => {
|
422
|
-
audioPlayerPage.steps.seekProgressBarSliderToCenter();
|
423
|
-
audioPlayerPage.steps.startPlayback();
|
424
|
-
audioPlayerPage.steps.addWaitToPlayAudio(15000);
|
425
|
-
audioPlayerPage.steps.clickOnForwardButton();
|
426
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:45/00:45');
|
427
|
-
});
|
428
|
-
});
|
429
|
-
});
|
@@ -1,162 +0,0 @@
|
|
1
|
-
import { audioPlayerPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
2
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
-
import utilities from "../../../support/helpers/utilities";
|
4
|
-
const css = Cypress.env('css');
|
5
|
-
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
6
|
-
const views = utilities.getViews(previewContentViews);
|
7
|
-
var itemReferenceID = "";
|
8
|
-
|
9
|
-
describe('Preview tab contents for all views', () => {
|
10
|
-
before(() => {
|
11
|
-
cy.loginAs('admin');
|
12
|
-
});
|
13
|
-
|
14
|
-
//failing in student view due to https://redmine.zeuslearning.com/issues/568592
|
15
|
-
views.forEach((view) => {
|
16
|
-
describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
|
17
|
-
let actualAudioSeekedInPercent = 50
|
18
|
-
abortEarlySetup();
|
19
|
-
before(() => {
|
20
|
-
switch (view) {
|
21
|
-
case 'Question preview':
|
22
|
-
audioPlayerPage.steps.navigateToCreateResource('audio player');
|
23
|
-
audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
|
24
|
-
audioPlayerPage.steps.addInputToAudioDescriptionInputField('Sample audio description');
|
25
|
-
audioPlayerPage.steps.selectTypeInTranscriptRadioButton();
|
26
|
-
audioPlayerPage.steps.enterTextInTranscriptInputField('Sample transcript');
|
27
|
-
audioPlayerPage.steps.switchToPreviewTab();
|
28
|
-
break;
|
29
|
-
case 'Item view':
|
30
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
31
|
-
break;
|
32
|
-
case 'Item preview':
|
33
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
34
|
-
audioPlayerPage.steps.switchToPreviewTab();
|
35
|
-
break;
|
36
|
-
case 'Student view':
|
37
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
38
|
-
break;
|
39
|
-
case 'Grading view':
|
40
|
-
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
41
|
-
break;
|
42
|
-
case 'Correct answer view':
|
43
|
-
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
44
|
-
break;
|
45
|
-
default:
|
46
|
-
throw new Error('Invalid view');
|
47
|
-
}
|
48
|
-
});
|
49
|
-
|
50
|
-
after(() => {
|
51
|
-
if (view === 'Question preview') {
|
52
|
-
audioPlayerPage.steps.clickOnSaveQuestionButton();
|
53
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
54
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
55
|
-
}
|
56
|
-
if (view === 'Student view') {
|
57
|
-
studentViewPage.steps.submitResponse();
|
58
|
-
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
59
|
-
}
|
60
|
-
});
|
61
|
-
|
62
|
-
it('When the user switches to preview tab, \'Backward\', \'Play\', \'Forward\', \'Volume control\', \'Elapsed time\', \'Progress bar\', \'Total time\', \'Playback speed\' and \'Add pin\' buttons should be displayed', () => {
|
63
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.backwardButton(), 'visible');
|
64
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
|
65
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.forwardButton(), 'visible');
|
66
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.volumeControlButton(), 'visible');
|
67
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackElapsedTime(), 'visible');
|
68
|
-
utilities.verifyInnerText(audioPlayerPage.playbackElapsedTime(), '00:00');
|
69
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.progressBar(), 'visible');
|
70
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackTotalTime(), 'visible');
|
71
|
-
utilities.verifyInnerText(audioPlayerPage.playbackTotalTime(), '00:00');
|
72
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackSpeedButton(), 'visible');
|
73
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.addPinButton(), 'visible');
|
74
|
-
});
|
75
|
-
|
76
|
-
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.', () => {
|
77
|
-
audioPlayerPage.steps.startPlayback();
|
78
|
-
audioPlayerPage.steps.waitForPlaybackToBegin();
|
79
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:03/00:45');
|
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.verifyAudioPlaybackTimer('00:10/00:45');
|
84
|
-
audioPlayerPage.steps.pauseAndVerifyProgressBarSliderPosition();
|
85
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:10/00:45');
|
86
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
|
87
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'notExist');
|
88
|
-
});
|
89
|
-
|
90
|
-
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.', () => {
|
91
|
-
audioPlayerPage.steps.startPlayback();
|
92
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'visible');
|
93
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'notExist');
|
94
|
-
});
|
95
|
-
|
96
|
-
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', () => {
|
97
|
-
audioPlayerPage.steps.seekProgressBarSliderToCenter();
|
98
|
-
audioPlayerPage.steps.addWaitToPlayAudio(1000);
|
99
|
-
audioPlayerPage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
|
100
|
-
});
|
101
|
-
|
102
|
-
it('When the audio playback is completed, the \'Pause\' button should get replaced with \'Play\' button', () => {
|
103
|
-
audioPlayerPage.steps.verifyAudioPlaybackTimer('00:45/00:45');
|
104
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPlayButton(), 'visible');
|
105
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackPauseButton(), 'notExist');
|
106
|
-
audioPlayerPage.steps.verifyProgressBarSliderPosition(99);
|
107
|
-
});
|
108
|
-
|
109
|
-
it('The added audio description and transcript should be displayed in preview tab', () => {
|
110
|
-
utilities.verifyInnerText(audioPlayerPage.descriptionPreviewTab(), 'Sample audio description');
|
111
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.playbackSpeedButton(), 'visible');
|
112
|
-
audioPlayerPage.steps.clickOnTranscriptButton();
|
113
|
-
utilities.verifyInnerText(audioPlayerPage.transcriptContentPreviewTab(), 'Sample transcript');
|
114
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.transcriptContentPreviewTab(), 'visible');
|
115
|
-
});
|
116
|
-
|
117
|
-
it('CSS of standard recording interface in Preview tab', { tags: 'css' }, () => {
|
118
|
-
utilities.verifyCSS(audioPlayerPage.playbackElapsedTime(), {
|
119
|
-
'color': css.color.playbackTime,
|
120
|
-
'font-size': css.fontSize.small,
|
121
|
-
'font-weight': css.fontWeight.bold
|
122
|
-
});
|
123
|
-
utilities.verifyCSS(audioPlayerPage.playbackTotalTime(), {
|
124
|
-
'color': css.color.playbackTime,
|
125
|
-
'font-size': css.fontSize.small,
|
126
|
-
'font-weight': css.fontWeight.bold
|
127
|
-
});
|
128
|
-
utilities.verifyCSS(audioPlayerPage.backwardButton().find('path').eq(1), {
|
129
|
-
'stroke': css.color.activeButtons
|
130
|
-
});
|
131
|
-
utilities.verifyCSS(audioPlayerPage.playbackPlayButton().find('path').eq(0), {
|
132
|
-
'stroke': css.color.activeButtons
|
133
|
-
});
|
134
|
-
utilities.verifyCSS(audioPlayerPage.forwardButton().find('path').eq(1), {
|
135
|
-
'stroke': css.color.activeButtons
|
136
|
-
});
|
137
|
-
utilities.verifyCSS(audioPlayerPage.playbackSpeedButton().find('path').eq(1), {
|
138
|
-
'fill': css.color.activeButtons
|
139
|
-
});
|
140
|
-
audioPlayerPage.transcriptButton()
|
141
|
-
.verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
|
142
|
-
utilities.verifyCSS(audioPlayerPage.transcriptButton(), {
|
143
|
-
'background-color': css.color.selectToolbarOptionBg
|
144
|
-
});
|
145
|
-
utilities.verifyCSS(audioPlayerPage.descriptionPreviewTab(), {
|
146
|
-
'color': css.color.text,
|
147
|
-
'font-size': css.fontSize.default,
|
148
|
-
'font-weight': css.fontWeight.regular
|
149
|
-
});
|
150
|
-
utilities.verifyCSS(audioPlayerPage.transcriptContentPreviewTab(), {
|
151
|
-
'color': css.color.text,
|
152
|
-
'font-size': css.fontSize.default,
|
153
|
-
'font-weight': css.fontWeight.regular
|
154
|
-
});
|
155
|
-
});
|
156
|
-
|
157
|
-
it('Accessibility of standard recording interface in Preview tab', { tags: 'a11y' }, () => {
|
158
|
-
cy.checkAccessibility(audioPlayerPage.descriptionPreviewTab().parents('.audio-resource-preview-wrapper'));
|
159
|
-
});
|
160
|
-
});
|
161
|
-
});
|
162
|
-
});
|