itemengine-cypress-automation 1.0.183 → 1.0.184
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +79 -0
- package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +345 -0
- package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +429 -0
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
- package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +489 -0
- package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +313 -0
- 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 +5 -8
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +417 -28
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
- 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 +1 -0
- 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 +3 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
- 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 +11 -3
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +230 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +201 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +251 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +128 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +279 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +109 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +278 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +278 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +335 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +250 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +161 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +216 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +252 -0
- package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +118 -0
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
- package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +155 -0
- package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +195 -0
- package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +78 -0
- package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
- package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +112 -0
- package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +244 -0
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/LayoutSection.js +181 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +57 -1
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +33 -0
- package/cypress/e2e/ILC/NumberLine/numberLineSection.js +46 -0
- 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 +2 -1
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +696 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +173 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +183 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +73 -0
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +204 -0
- package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +288 -0
- package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +153 -0
- package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +164 -0
- package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +120 -0
- package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
- 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 +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
- package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +6 -7
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +179 -0
- package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
- package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
- 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 +20 -18
- package/cypress/pages/audioPlayerPage.js +274 -504
- 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 +1 -0
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/equationEditorFlyout.js +3 -2
- package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
- package/cypress/pages/components/imageCanvasComponent.js +2 -1
- package/cypress/pages/components/index.js +3 -0
- package/cypress/pages/components/layoutSectionComponent.js +1191 -0
- package/cypress/pages/components/numberLineCommonComponent.js +36 -0
- package/cypress/pages/components/optionsWrapperComponent.js +13 -2
- package/cypress/pages/components/playbackControlsBaseComponent.js +20 -13
- package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
- package/cypress/pages/components/toolSettingsComponent.js +6 -0
- package/cypress/pages/contentBlocksPage.js +18 -2
- package/cypress/pages/createItemPage.js +75 -8
- package/cypress/pages/dialogBoxBase.js +2 -2
- package/cypress/pages/drawingResponsePage.js +24 -4
- package/cypress/pages/feedbackScalePage.js +3 -0
- package/cypress/pages/graphingPage.js +19 -1
- package/cypress/pages/gridFillPage.js +25 -8
- package/cypress/pages/index.js +2 -1
- package/cypress/pages/itemPreviewSettingsPage.js +4 -0
- package/cypress/pages/listOrderingPage.js +435 -557
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +23 -1
- package/cypress/pages/numberLineLabelPage.js +333 -0
- package/cypress/pages/numberLinePage.js +1370 -132
- package/cypress/pages/rulerPage.js +6 -2
- package/cypress/pages/textSelectionPage.js +461 -23
- package/package.json +1 -1
@@ -1,518 +1,319 @@
|
|
1
|
-
import constants from "../fixtures/constants";
|
2
1
|
import utilities from "../support/helpers/utilities";
|
2
|
+
import { commonComponents, createQuestionBasePage, playbackControlsBaseComponent } from "./components";
|
3
3
|
import { dialogBoxBase } from "./dialogBoxBase";
|
4
|
-
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
5
|
-
import { createQuestionBasePage, commonComponents, ckEditorToolbar, equationEditorFlyout, playbackControlsBaseComponent } from "./components"
|
6
4
|
|
7
5
|
const selectors = {
|
8
|
-
...commonComponents,
|
9
|
-
...ckEditorToolbar,
|
10
6
|
...playbackControlsBaseComponent,
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
...commonComponents,
|
8
|
+
...dialogBoxBase,
|
9
|
+
uploadAudioFileLabel: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"] .ngie-radio-label').eq(0),
|
10
|
+
uploadAudioFileRadioButton: () => cy.get('.ngie-radio-btn input').eq(0),
|
11
|
+
addAudioURLLabel: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"] .ngie-radio-label').eq(1),
|
12
|
+
addAudioURLRadioButton: () => cy.get('.ngie-radio-btn input').eq(1),
|
13
|
+
uploadAudioFileUploadLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(0),
|
14
|
+
uploadAudioFileNameLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(1),
|
15
|
+
deleteAudioFileButton: () => cy.get('[aria-label*="Delete audio file]'),
|
16
|
+
sourceUrlLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(0),
|
16
17
|
sourceUrlInputField: () => cy.get('input[aria-label="Source URL"]'),
|
17
|
-
|
18
|
+
uploadAudioChooseFileButton: () => cy.get('.choose-file-upload-button'),
|
19
|
+
uploadAudioNoFileChosenLabel: () => cy.get('[aria-label="No file chosen"]').eq(0),
|
18
20
|
uploadedFileNameLabel: () => cy.get('.selected-file'),
|
19
|
-
|
20
|
-
fileNameLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(1),
|
21
|
-
chooseFileButton: () => cy.get('.choose-file-button'),
|
22
|
-
fileUploadProgressBar: () => cy.get('[class*="AudioPlayerstyles__ProgressBar-"]'),
|
21
|
+
audioFileUploadProgressBar: () => cy.get('[class*="AudioPlayerstyles__ProgressBar-"]').eq(0),
|
23
22
|
inputTypeFile: () => cy.get('input[type="file"]'),
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
23
|
+
audioPlayerStyleLabel: () => cy.get('.player-style-label'),
|
24
|
+
standardStyleToggleButton: () => cy.get('[data-ngie-testid="standard-toggle-button"]'),
|
25
|
+
barStyleToggleButton: () => cy.get('[data-ngie-testid="bar-toggle-button"]'),
|
26
|
+
compactStyleToggleButton: () => cy.get('[data-ngie-testid="compact-toggle-button"]'),
|
27
|
+
standardStyleToggleButtonLabel: () => cy.get('[data-ngie-testid="standard-toggle-button"] .ngie-toggle-button-label'),
|
28
|
+
barStyleToggleButtonLabel: () => cy.get('[data-ngie-testid="bar-toggle-button"] .ngie-toggle-button-label'),
|
29
|
+
compactStyleToggleButtonLabel: () => cy.get('[data-ngie-testid="compact-toggle-button"] .ngie-toggle-button-label'),
|
30
|
+
compactPlayerOptionsLabel: () => cy.get('.options-label'),
|
31
|
+
defaultPlayerOptionButton: () => cy.get('[data-ngie-testid="default-toggle-button"]'),
|
32
|
+
textPlayerOptionButton: () => cy.get('[data-ngie-testid="text-toggle-button"]'),
|
33
|
+
imagePlayerOptionButton: () => cy.get('[data-ngie-testid="image-toggle-button"]'),
|
34
|
+
iconPlayerOptionButton: () => cy.get('[data-ngie-testid="icon-toggle-button"]'),
|
35
|
+
audioDescriptionInputField: () => cy.get('.description-wrapper [role="textbox"]'),
|
36
|
+
uploadTranscriptFileLabel: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"] .ngie-radio-label').eq(2),
|
37
|
+
uploadTranscriptFileRadioButton: () => cy.get('.ngie-radio-btn input').eq(2),
|
38
|
+
typeInTranscriptLabel: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"] .ngie-radio-label').eq(3),
|
39
|
+
typeInTranscriptRadioButton: () => cy.get('.ngie-radio-btn input').eq(3),
|
33
40
|
transcriptInputField: () => cy.get('[role="textbox"][title="Transcript"]'),
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
advancedPlayerProgressBarButton: () => cy.get('[data-ngie-testid="progress-bar-toggle-button"]'),
|
43
|
-
advancedPlayerVolumeControlButton: () => cy.get('[data-ngie-testid="volume-control-toggle-button"]'),
|
44
|
-
allowStudentsToDownloadAudioLabel: () => cy.get('[data-ngie-testid="allow-students-to-download-the-audio-checkbox"] .MuiFormControlLabel-label'),
|
45
|
-
allowStudentsToDownloadAudioCheckbox: () => cy.get('[data-ngie-testid="allow-students-to-download-the-audio-checkbox"] input'),
|
46
|
-
selectedButtonIcon: () => cy.get('.ngie-toggle-button-tick-icon'),
|
47
|
-
accordionChevronIcon: () => cy.get('[class*="expandIcon"]'),
|
48
|
-
accordionButtonLabel: () => cy.get('.customized_button_label'),
|
49
|
-
audioDownloadButton: () => cy.get('.audio-download-icon-wr'),
|
50
|
-
playbackLimitHelpText: () => cy.get('.playback-limit-remaining'),
|
51
|
-
playbackElapsedTime: () => cy.get('.audio-player-current-time'),
|
52
|
-
playbackTotalTime: () => cy.get('.audio-player-duration'),
|
41
|
+
deleteTranscriptButton: () => cy.get('[aria-label*="Delete transcript]'),
|
42
|
+
|
43
|
+
//Preview tab
|
44
|
+
backwardButton: () => cy.get('.forward-backward-buttons-wrapper [aria-label*="Backward"]'),
|
45
|
+
forwardButton: () => cy.get('.forward-backward-buttons-wrapper [aria-label*="Forward"]'),
|
46
|
+
playbackElapsedTime: () => cy.get('.audio-player-current-time').eq(0),
|
47
|
+
playbackTotalTime: () => cy.get('.audio-player-duration').eq(0),
|
48
|
+
addPinButton: () => cy.get('.audio-add-pin-wr button'),
|
53
49
|
audioFileSrc: () => cy.get('.audio-player-toolbar audio'),
|
54
|
-
titlePreviewTab: () => cy.get('.audio-resource-title'),
|
55
50
|
descriptionPreviewTab: () => cy.get('.audio-resource-preview-wrapper .question-text-wrapper'),
|
56
51
|
transcriptTitlePreviewTab: () => cy.get('.transcript-title'),
|
57
52
|
transcriptPrintButton: () => cy.get('button[aria-label="Print preview"]'),
|
58
53
|
transcriptModalCloseButton: () => cy.get('button[aria-label="Close"]'),
|
59
|
-
transcriptContentPreviewTab: () => cy.get('
|
54
|
+
transcriptContentPreviewTab: () => cy.get('.transcript-content'),
|
60
55
|
transcriptButton: () => cy.get('button[aria-label="Transcript"]'),
|
61
56
|
transcriptModal: () => cy.get('[class*="Transcriptstyles__TranscriptWrapper"]'),
|
62
|
-
|
63
|
-
|
64
|
-
|
57
|
+
standardPreviewPlayerWrapper: () => cy.get('.standard-audio-resource-preview'),
|
58
|
+
audioPlayerToolbar: () => cy.get('.audio-player-toolbar'),
|
59
|
+
compactPlayerPlayButton: () => cy.get(' button'),
|
60
|
+
playButton: () => cy.get('.audio-player-not-visible button'),
|
61
|
+
stopButton: () => cy.get('.audio-player-visible button'),
|
65
62
|
}
|
66
63
|
|
67
64
|
const steps = {
|
68
|
-
...createQuestionBasePage.steps,
|
69
|
-
...ckEditorToolbar.steps,
|
70
|
-
...equationEditorFlyout.steps,
|
71
|
-
...commonComponents.steps,
|
72
65
|
...playbackControlsBaseComponent.steps,
|
73
|
-
|
74
|
-
|
75
|
-
|
66
|
+
...createQuestionBasePage.steps,
|
67
|
+
...dialogBoxBase.steps,
|
68
|
+
/**
|
69
|
+
* Uploads a file to the audio player by attaching the file located at the specified filePath.
|
70
|
+
* @param {string} filePath - The file path to the file to be uploaded.
|
71
|
+
* @returns {void}
|
72
|
+
*/
|
73
|
+
uploadFile: (filePath) => {
|
74
|
+
audioPlayerPage.inputTypeFile()
|
75
|
+
.attachFile(filePath);
|
76
|
+
utilities.verifyElementVisibilityState(audioPlayerPage.audioFileUploadProgressBar(), 'hidden');
|
76
77
|
},
|
77
78
|
|
78
|
-
|
79
|
-
|
80
|
-
|
79
|
+
/**
|
80
|
+
* Uploads a file to the audio player by attaching the file located at the specified filePath.
|
81
|
+
* @param {string} filePath - The file path to the file to be uploaded.
|
82
|
+
* @returns {void}
|
83
|
+
*/
|
84
|
+
attachFile: (filePath) => {
|
85
|
+
audioPlayerPage.inputTypeFile()
|
86
|
+
.attachFile(filePath);
|
81
87
|
},
|
82
88
|
|
83
|
-
|
84
|
-
audioPlayerPage.
|
85
|
-
.
|
89
|
+
addInputToAudioDescriptionInputField: (text) => {
|
90
|
+
audioPlayerPage.audioDescriptionInputField()
|
91
|
+
.type(text)
|
92
|
+
.should('have.text', text)
|
93
|
+
.blur();
|
86
94
|
},
|
87
95
|
|
88
|
-
|
89
|
-
audioPlayerPage.
|
96
|
+
selectTypeInTranscriptRadioButton: () => {
|
97
|
+
audioPlayerPage.typeInTranscriptRadioButton()
|
98
|
+
.click()
|
90
99
|
.should('be.checked');
|
91
100
|
},
|
92
101
|
|
93
|
-
|
94
|
-
audioPlayerPage.
|
102
|
+
enterTextInTranscriptInputField: (text) => {
|
103
|
+
audioPlayerPage.transcriptInputField()
|
104
|
+
.type(text)
|
105
|
+
.should('have.text', text)
|
106
|
+
.blur();
|
107
|
+
},
|
108
|
+
|
109
|
+
verifyUploadAudioFileRadioButtonIsSelected: () => {
|
110
|
+
audioPlayerPage.uploadAudioFileRadioButton()
|
111
|
+
.should('be.checked');
|
112
|
+
},
|
113
|
+
|
114
|
+
verifyUploadAudioFileRadioButtonIsNotSelected: () => {
|
115
|
+
audioPlayerPage.uploadAudioFileRadioButton()
|
95
116
|
.should('not.be.checked');
|
96
117
|
},
|
97
118
|
|
98
|
-
|
99
|
-
audioPlayerPage.
|
100
|
-
.
|
119
|
+
verifyAddAudioURLRadioButtonIsNotSelected: () => {
|
120
|
+
audioPlayerPage.addAudioURLRadioButton()
|
121
|
+
.should('not.be.checked');
|
101
122
|
},
|
102
123
|
|
103
|
-
|
104
|
-
audioPlayerPage.
|
124
|
+
selectUploadAudioFileRadioButton: () => {
|
125
|
+
audioPlayerPage.uploadAudioFileRadioButton()
|
105
126
|
.click()
|
106
|
-
.
|
127
|
+
.should('be.checked');
|
107
128
|
},
|
108
129
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
*/
|
114
|
-
enterTextInSourceURLInputField: (text) => {
|
115
|
-
audioPlayerPage.sourceUrlInputField()
|
116
|
-
.type(text, { delay: 0 })
|
117
|
-
.blur();
|
130
|
+
selectAddAudioURLRadioButton: () => {
|
131
|
+
audioPlayerPage.addAudioURLRadioButton()
|
132
|
+
.click()
|
133
|
+
.should('be.checked');
|
118
134
|
},
|
119
135
|
|
120
|
-
|
136
|
+
focusInAndFocusOutOfSourceURLInputField: () => {
|
121
137
|
audioPlayerPage.sourceUrlInputField()
|
122
|
-
.
|
138
|
+
.click()
|
139
|
+
.blur();
|
123
140
|
},
|
124
141
|
|
125
142
|
/**
|
126
|
-
*
|
127
|
-
* @param {string}
|
128
|
-
* @returns {void}
|
143
|
+
* @description Verify audio player style toggle button is selected
|
144
|
+
* @param {string} toggleButton Toggle button label
|
129
145
|
*/
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
146
|
+
verifyAudioPlayerStyleToggleButtonIsSelected: (toggleButton) => {
|
147
|
+
switch (toggleButton) {
|
148
|
+
case 'Standard':
|
149
|
+
audioPlayerPage.standardStyleToggleButton()
|
150
|
+
.should('have.attr', 'aria-pressed', 'true');
|
151
|
+
break;
|
152
|
+
case 'Bar':
|
153
|
+
audioPlayerPage.barStyleToggleButton()
|
154
|
+
.should('have.attr', 'aria-pressed', 'true');
|
155
|
+
break;
|
156
|
+
case 'Compact':
|
157
|
+
audioPlayerPage.compactStyleToggleButton()
|
158
|
+
.should('have.attr', 'aria-pressed', 'true');
|
159
|
+
break;
|
160
|
+
default:
|
161
|
+
throw new Error('Invalid audio player style');
|
162
|
+
}
|
134
163
|
},
|
135
164
|
|
136
|
-
|
137
|
-
|
138
|
-
|
165
|
+
/**
|
166
|
+
* @description Verify audio player style toggle button is not selected
|
167
|
+
* @param {string} toggleButton Toggle button label
|
168
|
+
*/
|
169
|
+
verifyAudioPlayerStyleToggleButtonIsNotSelected: (toggleButton) => {
|
170
|
+
switch (toggleButton) {
|
171
|
+
case 'Standard':
|
172
|
+
audioPlayerPage.standardStyleToggleButton()
|
173
|
+
.should('have.attr', 'aria-pressed', 'false');
|
174
|
+
break;
|
175
|
+
case 'Bar':
|
176
|
+
audioPlayerPage.barStyleToggleButton()
|
177
|
+
.should('have.attr', 'aria-pressed', 'false');
|
178
|
+
break;
|
179
|
+
case 'Compact':
|
180
|
+
audioPlayerPage.compactStyleToggleButton()
|
181
|
+
.should('have.attr', 'aria-pressed', 'false');
|
182
|
+
break;
|
183
|
+
default:
|
184
|
+
throw new Error('Invalid audio player style');
|
185
|
+
}
|
139
186
|
},
|
140
187
|
|
141
188
|
/**
|
142
|
-
*
|
143
|
-
* @param {string
|
144
|
-
* @returns {void}
|
189
|
+
* @description Select audio player style toggle button
|
190
|
+
* @param {string} toggleButton Toggle button label
|
145
191
|
*/
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
192
|
+
selectAudioPlayerStyleToggleButton: (toggleButton) => {
|
193
|
+
switch (toggleButton) {
|
194
|
+
case 'Standard':
|
195
|
+
audioPlayerPage.standardStyleToggleButton()
|
196
|
+
.click()
|
197
|
+
.should('have.attr', 'aria-pressed', 'true');
|
198
|
+
break;
|
199
|
+
case 'Bar':
|
200
|
+
audioPlayerPage.barStyleToggleButton()
|
201
|
+
.click()
|
202
|
+
.should('have.attr', 'aria-pressed', 'true');
|
203
|
+
break;
|
204
|
+
case 'Compact':
|
205
|
+
audioPlayerPage.compactStyleToggleButton()
|
206
|
+
.click()
|
207
|
+
.should('have.attr', 'aria-pressed', 'true');
|
208
|
+
break;
|
209
|
+
default:
|
210
|
+
throw new Error('Invalid audio player style');
|
211
|
+
}
|
150
212
|
},
|
151
213
|
|
152
214
|
/**
|
153
|
-
*
|
154
|
-
* @param {string
|
155
|
-
* @returns {void}
|
215
|
+
* @description Verify compact player option button is selected
|
216
|
+
* @param {string} button button label
|
156
217
|
*/
|
157
|
-
|
158
|
-
|
159
|
-
|
218
|
+
verifyCompactPlayerOptionButtonIsSelected: (button) => {
|
219
|
+
switch (button) {
|
220
|
+
case 'Default':
|
221
|
+
audioPlayerPage.defaultPlayerOptionButton()
|
222
|
+
.should('have.attr', 'aria-pressed', 'true');
|
223
|
+
break;
|
224
|
+
case 'Text':
|
225
|
+
audioPlayerPage.textPlayerOptionButton()
|
226
|
+
.should('have.attr', 'aria-pressed', 'true');
|
227
|
+
break;
|
228
|
+
case 'Image':
|
229
|
+
audioPlayerPage.imagePlayerOptionButton()
|
230
|
+
.should('have.attr', 'aria-pressed', 'true');
|
231
|
+
break;
|
232
|
+
case 'Icon':
|
233
|
+
audioPlayerPage.iconPlayerOptionButton()
|
234
|
+
.should('have.attr', 'aria-pressed', 'true');
|
235
|
+
break;
|
236
|
+
default:
|
237
|
+
throw new Error('Invalid compact player option');
|
238
|
+
}
|
160
239
|
},
|
161
240
|
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
241
|
+
/**
|
242
|
+
* @description Verify compact player option button is not selected
|
243
|
+
* @param {string} button button label
|
244
|
+
*/
|
245
|
+
verifyCompactPlayerOptionButtonIsNotSelected: (button) => {
|
246
|
+
switch (button) {
|
247
|
+
case 'Default':
|
248
|
+
audioPlayerPage.defaultPlayerOptionButton()
|
249
|
+
.should('have.attr', 'aria-pressed', 'false');
|
250
|
+
break;
|
251
|
+
case 'Text':
|
252
|
+
audioPlayerPage.textPlayerOptionButton()
|
253
|
+
.should('have.attr', 'aria-pressed', 'false');
|
254
|
+
break;
|
255
|
+
case 'Image':
|
256
|
+
audioPlayerPage.imagePlayerOptionButton()
|
257
|
+
.should('have.attr', 'aria-pressed', 'false');
|
258
|
+
break;
|
259
|
+
case 'Icon':
|
260
|
+
audioPlayerPage.iconPlayerOptionButton()
|
261
|
+
.should('have.attr', 'aria-pressed', 'false');
|
262
|
+
break;
|
263
|
+
default:
|
264
|
+
throw new Error('Invalid compact player option');
|
265
|
+
}
|
166
266
|
},
|
167
267
|
|
168
268
|
/**
|
169
|
-
*
|
170
|
-
* @param {string}
|
171
|
-
* @returns {void}
|
269
|
+
* @description Verify compact player option button is selected
|
270
|
+
* @param {string} toggleButton button label
|
172
271
|
*/
|
173
|
-
|
174
|
-
|
175
|
-
|
272
|
+
selectCompactPlayerOptionButton: (toggleButton) => {
|
273
|
+
switch (button) {
|
274
|
+
case 'Default':
|
275
|
+
audioPlayerPage.defaultPlayerOptionButton()
|
276
|
+
.click()
|
277
|
+
.should('have.attr', 'aria-pressed', 'true');
|
278
|
+
break;
|
279
|
+
case 'Text':
|
280
|
+
audioPlayerPage.textPlayerOptionButton()
|
281
|
+
.click()
|
282
|
+
.should('have.attr', 'aria-pressed', 'true');
|
283
|
+
break;
|
284
|
+
case 'Image':
|
285
|
+
audioPlayerPage.imagePlayerOptionButton()
|
286
|
+
.click()
|
287
|
+
.should('have.attr', 'aria-pressed', 'true');
|
288
|
+
break;
|
289
|
+
case 'Icon':
|
290
|
+
audioPlayerPage.iconPlayerOptionButton()
|
291
|
+
.click()
|
292
|
+
.should('have.attr', 'aria-pressed', 'true');
|
293
|
+
break;
|
294
|
+
default:
|
295
|
+
throw new Error('Invalid compact player option');
|
296
|
+
}
|
176
297
|
},
|
177
298
|
|
178
299
|
/**
|
179
|
-
*
|
180
|
-
* @param {string}
|
300
|
+
* Enters text into the source URL input field on the audio player page.
|
301
|
+
* @param {string} text - The text to be entered into the source URL input field.
|
181
302
|
* @returns {void}
|
182
303
|
*/
|
183
|
-
|
184
|
-
audioPlayerPage.
|
185
|
-
.
|
186
|
-
},
|
187
|
-
|
188
|
-
focusInDescriptionInputField: () => {
|
189
|
-
audioPlayerPage.descriptionInputField()
|
190
|
-
.click();
|
191
|
-
},
|
192
|
-
|
193
|
-
enterTextInDescriptionInputField: (text) => {
|
194
|
-
audioPlayerPage.descriptionInputField()
|
195
|
-
.type(text)
|
304
|
+
enterTextInSourceURLInputField: (text) => {
|
305
|
+
audioPlayerPage.sourceUrlInputField()
|
306
|
+
.type(text, { delay: 0 })
|
196
307
|
.blur();
|
197
308
|
},
|
198
309
|
|
199
|
-
|
200
|
-
audioPlayerPage.
|
310
|
+
clearTextInSourceURLInputField: () => {
|
311
|
+
audioPlayerPage.sourceUrlInputField()
|
201
312
|
.clear();
|
202
313
|
},
|
203
314
|
|
204
|
-
|
205
|
-
audioPlayerPage.
|
206
|
-
.find('img')
|
207
|
-
.should('have.attr', 'src', constants.foxImageLink)
|
208
|
-
.and('have.attr', 'alt', constants.foxImageAltText);
|
209
|
-
},
|
210
|
-
|
211
|
-
verifyImageAndAltTextInDescriptionPreviewTab: () => {
|
212
|
-
audioPlayerPage.descriptionPreviewTab()
|
213
|
-
.find('img')
|
214
|
-
.should('have.attr', 'src', constants.foxImageLink)
|
215
|
-
.and('have.attr', 'alt', constants.foxImageAltText);
|
216
|
-
},
|
217
|
-
|
218
|
-
verifyEquationInDescriptionInputField: () => {
|
219
|
-
audioPlayerPage.descriptionInputField()
|
220
|
-
.find('[data-widget="ngie_equation"]')
|
221
|
-
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
222
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
223
|
-
},
|
224
|
-
|
225
|
-
verifyEquationInDescriptionPreviewTab: () => {
|
226
|
-
audioPlayerPage.descriptionPreviewTab()
|
227
|
-
.find('[role="math"]')
|
228
|
-
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
229
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
230
|
-
},
|
231
|
-
|
232
|
-
verifyLinkInDescriptionInputField: () => {
|
233
|
-
audioPlayerPage.descriptionInputField()
|
234
|
-
.find('a')
|
235
|
-
.should('have.text', 'lorem')
|
236
|
-
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
237
|
-
},
|
238
|
-
|
239
|
-
verifyLinkInDescriptionPreviewTab: () => {
|
240
|
-
audioPlayerPage.descriptionPreviewTab()
|
241
|
-
.find('a')
|
242
|
-
.should('have.text', 'lorem')
|
243
|
-
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
244
|
-
},
|
245
|
-
|
246
|
-
verifyBoldTextInDescriptionInputField: () => {
|
247
|
-
audioPlayerPage.descriptionInputField()
|
248
|
-
.find('strong')
|
249
|
-
.should('exist')
|
250
|
-
.should('have.text', 'This is a bold text in description input field');
|
251
|
-
},
|
252
|
-
|
253
|
-
verifyBoldTextInDescriptionPreviewTab: () => {
|
254
|
-
audioPlayerPage.descriptionPreviewTab()
|
255
|
-
.find('strong')
|
256
|
-
.should('exist')
|
257
|
-
.should('have.text', 'This is a bold text in description');
|
258
|
-
},
|
259
|
-
|
260
|
-
focusInTranscriptInputField: () => {
|
261
|
-
audioPlayerPage.transcriptInputField()
|
262
|
-
.click();
|
263
|
-
},
|
264
|
-
|
265
|
-
enterTextInTranscriptInputField: (text) => {
|
266
|
-
audioPlayerPage.transcriptInputField()
|
267
|
-
.type(text)
|
268
|
-
.blur();
|
269
|
-
},
|
270
|
-
|
271
|
-
clearTranscriptInputField: () => {
|
272
|
-
audioPlayerPage.transcriptInputField()
|
273
|
-
.clear();
|
274
|
-
},
|
275
|
-
|
276
|
-
verifyImageAndAltTextInTranscriptInputField: () => {
|
277
|
-
audioPlayerPage.transcriptInputField()
|
278
|
-
.find('img')
|
279
|
-
.should('have.attr', 'src', constants.foxImageLink)
|
280
|
-
.and('have.attr', 'alt', constants.foxImageAltText);
|
281
|
-
},
|
282
|
-
|
283
|
-
verifyImageAndAltTextInTranscriptPreviewTab: () => {
|
284
|
-
audioPlayerPage.transcriptContentPreviewTab()
|
285
|
-
.find('img')
|
286
|
-
.should('have.attr', 'src', constants.foxImageLink)
|
287
|
-
.and('have.attr', 'alt', constants.foxImageAltText);
|
288
|
-
},
|
289
|
-
|
290
|
-
verifyEquationInTranscriptInputField: () => {
|
291
|
-
audioPlayerPage.transcriptInputField()
|
292
|
-
.find('[data-widget="ngie_equation"]')
|
293
|
-
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
294
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
295
|
-
},
|
296
|
-
|
297
|
-
verifyEquationInTranscriptPreviewTab: () => {
|
298
|
-
audioPlayerPage.transcriptContentPreviewTab()
|
299
|
-
.find('[role="math"]')
|
300
|
-
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
301
|
-
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
302
|
-
},
|
303
|
-
|
304
|
-
verifyLinkInTranscriptInputField: () => {
|
305
|
-
audioPlayerPage.transcriptInputField()
|
306
|
-
.find('a')
|
307
|
-
.should('have.text', 'lorem')
|
308
|
-
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
309
|
-
},
|
310
|
-
|
311
|
-
verifyLinkInTranscriptPreviewTab: () => {
|
312
|
-
audioPlayerPage.transcriptContentPreviewTab()
|
313
|
-
.find('a')
|
314
|
-
.should('have.text', 'lorem')
|
315
|
-
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
316
|
-
},
|
317
|
-
|
318
|
-
verifyBoldTextInTranscriptInputField: () => {
|
319
|
-
audioPlayerPage.transcriptInputField()
|
320
|
-
.find('strong')
|
321
|
-
.should('exist')
|
322
|
-
.should('have.text', 'This is a bold text in transcript input field');
|
323
|
-
},
|
324
|
-
|
325
|
-
verifyBoldTextInTranscriptPreviewTab: () => {
|
326
|
-
audioPlayerPage.transcriptContentPreviewTab()
|
327
|
-
.find('strong')
|
328
|
-
.should('exist')
|
329
|
-
.should('have.text', 'This is a bold text in transcript');
|
330
|
-
},
|
331
|
-
|
332
|
-
verifyCustomizeUIControlAccordionChevronIcon: () => {
|
333
|
-
audioPlayerPage.customizeUIControlAccordion()
|
334
|
-
.within(() => {
|
335
|
-
audioPlayerPage.accordionChevronIcon()
|
336
|
-
.should('be.visible');
|
337
|
-
});
|
338
|
-
},
|
339
|
-
|
340
|
-
verifyAdvancedPlayerAccordionChevronIcon: () => {
|
341
|
-
audioPlayerPage.advancedPlayerSettingsAccordion()
|
342
|
-
.within(() => {
|
343
|
-
audioPlayerPage.accordionChevronIcon()
|
344
|
-
.should('be.visible');
|
345
|
-
});
|
346
|
-
},
|
347
|
-
|
348
|
-
verifyCustomizeUIControlAccordionCollapsedState: () => {
|
349
|
-
audioPlayerPage.customizeUIControlAccordion()
|
350
|
-
.should('have.attr', 'aria-expanded', 'false');
|
351
|
-
},
|
352
|
-
|
353
|
-
verifyCustomizeUIControlAccordionExpandedState: () => {
|
354
|
-
audioPlayerPage.customizeUIControlAccordion()
|
355
|
-
.should('have.attr', 'aria-expanded', 'true');
|
356
|
-
},
|
357
|
-
|
358
|
-
clickOnCustomizeUIControlAccordion: () => {
|
359
|
-
audioPlayerPage.customizeUIControlAccordion()
|
360
|
-
.click();
|
361
|
-
},
|
362
|
-
|
363
|
-
verifyAdvancedPlayerSettingsAccordionCollapsedState: () => {
|
364
|
-
audioPlayerPage.advancedPlayerSettingsAccordion()
|
365
|
-
.should('have.attr', 'aria-expanded', 'false');
|
366
|
-
},
|
367
|
-
|
368
|
-
verifyAdvancedPlayerSettingsAccordionExpandedState: () => {
|
369
|
-
audioPlayerPage.advancedPlayerSettingsAccordion()
|
370
|
-
.should('have.attr', 'aria-expanded', 'true');
|
371
|
-
},
|
372
|
-
|
373
|
-
clickOnAdvancedPlayerSettingsAccordion: () => {
|
374
|
-
audioPlayerPage.advancedPlayerSettingsAccordion()
|
375
|
-
.click();
|
376
|
-
},
|
377
|
-
|
378
|
-
verifyCustomizeControlPlayButtonSelectedState: () => {
|
379
|
-
audioPlayerPage.customizeControlPlayButton()
|
380
|
-
.should('have.class', 'ngie-toggle-button-selected')
|
381
|
-
.within(() => {
|
382
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'visible');
|
383
|
-
});
|
384
|
-
},
|
385
|
-
|
386
|
-
verifyCustomizeControlPauseButtonSelectedState: () => {
|
387
|
-
audioPlayerPage.customizeControlPauseButton()
|
388
|
-
.should('have.class', 'ngie-toggle-button-selected')
|
389
|
-
.within(() => {
|
390
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'visible');
|
391
|
-
});
|
392
|
-
},
|
393
|
-
|
394
|
-
verifyCustomizeControlSeekButtonSelectedState: () => {
|
395
|
-
audioPlayerPage.customizeControlSeekButton()
|
396
|
-
.should('have.class', 'ngie-toggle-button-selected')
|
397
|
-
.within(() => {
|
398
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'visible');
|
399
|
-
});
|
400
|
-
},
|
401
|
-
|
402
|
-
verifyCustomizeControlPlayButtonDeselectedState: () => {
|
403
|
-
audioPlayerPage.customizeControlPlayButton()
|
404
|
-
.should('have.class', 'ngie-toggle-button-not-selected')
|
405
|
-
.within(() => {
|
406
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'hidden');
|
407
|
-
});
|
408
|
-
},
|
409
|
-
|
410
|
-
verifyCustomizeControlPauseButtonDeselectedState: () => {
|
411
|
-
audioPlayerPage.customizeControlPauseButton()
|
412
|
-
.should('have.class', 'ngie-toggle-button-not-selected')
|
413
|
-
.within(() => {
|
414
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'hidden');
|
415
|
-
});
|
416
|
-
},
|
417
|
-
|
418
|
-
verifyCustomizeControlSeekButtonDeselectedState: () => {
|
419
|
-
audioPlayerPage.customizeControlSeekButton()
|
420
|
-
.should('have.class', 'ngie-toggle-button-not-selected')
|
421
|
-
.within(() => {
|
422
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'hidden');
|
423
|
-
});
|
424
|
-
},
|
425
|
-
|
426
|
-
clickOnCustomizeControlPlayButton: () => {
|
427
|
-
audioPlayerPage.customizeControlPlayButton()
|
428
|
-
.click();
|
429
|
-
},
|
430
|
-
|
431
|
-
clickOnCustomizeControlPauseButton: () => {
|
432
|
-
audioPlayerPage.customizeControlPauseButton()
|
433
|
-
.click();
|
434
|
-
},
|
435
|
-
|
436
|
-
clickOnCustomizeControlSeekButton: () => {
|
437
|
-
audioPlayerPage.customizeControlSeekButton()
|
438
|
-
.click();
|
439
|
-
},
|
440
|
-
|
441
|
-
verifyAdvancedPlayerTimerButtonSelectedState: () => {
|
442
|
-
audioPlayerPage.advancedPlayerTimerButton()
|
443
|
-
.should('have.class', 'ngie-toggle-button-selected')
|
444
|
-
.within(() => {
|
445
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'visible');
|
446
|
-
});
|
447
|
-
},
|
448
|
-
|
449
|
-
verifyAdvancedPlayerProgressBarButtonSelectedState: () => {
|
450
|
-
audioPlayerPage.advancedPlayerProgressBarButton()
|
451
|
-
.should('have.class', 'ngie-toggle-button-selected')
|
452
|
-
.within(() => {
|
453
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'visible');
|
454
|
-
});
|
455
|
-
},
|
456
|
-
|
457
|
-
verifyAdvancedPlayerVolumeControlButtonSelectedState: () => {
|
458
|
-
audioPlayerPage.advancedPlayerVolumeControlButton()
|
459
|
-
.should('have.class', 'ngie-toggle-button-selected')
|
460
|
-
.within(() => {
|
461
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'visible');
|
462
|
-
});
|
463
|
-
},
|
464
|
-
|
465
|
-
verifyAdvancedPlayerTimerButtonDeselectedState: () => {
|
466
|
-
audioPlayerPage.advancedPlayerTimerButton()
|
467
|
-
.should('have.class', 'ngie-toggle-button-not-selected')
|
468
|
-
.within(() => {
|
469
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'hidden');
|
470
|
-
});
|
471
|
-
},
|
472
|
-
|
473
|
-
verifyAdvancedPlayerProgressBarButtonDeselectedState: () => {
|
474
|
-
audioPlayerPage.advancedPlayerProgressBarButton()
|
475
|
-
.should('have.class', 'ngie-toggle-button-not-selected')
|
476
|
-
.within(() => {
|
477
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'hidden');
|
478
|
-
});
|
479
|
-
},
|
480
|
-
|
481
|
-
verifyAdvancedPlayerVolumeControlButtonDeselectedState: () => {
|
482
|
-
audioPlayerPage.advancedPlayerVolumeControlButton()
|
483
|
-
.should('have.class', 'ngie-toggle-button-not-selected')
|
484
|
-
.within(() => {
|
485
|
-
utilities.verifyElementVisibilityState(audioPlayerPage.selectedButtonIcon(), 'hidden');
|
486
|
-
});
|
487
|
-
},
|
488
|
-
|
489
|
-
clickOnAdvancedPlayerTimerButton: () => {
|
490
|
-
audioPlayerPage.advancedPlayerTimerButton()
|
491
|
-
.click();
|
492
|
-
},
|
493
|
-
|
494
|
-
clickOnAdvancedPlayerProgressBarButton: () => {
|
495
|
-
audioPlayerPage.advancedPlayerProgressBarButton()
|
496
|
-
.click();
|
497
|
-
},
|
498
|
-
|
499
|
-
clickOnAdvancedPlayerVolumeControlButton: () => {
|
500
|
-
audioPlayerPage.advancedPlayerVolumeControlButton()
|
501
|
-
.click();
|
502
|
-
},
|
503
|
-
|
504
|
-
verifyAllowStudentsToDownloadAudioCheckboxNotChecked: () => {
|
505
|
-
audioPlayerPage.allowStudentsToDownloadAudioCheckbox()
|
506
|
-
.should('not.be.checked');
|
507
|
-
},
|
508
|
-
|
509
|
-
verifyAllowStudentsToDownloadAudioCheckboxChecked: () => {
|
510
|
-
audioPlayerPage.allowStudentsToDownloadAudioCheckbox()
|
511
|
-
.should('be.checked');
|
512
|
-
},
|
513
|
-
|
514
|
-
checkUncheckAllowStudentsToDownloadAudioCheckbox: () => {
|
515
|
-
audioPlayerPage.allowStudentsToDownloadAudioCheckbox()
|
315
|
+
deleteAudioFile: () => {
|
316
|
+
audioPlayerPage.deleteAudioFileButton()
|
516
317
|
.click();
|
517
318
|
},
|
518
319
|
|
@@ -523,18 +324,25 @@ const steps = {
|
|
523
324
|
.should('have.text', '00:01');
|
524
325
|
},
|
525
326
|
|
327
|
+
waitForAudioFileSrcToLoad: () => {
|
328
|
+
audioPlayerPage.audioFileSrc()
|
329
|
+
.should('have.attr', 'src')
|
330
|
+
.and('not.be.empty');
|
331
|
+
},
|
332
|
+
|
333
|
+
|
526
334
|
/**
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
335
|
+
* Verifies the audio playback timer on the audio player.
|
336
|
+
* @param {string} time - The elapsed time and total time in the format "elapsed/total."
|
337
|
+
* @returns {void}
|
338
|
+
*/
|
531
339
|
verifyAudioPlaybackTimer: (time) => {
|
532
340
|
const elapsedTime = time.split('/')[0];
|
533
341
|
const totalTime = time.split('/')[1];
|
534
342
|
audioPlayerPage.playbackElapsedTime()
|
535
343
|
.should('have.text', elapsedTime)
|
536
344
|
audioPlayerPage.playbackTotalTime()
|
537
|
-
.should('have.text',
|
345
|
+
.should('have.text', totalTime)
|
538
346
|
},
|
539
347
|
|
540
348
|
/**
|
@@ -551,74 +359,36 @@ const steps = {
|
|
551
359
|
.click();
|
552
360
|
},
|
553
361
|
|
554
|
-
|
555
|
-
|
362
|
+
|
363
|
+
clickOnBackwardButton: () => {
|
364
|
+
audioPlayerPage.backwardButton()
|
556
365
|
.click();
|
557
366
|
},
|
558
367
|
|
559
|
-
|
560
|
-
|
561
|
-
.click(
|
368
|
+
clickOnForwardButton: () => {
|
369
|
+
audioPlayerPage.forwardButton()
|
370
|
+
.click();
|
562
371
|
},
|
563
372
|
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
cy.stub(win, 'open')
|
568
|
-
.as('windowOpen')
|
569
|
-
});
|
570
|
-
audioPlayerPage.audioDownloadButton()
|
373
|
+
clickOnPlayButton: () => {
|
374
|
+
utilities.verifyElementVisibilityState(audioPlayerPage.playButton(), 'visible'); //Added to counter error occurrence when switching to preview tab and clinking on play button
|
375
|
+
audioPlayerPage.playButton()
|
571
376
|
.click();
|
572
|
-
cy.get('@windowOpen')
|
573
|
-
.should('be.calledWith', '');
|
574
377
|
},
|
575
378
|
|
576
|
-
|
577
|
-
audioPlayerPage.
|
578
|
-
.
|
579
|
-
|
379
|
+
clickOnStopButton: () => {
|
380
|
+
audioPlayerPage.stopButton()
|
381
|
+
.click();
|
382
|
+
},
|
383
|
+
|
384
|
+
verifyUnmutedVolumeIconIsDisplayedInPreviewTab: () => {
|
385
|
+
utilities.verifyElementVisibilityState(audioPlayerPage.unmutedVolumeIcon(), 'visible');
|
580
386
|
}
|
581
387
|
}
|
582
388
|
|
583
389
|
const tests = {
|
584
|
-
...createQuestionBasePage.tests,
|
585
390
|
...commonComponents.tests,
|
586
|
-
|
587
|
-
verifyCancelButton: () => {
|
588
|
-
it('When user has made no edits and clicks on Cancel button, the user should be directed back to the \'Select a Question\' page', () => {
|
589
|
-
createQuestionBasePage.cancelButton()
|
590
|
-
.click();
|
591
|
-
utilities.verifyElementVisibilityState(selectQuestionResourceToolPage.selectAQuestionHeaderText(), 'visible');
|
592
|
-
utilities.verifyElementVisibilityState(selectQuestionResourceToolPage.questionTypeOptionTitle(), 'visible');
|
593
|
-
});
|
594
|
-
|
595
|
-
it('When user has made some edits/changes and clicks on Cancel button, a popup should be displayed', () => {
|
596
|
-
selectQuestionResourceToolPage.steps.selectResourceType('Audio Player');
|
597
|
-
audioPlayerPage.steps.setPlaybackLimit('5');
|
598
|
-
createQuestionBasePage.cancelButton()
|
599
|
-
.click();
|
600
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible')
|
601
|
-
});
|
602
|
-
|
603
|
-
dialogBoxBase.tests.verifyContentsOfLeavePagePopupWithCSSAnda11y();
|
604
|
-
|
605
|
-
it(`Clicking on \'No, I'd like to go back\' button should close the popup and user should remain on the edit interface of the question`, () => {
|
606
|
-
dialogBoxBase.buttonReject()
|
607
|
-
.click();
|
608
|
-
createQuestionBasePage.editTab()
|
609
|
-
.should('have.attr', 'aria-selected', 'true')
|
610
|
-
audioPlayerPage.steps.verifyPlaybackLimitInputFieldValue('5');
|
611
|
-
});
|
612
|
-
|
613
|
-
it(`Clicking on \'Yes, I want to leave this page\' button should discard all changes and direct the user to the \'Select a question\' page.`, () => {
|
614
|
-
createQuestionBasePage.cancelButton()
|
615
|
-
.click();
|
616
|
-
dialogBoxBase.buttonAccept()
|
617
|
-
.click();
|
618
|
-
utilities.verifyElementVisibilityState(selectQuestionResourceToolPage.selectAQuestionHeaderText(), 'visible');
|
619
|
-
utilities.verifyElementVisibilityState(selectQuestionResourceToolPage.questionTypeOptionTitle(), 'visible');
|
620
|
-
});
|
621
|
-
},
|
391
|
+
...playbackControlsBaseComponent.tests,
|
622
392
|
}
|
623
393
|
|
624
394
|
export const audioPlayerPage = {
|