itemengine-cypress-automation 1.0.180-essayResponseLazyLoadingFix-63cd8a3.0 → 1.0.182-repoUpdate22April-92d01da.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +4 -5
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +64 -3
- 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/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- 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/allOrNothingForAllViews.smoke.js +243 -0
- package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -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 +530 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +119 -0
- package/cypress/e2e/ILC/NumberLine/numberLineSection.js +263 -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/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 +0 -1
- 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 +2 -2
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.smoke.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/fixtures/constants.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
- package/cypress/fixtures/theme/ilc.json +16 -16
- package/cypress/pages/audioPlayerPage.js +55 -543
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +4 -4
- 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 +1 -0
- package/cypress/pages/components/optionsWrapperComponent.js +11 -0
- package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
- package/cypress/pages/components/toolSettingsComponent.js +6 -0
- package/cypress/pages/contentBlocksPage.js +2 -2
- package/cypress/pages/createItemPage.js +29 -0
- package/cypress/pages/dialogBoxBase.js +2 -2
- package/cypress/pages/drawingResponsePage.js +23 -4
- package/cypress/pages/feedbackScalePage.js +3 -0
- package/cypress/pages/graphingPage.js +18 -0
- package/cypress/pages/gridFillPage.js +18 -2
- package/cypress/pages/index.js +1 -1
- package/cypress/pages/itemPreviewSettingsPage.js +4 -0
- package/cypress/pages/listOrderingPage.js +122 -647
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +23 -1
- package/cypress/pages/numberLinePage.js +1196 -59
- package/cypress/pages/rulerPage.js +6 -2
- package/cypress/pages/textSelectionPage.js +460 -22
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +2 -1
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +4 -1
- package/package.json +1 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
@@ -1,519 +1,89 @@
|
|
1
|
-
import constants from "../fixtures/constants";
|
2
1
|
import utilities from "../support/helpers/utilities";
|
3
|
-
import {
|
4
|
-
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
5
|
-
import { createQuestionBasePage, commonComponents, ckEditorToolbar, equationEditorFlyout, playbackControlsBaseComponent } from "./components"
|
2
|
+
import { createQuestionBasePage, playbackControlsBaseComponent } from "./components";
|
6
3
|
|
7
4
|
const selectors = {
|
8
|
-
...commonComponents,
|
9
|
-
...ckEditorToolbar,
|
10
5
|
...playbackControlsBaseComponent,
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
uploadAudioFileLabel: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"] .ngie-radio-label').eq(0),
|
7
|
+
uploadAudioFileRadioButton: () => cy.get('.ngie-radio-btn input').eq(0),
|
8
|
+
addAudioURLLabel: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"] .ngie-radio-label').eq(1),
|
9
|
+
addAudioURLRadioButton: () => cy.get('.ngie-radio-btn input').eq(1),
|
10
|
+
uploadAudioFileUploadLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(0),
|
11
|
+
uploadAudioFileNameLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(1),
|
12
|
+
uploadAudioChooseFileButton: () => cy.get('.choose-file-upload-button'),
|
13
|
+
uploadAudioNoFileChosenLabel: () => cy.get('[aria-label="No file chosen"]').eq(0),
|
18
14
|
uploadedFileNameLabel: () => cy.get('.selected-file'),
|
19
|
-
uploadLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(0),
|
20
|
-
fileNameLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(1),
|
21
|
-
chooseFileButton: () => cy.get('.choose-file-button'),
|
22
15
|
fileUploadProgressBar: () => cy.get('[class*="AudioPlayerstyles__ProgressBar-"]'),
|
23
16
|
inputTypeFile: () => cy.get('input[type="file"]'),
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
titleInputField: () => cy.get('input[aria-label="Title"]'),
|
30
|
-
descriptionLabel: () => cy.get('.additional-settings-label').eq(0),
|
31
|
-
descriptionInputField: () => cy.get('[role="textbox"][title="Description"]'),
|
32
|
-
transcriptLabel: () => cy.get('.additional-settings-label').eq(1),
|
17
|
+
audioDescriptionInputField: () => cy.get('.description-wrapper [role="textbox"]'),
|
18
|
+
uploadTranscriptFileLabel: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"] .ngie-radio-label').eq(2),
|
19
|
+
uploadTranscriptFileRadioButton: () => cy.get('.ngie-radio-btn input').eq(2),
|
20
|
+
typeInTranscriptLabel: () => cy.get('[class*="RadioGroupMUI5styles__RadioOptionContainer"] .ngie-radio-label').eq(3),
|
21
|
+
typeInTranscriptRadioButton: () => cy.get('.ngie-radio-btn input').eq(3),
|
33
22
|
transcriptInputField: () => cy.get('[role="textbox"][title="Transcript"]'),
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
advancedPlayerTimerButton: () => cy.get('[data-ngie-testid="timer-toggle-button"]'),
|
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'),
|
23
|
+
|
24
|
+
//Preview tab
|
25
|
+
backwardButton: () => cy.get('.forward-backward-buttons-wrapper [title*="Backward"]'),
|
26
|
+
forwardButton: () => cy.get('.forward-backward-buttons-wrapper [title*="Forward"]'),
|
27
|
+
playbackElapsedTime: () => cy.get('.audio-player-current-time').eq(0),
|
28
|
+
playbackTotalTime: () => cy.get('.audio-player-duration').eq(0),
|
29
|
+
addPinButton: () => cy.get('.audio-add-pin-wr button'),
|
53
30
|
audioFileSrc: () => cy.get('.audio-player-toolbar audio'),
|
54
|
-
titlePreviewTab: () => cy.get('.audio-resource-title'),
|
55
31
|
descriptionPreviewTab: () => cy.get('.audio-resource-preview-wrapper .question-text-wrapper'),
|
56
32
|
transcriptTitlePreviewTab: () => cy.get('.transcript-title'),
|
57
33
|
transcriptPrintButton: () => cy.get('button[aria-label="Print preview"]'),
|
58
34
|
transcriptModalCloseButton: () => cy.get('button[aria-label="Close"]'),
|
59
|
-
transcriptContentPreviewTab: () => cy.get('
|
35
|
+
transcriptContentPreviewTab: () => cy.get('.transcript-content'),
|
60
36
|
transcriptButton: () => cy.get('button[aria-label="Transcript"]'),
|
61
37
|
transcriptModal: () => cy.get('[class*="Transcriptstyles__TranscriptWrapper"]'),
|
62
|
-
audioDownloadButton: () => cy.get('.audio-download-icon-wr'),
|
63
|
-
playbackLimitHelpText: () => cy.get('.playback-limit-remaining'),
|
64
|
-
playbackPlayer: () => cy.get('.audio-player-toolbar')
|
65
38
|
}
|
66
39
|
|
67
40
|
const steps = {
|
68
|
-
...createQuestionBasePage.steps,
|
69
|
-
...ckEditorToolbar.steps,
|
70
|
-
...equationEditorFlyout.steps,
|
71
|
-
...commonComponents.steps,
|
72
41
|
...playbackControlsBaseComponent.steps,
|
73
|
-
|
74
|
-
audioPlayerPage.addUrlRadioButton()
|
75
|
-
.should('be.checked');
|
76
|
-
},
|
77
|
-
|
78
|
-
verifyAddUrlUncheckedState: () => {
|
79
|
-
audioPlayerPage.addUrlRadioButton()
|
80
|
-
.should('not.be.checked');
|
81
|
-
},
|
82
|
-
|
83
|
-
clickOnAddUrlRadioButton: () => {
|
84
|
-
audioPlayerPage.addUrlRadioButton()
|
85
|
-
.click();
|
86
|
-
},
|
87
|
-
|
88
|
-
verifyAddAudioFileCheckedState: () => {
|
89
|
-
audioPlayerPage.addAudioFileRadioButton()
|
90
|
-
.should('be.checked');
|
91
|
-
},
|
92
|
-
|
93
|
-
verifyAddAudioFileUncheckedState: () => {
|
94
|
-
audioPlayerPage.addAudioFileRadioButton()
|
95
|
-
.should('not.be.checked');
|
96
|
-
},
|
97
|
-
|
98
|
-
clickOnAddAudioFileRadioButton: () => {
|
99
|
-
audioPlayerPage.addAudioFileRadioButton()
|
100
|
-
.click();
|
101
|
-
},
|
102
|
-
|
103
|
-
focusInAndFocusOutOfSourceURLInputField: () => {
|
104
|
-
audioPlayerPage.sourceUrlInputField()
|
105
|
-
.click()
|
106
|
-
.blur();
|
107
|
-
},
|
108
|
-
|
109
|
-
/**
|
110
|
-
* Enters text into the source URL input field on the audio player page.
|
111
|
-
* @param {string} text - The text to be entered into the source URL input field.
|
112
|
-
* @returns {void}
|
113
|
-
*/
|
114
|
-
enterTextInSourceURLInputField: (text) => {
|
115
|
-
audioPlayerPage.sourceUrlInputField()
|
116
|
-
.type(text, { delay: 0 })
|
117
|
-
.blur();
|
118
|
-
},
|
119
|
-
|
120
|
-
clearTextInSourceURLInputField: () => {
|
121
|
-
audioPlayerPage.sourceUrlInputField()
|
122
|
-
.clear();
|
123
|
-
},
|
124
|
-
|
42
|
+
...createQuestionBasePage.steps,
|
125
43
|
/**
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
44
|
+
* Uploads a file to the audio player by attaching the file located at the specified filePath.
|
45
|
+
* @param {string} filePath - The file path to the file to be uploaded.
|
46
|
+
* @returns {void}
|
47
|
+
*/
|
130
48
|
uploadFile: (filePath) => {
|
131
49
|
audioPlayerPage.inputTypeFile()
|
132
50
|
.attachFile(filePath);
|
133
51
|
utilities.verifyElementVisibilityState(audioPlayerPage.fileUploadProgressBar(), 'hidden');
|
134
52
|
},
|
135
53
|
|
136
|
-
|
137
|
-
audioPlayerPage.
|
138
|
-
.should('have.class', 'Mui-disabled');
|
139
|
-
},
|
140
|
-
|
141
|
-
/**
|
142
|
-
* Sets the playback limit value in the audio player's input field.
|
143
|
-
* @param {string|number} value - The value to set as the playback limit.
|
144
|
-
* @returns {void}
|
145
|
-
*/
|
146
|
-
setPlaybackLimit: (value) => {
|
147
|
-
audioPlayerPage.playbackLimitInputField()
|
148
|
-
.clear()
|
149
|
-
.type(value)
|
150
|
-
},
|
151
|
-
|
152
|
-
/**
|
153
|
-
* Verifies that the playback limit input field in the audio player has the expected value.
|
154
|
-
* @param {string|number} value - The expected value to be verified.
|
155
|
-
* @returns {void}
|
156
|
-
*/
|
157
|
-
verifyPlaybackLimitInputFieldValue: (value) => {
|
158
|
-
audioPlayerPage.playbackLimitInputField()
|
159
|
-
.should('have.attr', 'value', value);
|
160
|
-
},
|
161
|
-
|
162
|
-
focusInAndFocusOutOfPlaybackLimitInputField: () => {
|
163
|
-
audioPlayerPage.playbackLimitInputField()
|
164
|
-
.click()
|
165
|
-
.blur();
|
166
|
-
},
|
167
|
-
|
168
|
-
/**
|
169
|
-
* Enters text into the title input field on the audio player page.
|
170
|
-
* @param {string} text - The text to be entered into the title input field.
|
171
|
-
* @returns {void}
|
172
|
-
*/
|
173
|
-
enterTextInTitleInputField: (text) => {
|
174
|
-
audioPlayerPage.titleInputField()
|
175
|
-
.type(text, { delay: 0 });
|
176
|
-
},
|
177
|
-
|
178
|
-
/**
|
179
|
-
* Verifies that the title input field in the audio player has the expected text value.
|
180
|
-
* @param {string} value - The expected text value to be verified.
|
181
|
-
* @returns {void}
|
182
|
-
*/
|
183
|
-
verifyTextInTitleInputField: (value) => {
|
184
|
-
audioPlayerPage.titleInputField()
|
185
|
-
.should('have.attr', 'value', value)
|
186
|
-
},
|
187
|
-
|
188
|
-
focusInDescriptionInputField: () => {
|
189
|
-
audioPlayerPage.descriptionInputField()
|
190
|
-
.click();
|
191
|
-
},
|
192
|
-
|
193
|
-
enterTextInDescriptionInputField: (text) => {
|
194
|
-
audioPlayerPage.descriptionInputField()
|
54
|
+
addInputToAudioDescriptionInputField: (text) => {
|
55
|
+
audioPlayerPage.audioDescriptionInputField()
|
195
56
|
.type(text)
|
57
|
+
.should('have.text', text)
|
196
58
|
.blur();
|
197
59
|
},
|
198
60
|
|
199
|
-
|
200
|
-
audioPlayerPage.
|
201
|
-
.
|
202
|
-
|
203
|
-
|
204
|
-
verifyImageAndAltTextInDescriptionInputField: () => {
|
205
|
-
audioPlayerPage.descriptionInputField()
|
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();
|
61
|
+
selectTypeInTranscriptRadioButton: () => {
|
62
|
+
audioPlayerPage.typeInTranscriptRadioButton()
|
63
|
+
.click()
|
64
|
+
.should('be.checked');
|
263
65
|
},
|
264
66
|
|
265
67
|
enterTextInTranscriptInputField: (text) => {
|
266
68
|
audioPlayerPage.transcriptInputField()
|
267
69
|
.type(text)
|
70
|
+
.should('have.text', text)
|
268
71
|
.blur();
|
269
72
|
},
|
270
73
|
|
271
|
-
|
272
|
-
audioPlayerPage.
|
273
|
-
.
|
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();
|
74
|
+
verifyUploadAudioFileRadioButtonIsSelected: () => {
|
75
|
+
audioPlayerPage.uploadAudioFileRadioButton()
|
76
|
+
.should('be.checked');
|
502
77
|
},
|
503
78
|
|
504
|
-
|
505
|
-
audioPlayerPage.
|
79
|
+
verifyUploadAudioFileRadioButtonIsNotSelected: () => {
|
80
|
+
audioPlayerPage.uploadAudioFileRadioButton()
|
506
81
|
.should('not.be.checked');
|
507
82
|
},
|
508
83
|
|
509
|
-
|
510
|
-
audioPlayerPage.
|
511
|
-
.should('be.checked');
|
512
|
-
},
|
513
|
-
|
514
|
-
checkUncheckAllowStudentsToDownloadAudioCheckbox: () => {
|
515
|
-
audioPlayerPage.allowStudentsToDownloadAudioCheckbox()
|
516
|
-
.click();
|
84
|
+
verifyAddAudioURLRadioButtonIsNotSelected: () => {
|
85
|
+
audioPlayerPage.addAudioURLRadioButton()
|
86
|
+
.should('not.be.checked');
|
517
87
|
},
|
518
88
|
|
519
89
|
//Preview tab
|
@@ -523,18 +93,25 @@ const steps = {
|
|
523
93
|
.should('have.text', '00:01');
|
524
94
|
},
|
525
95
|
|
96
|
+
waitForAudioFileSrcToLoad: () => {
|
97
|
+
audioPlayerPage.audioFileSrc()
|
98
|
+
.should('have.attr', 'src')
|
99
|
+
.and('not.be.empty');
|
100
|
+
},
|
101
|
+
|
102
|
+
|
526
103
|
/**
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
104
|
+
* Verifies the audio playback timer on the audio player.
|
105
|
+
* @param {string} time - The elapsed time and total time in the format "elapsed/total."
|
106
|
+
* @returns {void}
|
107
|
+
*/
|
531
108
|
verifyAudioPlaybackTimer: (time) => {
|
532
109
|
const elapsedTime = time.split('/')[0];
|
533
110
|
const totalTime = time.split('/')[1];
|
534
111
|
audioPlayerPage.playbackElapsedTime()
|
535
112
|
.should('have.text', elapsedTime)
|
536
113
|
audioPlayerPage.playbackTotalTime()
|
537
|
-
.should('have.text',
|
114
|
+
.should('have.text', totalTime)
|
538
115
|
},
|
539
116
|
|
540
117
|
/**
|
@@ -550,75 +127,10 @@ const steps = {
|
|
550
127
|
audioPlayerPage.transcriptButton()
|
551
128
|
.click();
|
552
129
|
},
|
553
|
-
|
554
|
-
closeTranscriptModal: () => {
|
555
|
-
audioPlayerPage.transcriptModalCloseButton()
|
556
|
-
.click();
|
557
|
-
},
|
558
|
-
|
559
|
-
focusAwayFromElement: () => {
|
560
|
-
cy.get('body')
|
561
|
-
.click({ position: 'topLeft' });
|
562
|
-
},
|
563
|
-
|
564
|
-
verifyWindowOpenMethodAfterClickingOnDownloadAudioButton: () => {
|
565
|
-
cy.window()
|
566
|
-
.then((win) => {
|
567
|
-
cy.stub(win, 'open')
|
568
|
-
.as('windowOpen')
|
569
|
-
});
|
570
|
-
audioPlayerPage.audioDownloadButton()
|
571
|
-
.click();
|
572
|
-
cy.get('@windowOpen')
|
573
|
-
.should('be.calledWith', '');
|
574
|
-
},
|
575
|
-
|
576
|
-
waitForAudioFileSrcToLoad: () => {
|
577
|
-
audioPlayerPage.audioFileSrc()
|
578
|
-
.should('have.attr', 'src')
|
579
|
-
.and('not.be.empty');
|
580
|
-
}
|
581
130
|
}
|
582
131
|
|
583
132
|
const tests = {
|
584
|
-
...createQuestionBasePage.tests,
|
585
|
-
...commonComponents.tests,
|
586
|
-
//Header section
|
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
133
|
|
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
|
-
},
|
622
134
|
}
|
623
135
|
|
624
136
|
export const audioPlayerPage = {
|
@@ -112,7 +112,7 @@ const tests = {
|
|
112
112
|
...scoringSectionBaseEditTab.tests,
|
113
113
|
...additionalSettingsPanel.tests,
|
114
114
|
...additionalSettingsAccessibilitySectionComponent.tests,
|
115
|
-
...toolSettingsComponent.
|
115
|
+
...toolSettingsComponent.tests,
|
116
116
|
}
|
117
117
|
|
118
118
|
export const brainingCampManipulativePage = {
|