itemengine-cypress-automation 1.0.113 → 1.0.115
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.js +489 -0
- package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.js +482 -0
- package/cypress/e2e/ILC/AudioResponseNew/customizePlaybackControls.js +488 -0
- package/cypress/e2e/ILC/AudioResponseNew/editAndPreviewTabScoringSection.js +92 -0
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +229 -0
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/headerSection.js +67 -0
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +11 -11
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +529 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +108 -190
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +83 -155
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +104 -315
- package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +121 -135
- package/cypress/e2e/ILC/EssayResponseMath/createItem.js +17 -0
- package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +203 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +121 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +236 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsBasic.js +255 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +237 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +236 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +43 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +187 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingWithAlternativeAnswer.js +245 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/checkAnswerFunctionalityForAllViews.smoke.js +99 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabScoringSection.js +97 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +74 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/manuallyAndNonScoredScoring.js +83 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/previewContentsForAllViews.smoke.js +109 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/specifyCorrectAnswerSection.js +66 -0
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +326 -0
- package/cypress/e2e/ILC/TextEntryMath/checkAnswerFunctionalityForAllViews.smoke.js +163 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +3 -3
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +154 -0
- package/cypress/pages/audioResponsePage.js +523 -66
- package/cypress/pages/components/autoScoredScoringPreviewTab.js +2 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +6 -5
- package/cypress/pages/components/equationEditorFlyout.js +11 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +290 -19
- package/cypress/pages/components/figOverImageCanvasComponent.js +1 -1
- package/cypress/pages/components/maximumRecorderLengthComponent.js +32 -15
- package/cypress/pages/components/playbackControlsBaseComponent.js +9 -1
- package/cypress/pages/components/questionInputFieldComponent.js +0 -7
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +3 -3
- package/cypress/pages/essayResponseBasicPage.js +1 -26
- package/cypress/pages/essayResponsePage.js +21 -284
- package/cypress/pages/shortTextResponsePage.js +142 -103
- package/cypress/pages/textEntryMathPage.js +58 -7
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +1 -1
@@ -0,0 +1,229 @@
|
|
1
|
+
import { audioResponsePage } from '../../../pages/audioResponsePage';
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from '../../../support/helpers/utilities';
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create Item page - Audio response: Question instructions, Audio recorder style toggle buttons, Maximum recorder length, Stop recording if silence is detected after', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question Instructions input field - Edit tab', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
15
|
+
});
|
16
|
+
|
17
|
+
audioResponsePage.tests.verifyQuestionInstructionsInputFieldEditTab();
|
18
|
+
|
19
|
+
});
|
20
|
+
|
21
|
+
describe('Question Instructions input field - Preview tab', () => {
|
22
|
+
abortEarlySetup();
|
23
|
+
before(() => {
|
24
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
25
|
+
});
|
26
|
+
|
27
|
+
audioResponsePage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
28
|
+
});
|
29
|
+
|
30
|
+
describe('Audio recorder style toggle buttons', () => {
|
31
|
+
abortEarlySetup();
|
32
|
+
before(() => {
|
33
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
34
|
+
});
|
35
|
+
//Note: a11y is covered in header file
|
36
|
+
|
37
|
+
it('\'Audio recorder style\' label should be displayed along with three toggle buttons, "Standard", "Bar" and "Compact". "Standard" button should be selected by default', () => {
|
38
|
+
utilities.verifyInnerText(audioResponsePage.audioRecorderStyleLabel(), 'Audio recorder style');
|
39
|
+
utilities.verifyInnerText(audioResponsePage.standardRecorderStyleButton(), 'Standard');
|
40
|
+
utilities.verifyInnerText(audioResponsePage.barRecorderStyleButton(), 'Bar');
|
41
|
+
utilities.verifyInnerText(audioResponsePage.compactRecorderStyleButton(), 'Compact');
|
42
|
+
audioResponsePage.steps.verifyStandardRecorderStyleToggleButtonSelectedState();
|
43
|
+
});
|
44
|
+
|
45
|
+
it('CSS of Audio Recorder Style section', { tags: 'css' }, () => {
|
46
|
+
utilities.verifyCSS(audioResponsePage.audioRecorderStyleLabel(), {
|
47
|
+
'color': css.color.labels,
|
48
|
+
'font-size': css.fontSize.normal,
|
49
|
+
'font-weight': css.fontWeight.semibold
|
50
|
+
});
|
51
|
+
utilities.verifyCSS(audioResponsePage.standardRecorderStyleButton(), {
|
52
|
+
'color': css.color.defaultBackground,
|
53
|
+
'background-color': css.color.activeButtons,
|
54
|
+
'font-size': css.fontSize.default,
|
55
|
+
'font-weight': css.fontWeight.regular
|
56
|
+
});
|
57
|
+
utilities.verifyCSS(audioResponsePage.barRecorderStyleButton(), {
|
58
|
+
'color': css.color.secondaryBtn,
|
59
|
+
'background-color': css.color.secondaryBtnBg,
|
60
|
+
'font-size': css.fontSize.default,
|
61
|
+
'font-weight': css.fontWeight.regular
|
62
|
+
});
|
63
|
+
});
|
64
|
+
|
65
|
+
it('When "Standard" option is selected in the Audio recorder style toggle buttons section, then "Timer", "Progress indicator", "Audio wave" and "Volume meter" options should be displayed and be selected by default in "Audio indicators" section', () => {
|
66
|
+
audioResponsePage.steps.verifyAudioIndicatorsTimeButtonSelectedState();
|
67
|
+
audioResponsePage.steps.verifyAudioIndicatorsProgressIndicatorButtonSelectedState();
|
68
|
+
audioResponsePage.steps.verifyAudioIndicatorsAudioWaveButtonSelectedState();
|
69
|
+
audioResponsePage.steps.verifyAudioIndicatorsVolumeMeterButtonSelectedState();
|
70
|
+
});
|
71
|
+
|
72
|
+
it('When the user selects "Bar" option is in the Audio recorder style toggle buttons section, then "Timer" and "Progress indicator" should be displayed and be selected by default in "Audio indicators" section. "Audio wave" and "Volume meter" options should not be displayed', () => {
|
73
|
+
audioResponsePage.steps.selectAudioRecorderStyle('Bar');
|
74
|
+
audioResponsePage.steps.verifyAudioIndicatorsTimeButtonSelectedState();
|
75
|
+
audioResponsePage.steps.verifyAudioIndicatorsProgressIndicatorButtonSelectedState();
|
76
|
+
utilities.verifyElementVisibilityState(audioResponsePage.audioIndicatorsAudioWaveButton(), 'notExist');
|
77
|
+
utilities.verifyElementVisibilityState(audioResponsePage.audioIndicatorsVolumeMeterButton(), 'notExist');
|
78
|
+
});
|
79
|
+
|
80
|
+
it('When the user selects "Compact" option in the Audio recorder style toggle buttons section, then "Timer", "Progress indicator", "Audio wave" and "Volume meter" options should be displayed and be selected by default in "Audio indicators" section', () => {
|
81
|
+
audioResponsePage.steps.verifyAudioIndicatorsTimeButtonSelectedState();
|
82
|
+
audioResponsePage.steps.verifyAudioIndicatorsProgressIndicatorButtonSelectedState();
|
83
|
+
audioResponsePage.steps.verifyAudioIndicatorsAudioWaveButtonSelectedState();
|
84
|
+
audioResponsePage.steps.verifyAudioIndicatorsVolumeMeterButtonSelectedState();
|
85
|
+
});
|
86
|
+
});
|
87
|
+
|
88
|
+
describe('Maximum recorder length: Edit tab', () => {
|
89
|
+
abortEarlySetup();
|
90
|
+
before(() => {
|
91
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
92
|
+
});
|
93
|
+
|
94
|
+
audioResponsePage.tests.verifyMaximumRecorderLengthLabelAndInputField();
|
95
|
+
|
96
|
+
audioResponsePage.tests.verifyMaximumRecorderLengthInputFieldErrorMessages();
|
97
|
+
|
98
|
+
audioResponsePage.tests.verifyMaximumRecorderLengthCharacterAcceptanceCriteria();
|
99
|
+
|
100
|
+
it('When user tries to add a value greater than 3600 it should be automatically set back to 3600 and should not allow to add greater than set value', () => {
|
101
|
+
audioResponsePage.steps.setMaximumRecorderLength('9999');
|
102
|
+
audioResponsePage.steps.verifyMaximumRecorderLength('3600');
|
103
|
+
});
|
104
|
+
});
|
105
|
+
|
106
|
+
describe('Maximum recorder length: Preview tab', () => {
|
107
|
+
abortEarlySetup();
|
108
|
+
before(() => {
|
109
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
110
|
+
cy.barsPreLoaderWait();
|
111
|
+
audioResponsePage.steps.switchToPreviewTab();
|
112
|
+
});
|
113
|
+
|
114
|
+
it('By default, maximum recorder length (15 minutes) should be displayed in minutes(mm:ss) format', () => {
|
115
|
+
utilities.verifyInnerText(audioResponsePage.standardPreviewRecordTime(), '15:00');
|
116
|
+
});
|
117
|
+
|
118
|
+
it('When the user has updates maximum recorder length value and starts recording, the recording should stop after reaching the maximum recorder length value', () => {
|
119
|
+
audioResponsePage.steps.switchToEditTab();
|
120
|
+
audioResponsePage.steps.setMaximumRecorderLength('10');
|
121
|
+
cy.log('Switching to Preview tab');
|
122
|
+
audioResponsePage.steps.switchToPreviewTab();
|
123
|
+
utilities.verifyInnerText(audioResponsePage.standardPreviewRecordTime(), '00:10');
|
124
|
+
audioResponsePage.steps.startRecordingStandardPreview();
|
125
|
+
audioResponsePage.steps.waitForRecordingToStartStandardPreview();
|
126
|
+
audioResponsePage.steps.verifyResponseIsRecordedHelpText();
|
127
|
+
});
|
128
|
+
});
|
129
|
+
|
130
|
+
describe('Stop recording if silence is detected after: Edit tab', () => {
|
131
|
+
abortEarlySetup();
|
132
|
+
before(() => {
|
133
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
134
|
+
cy.barsPreLoaderWait();
|
135
|
+
});
|
136
|
+
|
137
|
+
it('\'Stop recording if silence is detected after\' label, input field "Secs" and "Mins" toggle buttons should be displayed. By default "Secs" toggle button should be in selected state. "Stop recording if silence is detected after" input field should be empty', () => {
|
138
|
+
utilities.verifyInnerText(audioResponsePage.stopRecordingIfSilenceIsDetectedLabel(), 'Stop recording if silence is detected after');
|
139
|
+
audioResponsePage.steps.verifyStopRecordingIfSilenceIsDetectedInputFieldValue('');
|
140
|
+
audioResponsePage.steps.verifyStopRecordingIfSilenceIsDetectedSecsToggleButtonSelectedState();
|
141
|
+
utilities.verifyInnerText(audioResponsePage.stopRecordingIfSilenceIsDetectedSecsToggleButton(), 'Secs');
|
142
|
+
utilities.verifyInnerText(audioResponsePage.stopRecordingIfSilenceIsDetectedMinsToggleButton(), 'Mins');
|
143
|
+
});
|
144
|
+
|
145
|
+
it('CSS of \'Stop recording if silence is detected after\' section', { tags: 'css' }, () => {
|
146
|
+
utilities.verifyCSS(audioResponsePage.stopRecordingIfSilenceIsDetectedLabel(), {
|
147
|
+
'color': css.color.labels,
|
148
|
+
'font-size': css.fontSize.normal,
|
149
|
+
'font-weight': css.fontWeight.semibold
|
150
|
+
});
|
151
|
+
utilities.verifyCSS(audioResponsePage.stopRecordingIfSilenceIsDetectedSecsToggleButton(), {
|
152
|
+
'color': css.color.defaultBackground,
|
153
|
+
'background-color': css.color.activeButtons,
|
154
|
+
'font-size': css.fontSize.default,
|
155
|
+
'font-weight': css.fontWeight.regular
|
156
|
+
});
|
157
|
+
utilities.verifyCSS(audioResponsePage.stopRecordingIfSilenceIsDetectedMinsToggleButton(), {
|
158
|
+
'color': css.color.secondaryBtn,
|
159
|
+
'background-color': css.color.secondaryBtnBg,
|
160
|
+
'font-size': css.fontSize.default,
|
161
|
+
'font-weight': css.fontWeight.regular
|
162
|
+
});
|
163
|
+
utilities.verifyCSS(audioResponsePage.stopRecordingIfSilenceIsDetectedInputField(), {
|
164
|
+
'color': css.color.text,
|
165
|
+
'font-size': css.fontSize.default,
|
166
|
+
'font-weight': css.fontWeight.regular
|
167
|
+
});
|
168
|
+
});
|
169
|
+
|
170
|
+
//Note: a11y is covered for Stop recording if silence is detected after section in HeaderSection file using verifyCreateItemWrapperContentsA11y
|
171
|
+
|
172
|
+
it('When the user has set \'Stop recording if silence is detected after\' value to \'0\' (zero) then a validation text \'Error: Value must be greater than 0 secs.\' should be displayed', () => {
|
173
|
+
audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('0');
|
174
|
+
utilities.verifyInnerText(audioResponsePage.errorMessage(), 'Error: Value must be greater than 0 secs.');
|
175
|
+
});
|
176
|
+
|
177
|
+
it('When the user has set \'Stop recording if silence is detected after\' value to \'0\' (zero) then a validation text \'Error: Value must be greater than 0 secs.\' should be displayed', () => {
|
178
|
+
audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('0');
|
179
|
+
utilities.verifyInnerText(audioResponsePage.errorMessage(), 'Error: Value must be greater than 0 secs.');
|
180
|
+
});
|
181
|
+
|
182
|
+
it('CSS of error message \'Error: Value must be greater than 0 secs.\'', () => {
|
183
|
+
utilities.verifyCSS(audioResponsePage.errorMessage(), {
|
184
|
+
'color': css.color.errorText,
|
185
|
+
'font-size': css.fontSize.small,
|
186
|
+
'font-weight': css.fontWeight.regular
|
187
|
+
});
|
188
|
+
});
|
189
|
+
|
190
|
+
it('Accessibility of \'Error: Value must be greater than 0 secs.\' is displayed', () => {
|
191
|
+
cy.checkAccessibility(audioResponsePage.errorMessage());
|
192
|
+
});
|
193
|
+
|
194
|
+
it('When the user updates the \'Stop recording if silence is detected after\' value the validation text should disappear. User should be able to add only numeric values and should not able to add decimal points', () => {
|
195
|
+
audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('150');
|
196
|
+
utilities.verifyElementVisibilityState(audioResponsePage.errorMessage(), 'notExist');
|
197
|
+
audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('.10.0');
|
198
|
+
audioResponsePage.steps.verifyStopRecordingIfSilenceIsDetectedInputFieldValue('100');
|
199
|
+
audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('!@#abcde236');
|
200
|
+
audioResponsePage.steps.verifyStopRecordingIfSilenceIsDetectedInputFieldValue('236');
|
201
|
+
});
|
202
|
+
|
203
|
+
it('When user focuses in \'Stop recording if silence is detected after\' and focuses out without entering any value, or entering a value greater than \'Maximum recorder length\' input field, no error should be displayed', () => {
|
204
|
+
audioResponsePage.steps.focusInStopRecordingIfSilenceIsDetectedInputField();
|
205
|
+
audioResponsePage.steps.verifyErrorMessageIsNotDisplayed();
|
206
|
+
utilities.verifyElementVisibilityState(audioResponsePage.errorMessage(), 'notExist');
|
207
|
+
audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('4000');
|
208
|
+
audioResponsePage.steps.verifyErrorMessageIsNotDisplayed();
|
209
|
+
});
|
210
|
+
});
|
211
|
+
|
212
|
+
describe('Stop recording if silence is detected after: Preview tab', () => {
|
213
|
+
abortEarlySetup();
|
214
|
+
before(() => {
|
215
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
216
|
+
cy.barsPreLoaderWait();
|
217
|
+
});
|
218
|
+
|
219
|
+
it('When silence is detected for more than value set in \'Stop recording if silence is detected after\' input field during recording, the recorder should stop automatically by the system and the recording should get saved', () => {
|
220
|
+
audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('5');
|
221
|
+
cy.log('Switching to Preview tab');
|
222
|
+
audioResponsePage.steps.switchToPreviewTab();
|
223
|
+
audioResponsePage.steps.startRecordingStandardPreview();
|
224
|
+
audioResponsePage.steps.waitForRecordingToStartStandardPreview();
|
225
|
+
audioResponsePage.steps.verifyResponseIsRecordedHelpText();
|
226
|
+
audioResponsePage.steps.verifyPlaybackTimeStandardPreview('00:00', '00:05');
|
227
|
+
});
|
228
|
+
});
|
229
|
+
});
|
@@ -46,7 +46,7 @@ describe('Create item page - audio response: Grading view, Correct answer view c
|
|
46
46
|
|
47
47
|
it('When the user clicks on \'Play\' button, then the audio should start playing. Timer should display the amount of audio that has been played and the total audio length in (mm:ss)/(mm:ss) format.', () => {
|
48
48
|
audioResponsePage.steps.startPlayback();
|
49
|
-
audioResponsePage.steps.
|
49
|
+
audioResponsePage.steps.waitForPlaybackToBeginStandardPreview();
|
50
50
|
audioResponsePage.steps.verifyPlaybackTimeStandardPreview('00:03', '00:10');
|
51
51
|
});
|
52
52
|
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { audioResponsePage, dialogBoxBase } from "../../../pages";
|
3
|
+
|
4
|
+
describe('Create question page - Audio response: Header section and Saving question', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Header section contents', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
13
|
+
});
|
14
|
+
|
15
|
+
audioResponsePage.tests.verifyCreateQuestionPageQuestionTypeHeader('Audio response');
|
16
|
+
});
|
17
|
+
|
18
|
+
describe('Tabs section', () => {
|
19
|
+
abortEarlySetup();
|
20
|
+
before(() => {
|
21
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
22
|
+
});
|
23
|
+
|
24
|
+
audioResponsePage.tests.verifyTabsSection();
|
25
|
+
});
|
26
|
+
|
27
|
+
describe('Cancel button', () => {
|
28
|
+
abortEarlySetup();
|
29
|
+
before(() => {
|
30
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
31
|
+
});
|
32
|
+
|
33
|
+
audioResponsePage.tests.verifyCancelButton('audio response');
|
34
|
+
});
|
35
|
+
|
36
|
+
describe('Save Question button', () => {
|
37
|
+
abortEarlySetup();
|
38
|
+
before(() => {
|
39
|
+
audioResponsePage.steps.navigateToCreateQuestion('audio response');
|
40
|
+
cy.barsPreLoaderWait();
|
41
|
+
});
|
42
|
+
|
43
|
+
describe('Validation error messages', () => {
|
44
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
45
|
+
|
46
|
+
it('Validation error messages should be displayed below required input fields', () => {
|
47
|
+
audioResponsePage.steps.verifyQuestionInstructionsErrorMessage();
|
48
|
+
audioResponsePage.steps.verifyPointsFieldErrorMessage();
|
49
|
+
});
|
50
|
+
|
51
|
+
it('Validation error messages should disappear when required input fields are filled', () => {
|
52
|
+
audioResponsePage.steps.addQuestionInstructions();
|
53
|
+
audioResponsePage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
|
54
|
+
audioResponsePage.steps.allotPoints(20);
|
55
|
+
audioResponsePage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
|
56
|
+
});
|
57
|
+
});
|
58
|
+
|
59
|
+
describe('Saving a question', () => {
|
60
|
+
it('When user has filled all the mandatory fields then on clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
61
|
+
audioResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
62
|
+
});
|
63
|
+
|
64
|
+
audioResponsePage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
65
|
+
});
|
66
|
+
});
|
67
|
+
});
|
@@ -116,7 +116,7 @@ describe('Create item page - Audio response: Preview contents', () => {
|
|
116
116
|
utilities.verifyElementVisibilityState(audioResponsePage.playbackWaveform(), 'visible');
|
117
117
|
utilities.verifyElementVisibilityState(audioResponsePage.previewVolumeMeter(), 'visible');
|
118
118
|
utilities.verifyElementVisibilityState(audioResponsePage.playbackProgressBar(), 'visible');
|
119
|
-
|
119
|
+
audioResponsePage.steps.verifyResponseIsRecordedHelpText();
|
120
120
|
});
|
121
121
|
});
|
122
122
|
});
|
@@ -212,7 +212,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
|
|
212
212
|
audioResponsePage.steps.addWaitToRecordAudio(3000);
|
213
213
|
audioResponsePage.steps.stopRecordingStandardPreview();
|
214
214
|
audioResponsePage.steps.verifyPlaybackTimeStandardPreview('00:00', '00:04');
|
215
|
-
|
215
|
+
audioResponsePage.steps.verifyResponseIsRecordedHelpText();
|
216
216
|
utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
|
217
217
|
utilities.verifyElementVisibilityState(audioResponsePage.standardPreviewRetakeButton(), 'visible');
|
218
218
|
utilities.verifyElementVisibilityState(audioResponsePage.playbackWaveform(), 'visible');
|
@@ -244,7 +244,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
|
|
244
244
|
audioResponsePage.steps.addWaitToRecordAudio(3000);
|
245
245
|
audioResponsePage.steps.pauseRecordingStandardPreview();
|
246
246
|
audioResponsePage.steps.stopRecordingStandardPreview();
|
247
|
-
|
247
|
+
audioResponsePage.steps.verifyResponseIsRecordedHelpText();
|
248
248
|
utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
|
249
249
|
utilities.verifyElementVisibilityState(audioResponsePage.previewVolumeMeter(), 'visible');
|
250
250
|
utilities.verifyElementVisibilityState(audioResponsePage.standardPreviewPlaybackTime(), 'visible');
|
@@ -261,7 +261,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
|
|
261
261
|
audioResponsePage.steps.waitForRecordingToStartStandardPreview();
|
262
262
|
cy.log('Response will keep recording until maximum recording length of 10 seconds is reached');
|
263
263
|
utilities.verifyInnerText(audioResponsePage.standardPreviewRecorderHelpText(), 'Recording...');
|
264
|
-
|
264
|
+
audioResponsePage.steps.verifyResponseIsRecordedHelpText();
|
265
265
|
utilities.verifyElementVisibilityState(audioResponsePage.standardPreviewRetakeButton(), 'visible');
|
266
266
|
utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
|
267
267
|
utilities.verifyElementVisibilityState(audioResponsePage.previewVolumeMeter(), 'visible');
|
@@ -326,7 +326,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
|
|
326
326
|
utilities.verifyCSS(audioResponsePage.playbackProgressBar().find('.MuiSlider-rail'), {
|
327
327
|
'border': `1px solid ${css.color.activeButtons}`
|
328
328
|
});
|
329
|
-
utilities.verifyCSS(audioResponsePage.volumeControlButton().find('[data-name="
|
329
|
+
utilities.verifyCSS(audioResponsePage.volumeControlButton().find('[data-name="compact-volume-icon"]'), {
|
330
330
|
'fill': css.color.activeButtons
|
331
331
|
});
|
332
332
|
utilities.verifyCSS(audioResponsePage.playbackSpeedButton().find('[id="playback-speed"] path'), {
|
@@ -357,7 +357,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
|
|
357
357
|
|
358
358
|
it('When the user clicks on \'Play\' button, then the audio should start playing. Timer should display the amount of audio that has been played and the total audio length in (mm:ss)/(mm:ss) format.', () => {
|
359
359
|
audioResponsePage.steps.startPlayback();
|
360
|
-
audioResponsePage.steps.
|
360
|
+
audioResponsePage.steps.waitForPlaybackToBeginStandardPreview();
|
361
361
|
audioResponsePage.steps.verifyPlaybackTimeStandardPreview('00:03', '00:10');
|
362
362
|
});
|
363
363
|
|
@@ -388,7 +388,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
|
|
388
388
|
audioResponsePage.steps.resetQuestionPreview();
|
389
389
|
audioResponsePage.steps.recordAndSaveAudioStandardPreview(10000);
|
390
390
|
audioResponsePage.steps.startPlayback();
|
391
|
-
audioResponsePage.steps.
|
391
|
+
audioResponsePage.steps.waitForPlaybackToBeginStandardPreview();
|
392
392
|
audioResponsePage.steps.verifyPlaybackTimeStandardPreview('00:05', '00:10');
|
393
393
|
audioResponsePage.steps.pauseAndVerifyProgressBarSliderPosition();
|
394
394
|
audioResponsePage.steps.verifyPlaybackTimeStandardPreview('00:05', '00:10');
|
@@ -475,7 +475,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
|
|
475
475
|
utilities.hoverOverElement(audioResponsePage.playbackSpeedButton());
|
476
476
|
audioResponsePage.steps.selectPlaybackSpeed(`${playbackSpeedOptions[index]}x`);
|
477
477
|
audioResponsePage.steps.startPlayback();
|
478
|
-
audioResponsePage.steps.
|
478
|
+
audioResponsePage.steps.waitForPlaybackToBeginStandardPreview();
|
479
479
|
audioResponsePage.steps.addWaitToPlayAudio(4000);
|
480
480
|
audioResponsePage.steps.pausePlayback();
|
481
481
|
audioResponsePage.steps.verifyPlaybackElapsedTime(1 + (4 * playbackSpeedOptions[index]), 'Standard');
|
@@ -509,7 +509,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
|
|
509
509
|
'font-size': css.fontSize.heading,
|
510
510
|
'font-weight': css.fontWeight.semibold
|
511
511
|
});
|
512
|
-
utilities.verifyCSS(
|
512
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxContent().find('.retake-popup-content'), {
|
513
513
|
'border-top': `1px solid ${css.color.secondaryBtnBorder}`,
|
514
514
|
'color': css.color.labels,
|
515
515
|
'font-size': css.fontSize.default,
|
@@ -530,7 +530,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
|
|
530
530
|
});
|
531
531
|
|
532
532
|
it('Accessibility of \'Retake\' popup', { tags: 'a11y' }, () => {
|
533
|
-
cy.checkAccessibility(
|
533
|
+
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
534
534
|
});
|
535
535
|
|
536
536
|
it('When the user clicks on \'Cancel\' button, \'Retake\' popup should close and previous state of playback player should persist', () => {
|
@@ -538,7 +538,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
|
|
538
538
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
539
539
|
utilities.verifyElementVisibilityState(audioResponsePage.standardPreviewRetakeButton(), 'visible');
|
540
540
|
utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
|
541
|
-
|
541
|
+
audioResponsePage.steps.verifyResponseIsRecordedHelpText();
|
542
542
|
audioResponsePage.steps.verifyPlaybackTimeStandardPreview('00:00', '00:05');
|
543
543
|
});
|
544
544
|
|
@@ -547,7 +547,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
|
|
547
547
|
audioResponsePage.steps.confirmRetake();
|
548
548
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
549
549
|
utilities.verifyInnerText(audioResponsePage.recordingStatusText(), 'Recording...');
|
550
|
-
|
550
|
+
audioResponsePage.steps.verifyResponseIsRecordedHelpText();
|
551
551
|
audioResponsePage.steps.verifyPlaybackTimeStandardPreview('00:00', '00:10');
|
552
552
|
});
|
553
553
|
});
|