itemengine-cypress-automation 1.0.184-e2e-execution-crash-3b9d0d0.0 → 1.0.184

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +79 -0
  2. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +345 -0
  3. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +429 -0
  4. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
  5. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +489 -0
  6. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +313 -0
  7. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
  8. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  9. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  11. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +5 -8
  12. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +417 -28
  13. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  14. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  25. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  26. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
  27. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
  29. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  30. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  31. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  32. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  33. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  34. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  35. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  36. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +11 -3
  37. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  38. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  39. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +230 -0
  40. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  41. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +201 -0
  42. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
  43. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
  44. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +251 -0
  45. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  46. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +128 -0
  47. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +279 -0
  48. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +109 -0
  49. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +278 -0
  50. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +278 -0
  51. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +335 -0
  52. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +250 -0
  53. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +161 -0
  54. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +216 -0
  55. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +252 -0
  56. package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +118 -0
  57. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
  58. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  59. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +155 -0
  60. package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +195 -0
  61. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +78 -0
  62. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  63. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
  64. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +112 -0
  65. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +244 -0
  66. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  67. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
  68. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  69. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +181 -0
  70. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  71. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +57 -1
  72. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +33 -0
  73. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +46 -0
  74. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  75. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  76. package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
  77. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +696 -0
  78. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +173 -0
  79. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +183 -0
  80. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +73 -0
  81. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +204 -0
  82. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +288 -0
  83. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +153 -0
  84. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +164 -0
  85. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +120 -0
  86. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  87. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
  88. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  89. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  90. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  91. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
  92. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
  93. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
  94. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
  95. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
  96. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
  97. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +1 -2
  98. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
  99. package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
  100. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +6 -7
  101. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +179 -0
  102. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
  103. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
  104. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
  105. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
  106. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
  107. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
  108. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  109. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  110. package/cypress/fixtures/constants.js +1 -1
  111. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  112. package/cypress/fixtures/theme/ilc.json +20 -18
  113. package/cypress/pages/audioPlayerPage.js +274 -504
  114. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  115. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  116. package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
  117. package/cypress/pages/components/commonComponents.js +1 -0
  118. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  119. package/cypress/pages/components/equationEditorFlyout.js +3 -2
  120. package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
  121. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
  122. package/cypress/pages/components/imageCanvasComponent.js +2 -1
  123. package/cypress/pages/components/index.js +3 -0
  124. package/cypress/pages/components/layoutSectionComponent.js +1191 -0
  125. package/cypress/pages/components/numberLineCommonComponent.js +36 -0
  126. package/cypress/pages/components/optionsWrapperComponent.js +13 -2
  127. package/cypress/pages/components/playbackControlsBaseComponent.js +20 -13
  128. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
  129. package/cypress/pages/components/toolSettingsComponent.js +6 -0
  130. package/cypress/pages/contentBlocksPage.js +18 -2
  131. package/cypress/pages/createItemPage.js +75 -8
  132. package/cypress/pages/dialogBoxBase.js +2 -2
  133. package/cypress/pages/drawingResponsePage.js +24 -4
  134. package/cypress/pages/feedbackScalePage.js +3 -0
  135. package/cypress/pages/graphingPage.js +19 -1
  136. package/cypress/pages/gridFillPage.js +25 -8
  137. package/cypress/pages/index.js +2 -1
  138. package/cypress/pages/itemPreviewSettingsPage.js +4 -0
  139. package/cypress/pages/listOrderingPage.js +435 -557
  140. package/cypress/pages/matchingPage.js +1 -1
  141. package/cypress/pages/multipleSelectionPage.js +23 -1
  142. package/cypress/pages/numberLineLabelPage.js +333 -0
  143. package/cypress/pages/numberLinePage.js +1370 -132
  144. package/cypress/pages/rulerPage.js +6 -2
  145. package/cypress/pages/textSelectionPage.js +461 -23
  146. package/package.json +1 -1
@@ -0,0 +1,313 @@
1
+ import { audioPlayerPage } from "../../../pages";
2
+ import utilities from "../../../support/helpers/utilities";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import constants from "../../../fixtures/constants";
5
+ const css = Cypress.env('css');
6
+
7
+ describe('Audio player: Edit tab', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ //TODO: Update delete cases after https://redmine.zeuslearning.com/issues/569731 is resolved
13
+ describe('\'Upload audio file\' section', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ audioPlayerPage.steps.navigateToCreateResource('audio player');
17
+ });
18
+
19
+ it('\'Upload audio file\' and \'Add audio URL\' radio buttons should be displayed. By default \'Upload audio file\' button should be selected', () => {
20
+ utilities.verifyInnerText(audioPlayerPage.uploadAudioFileLabel(), 'Upload audio file');
21
+ utilities.verifyElementVisibilityState(audioPlayerPage.uploadAudioFileLabel(), 'visible');
22
+ audioPlayerPage.steps.verifyUploadAudioFileRadioButtonIsSelected();
23
+ utilities.verifyInnerText(audioPlayerPage.addAudioURLLabel(), 'Add audio URL');
24
+ utilities.verifyElementVisibilityState(audioPlayerPage.addAudioURLLabel(), 'visible');
25
+ audioPlayerPage.steps.verifyAddAudioURLRadioButtonIsNotSelected();
26
+ });
27
+
28
+ it('\'Upload\' label should be displayed', () => {
29
+ utilities.verifyInnerText(audioPlayerPage.uploadAudioFileUploadLabel(), 'Upload');
30
+ utilities.verifyElementVisibilityState(audioPlayerPage.uploadAudioFileUploadLabel(), 'visible');
31
+ });
32
+
33
+ it('\'File name\' label should be displayed', () => {
34
+ utilities.verifyInnerText(audioPlayerPage.uploadAudioFileNameLabel(), 'File name');
35
+ utilities.verifyElementVisibilityState(audioPlayerPage.uploadAudioFileNameLabel(), 'visible');
36
+ });
37
+
38
+ it('\'Choose file\' button should be displayed', () => {
39
+ utilities.verifyInnerText(audioPlayerPage.uploadAudioChooseFileButton(), 'Choose file');
40
+ utilities.verifyElementVisibilityState(audioPlayerPage.uploadAudioChooseFileButton(), 'visible');
41
+ });
42
+
43
+ it('By default \'No file chosen\' text should be displayed below the \'File name\' label.', () => {
44
+ utilities.verifyInnerText(audioPlayerPage.uploadAudioNoFileChosenLabel(), 'No file chosen');
45
+ utilities.verifyElementVisibilityState(audioPlayerPage.uploadAudioNoFileChosenLabel(), 'visible');
46
+ });
47
+
48
+ it('CSS of \'Upload audio file\' section', { tags: 'css' }, () => {
49
+ utilities.verifyCSS(audioPlayerPage.uploadAudioFileRadioButton().parent().find('svg'), {
50
+ 'fill': css.color.secondaryBtnActive
51
+ });
52
+ utilities.verifyCSS(audioPlayerPage.addAudioURLRadioButton().parent().find('svg path'), {
53
+ 'color': css.color.uncheckedCheckbox
54
+ });
55
+ utilities.verifyCSS(audioPlayerPage.uploadAudioFileLabel(), {
56
+ 'color': css.color.labels,
57
+ 'font-size': css.fontSize.normal,
58
+ 'font-weight': css.fontWeight.semibold
59
+ });
60
+ utilities.verifyCSS(audioPlayerPage.uploadAudioFileNameLabel(), {
61
+ 'color': css.color.labels,
62
+ 'font-size': css.fontSize.normal,
63
+ 'font-weight': css.fontWeight.semibold
64
+ });
65
+ utilities.verifyCSS(audioPlayerPage.uploadAudioNoFileChosenLabel(), {
66
+ 'color': css.color.liText,
67
+ 'font-size': css.fontSize.default,
68
+ 'font-weight': css.fontWeight.regular
69
+ });
70
+ utilities.verifyCSS(audioPlayerPage.uploadAudioChooseFileButton(), {
71
+ 'background-color': css.color.transparent,
72
+ 'border': `1px solid ${css.color.secondaryBtnBorder}`,
73
+ 'color': css.color.secondaryBtn,
74
+ 'font-size': css.fontSize.default,
75
+ 'font-weight': css.fontWeight.regular
76
+ });
77
+ });
78
+
79
+ it('Accessibility of \'Upload audio file\' section', { tags: 'a11y' }, () => {
80
+ cy.checkAccessibility(audioPlayerPage.uploadAudioFileLabel().parents('.audio-player-resource'));
81
+ });
82
+
83
+ it('When the user adds the audio file and file upload is inprogress, file name and progress bar should be displayed below \'File name\' label. Progress bar should disappear once file is uploaded', () => {
84
+ audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
85
+ utilities.verifyInnerText(audioPlayerPage.uploadedFileNameLabel(), 'sample.mp3');
86
+ utilities.verifyElementVisibilityState(audioPlayerPage.uploadedFileNameLabel(), 'visible');
87
+ });
88
+
89
+ it('CSS of progress bar and file name when file upload is in progress', { tags: 'css' }, () => {
90
+ audioPlayerPage.steps.attachFile('uploads/sample1.mp3');
91
+ audioPlayerPage.audioFileUploadProgressBar()
92
+ .verifyPseudoClassBeforeProperty('background-color', css.color.fileUploadProgressBarFill);
93
+ });
94
+
95
+ it('Accessibility of progress bar and file name when file upload is in progress', { tags: 'a11y' }, () => {
96
+ cy.checkAccessibility(audioPlayerPage.uploadAudioFileLabel().parents('.audio-player-resource'));
97
+ });
98
+
99
+ it('When user clicks on \'Choose file\' button again and upload another audio file, previously uploaded audio file should get replaced with new audio file', () => {
100
+ audioPlayerPage.steps.uploadFile('uploads/sample2.mp3');
101
+ utilities.verifyInnerText(audioPlayerPage.uploadedFileNameLabel(), 'sample2.mp3');
102
+ utilities.verifyElementVisibilityState(audioPlayerPage.uploadedFileNameLabel(), 'visible');
103
+ });
104
+
105
+ it('When the user uploads a file that is not supported, following error message should be displayed: \'Error: The file type is not supported. Please upload a file with the following supported formats: MP3, WAV, AAC.\'', () => {
106
+ audioPlayerPage.steps.uploadFile('uploads/sample.mp4')
107
+ utilities.verifyInnerText(audioPlayerPage.errorMessage(), 'Error: The file type is not supported. Please upload a file with the following supported formats: MP3, WAV, AAC.');
108
+ utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'visible');
109
+ });
110
+
111
+ audioPlayerPage.tests.verifyErrorMessageCSSAndA11y();
112
+
113
+ it('When user upload supported format of audio file, error message should disappear', () => {
114
+ audioPlayerPage.steps.uploadFile('uploads/sample2.mp3');
115
+ utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'notExist');
116
+ });
117
+
118
+ it('When user has uploaded an audio file, then delete button should appear beside uploaded file\'s name', () => {
119
+ utilities.verifyElementVisibilityState(audioPlayerPage.deleteAudioFileButton(), 'visible');
120
+ });
121
+
122
+ it('When the user hovers on \'Delete\' button, \'Delete audio file\' text should be displayed in tooltip', () => {
123
+ audioPlayerPage.deleteAudioFileButton()
124
+ .verifyTooltip('Delete audio file');
125
+ });
126
+
127
+ it('CSS of tooltip', { tags: 'css' }, () => {
128
+ audioPlayerPage.deleteAudioFileButton()
129
+ .trigger('mouseover');
130
+ utilities.verifyCSS(audioPlayerPage.tooltipText(), {
131
+ 'color': css.color.whiteText,
132
+ 'font-size': css.fontSize.normal,
133
+ 'font-weight': css.fontWeight.regular,
134
+ 'background-color': css.color.tooltipBg
135
+ });
136
+ });
137
+
138
+ it('When user clicks on the \'Delete\' button, then \'Delete\' popup should be displayed', () => {
139
+ audioPlayerPage.steps.deleteAudioFile();
140
+ utilities.verifyElementVisibilityState(audioPlayerPage.dialogBox(), 'visible');
141
+ utilities.verifyInnerText(audioPlayerPage.dialogBoxTitle(), 'Delete');
142
+ });
143
+
144
+ it('The pop up should be displayed with the message \'Are you sure you want to delete the audio file?\'', () => {
145
+ utilities.verifyInnerText(audioPlayerPage.dialogBoxContent(), 'Are you sure you want to delete the audio file?');
146
+ utilities.verifyInnerText(audioPlayerPage.buttonAccept(), 'Delete audio file');
147
+ utilities.verifyInnerText(audioPlayerPage.buttonReject(), 'Cancel');
148
+ });
149
+
150
+ it('CSS of popup', { tags: 'css' }, () => {
151
+ utilities.verifyCSS(audioPlayerPage.dialogBox(), {
152
+ 'background-color': css.color.defaultBackground,
153
+ });
154
+ utilities.verifyCSS(audioPlayerPage.dialogBoxContent().find('[class*="DeletePopupWrapper"]'), {
155
+ 'color': css.color.sectionHeading,
156
+ 'font-size': css.fontSize.default,
157
+ 'font-weight': css.fontWeight.regular
158
+ });
159
+ utilities.verifyCSS(audioPlayerPage.buttonAccept(), {
160
+ 'color': css.color.primaryBtn,
161
+ 'font-size': css.fontSize.default,
162
+ 'font-weight': css.fontWeight.semibold
163
+ });
164
+ utilities.verifyCSS(audioPlayerPage.buttonReject(), {
165
+ 'color': css.color.secondaryBtn,
166
+ 'font-size': css.fontSize.default,
167
+ 'font-weight': css.fontWeight.semibold,
168
+ 'background-color': css.color.defaultBackground
169
+ });
170
+ });
171
+
172
+ it('Accessibility of the popup', () => {
173
+ cy.checkAccessibility(audioPlayerPage.dialogBox());
174
+ });
175
+
176
+ it('When user clicks on \'Cancel\' button, then popup should close and user should remain on the edit interface of the question', () => {
177
+ audioPlayerPage.steps.clickOnRejectButtonInDialogBox();
178
+ utilities.verifyElementVisibilityState(audioPlayerPage.dialogBox(), 'notExist');
179
+ utilities.verifyInnerText(audioPlayerPage.uploadedFileNameLabel(), 'sample2.mp3');
180
+ });
181
+
182
+ it('When user clicks on \'Delete\' button, then popup should close and uploaded audio file should be deleted', () => {
183
+ audioPlayerPage.steps.deleteAudioFile();
184
+ audioPlayerPage.steps.clickOnAcceptButtonInDialogBox();
185
+ utilities.verifyElementVisibilityState(audioPlayerPage.dialogBox(), 'notExist');
186
+ utilities.verifyInnerText(audioPlayerPage.uploadAudioNoFileChosenLabel(), 'No file chosen');
187
+ });
188
+ });
189
+
190
+ describe('\'Add audio URL\' section', () => {
191
+ abortEarlySetup();
192
+ before(() => {
193
+ audioPlayerPage.steps.navigateToCreateResource('audio player');
194
+ });
195
+
196
+ it('User should be able to select \'Add audio URL\' radio button', () => {
197
+ audioPlayerPage.steps.selectAddAudioURLRadioButton();
198
+ audioPlayerPage.steps.verifyUploadAudioFileRadioButtonIsNotSelected();
199
+ })
200
+
201
+ it('\'Source URL\' label and input field should be displayed. By default, the source url input field should be empty', () => {
202
+ utilities.verifyInnerText(audioPlayerPage.sourceUrlLabel(), 'Source URL');
203
+ utilities.verifyElementVisibilityState(audioPlayerPage.sourceUrlLabel(), 'visible');
204
+ utilities.verifyElementVisibilityState(audioPlayerPage.sourceUrlInputField(), 'visible');
205
+ utilities.verifyInnerText(audioPlayerPage.sourceUrlInputField(), '');
206
+ });
207
+
208
+ it('CSS of \'Add audio URL\' Section', { tags: 'css' }, () => {
209
+ utilities.verifyCSS(audioPlayerPage.sourceUrlLabel(), {
210
+ 'color': css.color.labels,
211
+ 'font-size': css.fontSize.normal,
212
+ 'font-weight': css.fontWeight.semibold
213
+ });
214
+ utilities.verifyCSS(audioPlayerPage.sourceUrlInputField(), {
215
+ 'color': css.color.text,
216
+ 'font-size': css.fontSize.default,
217
+ 'font-weight': css.fontWeight.regular
218
+ });
219
+ });
220
+
221
+ it('Accessibility of \'Add audio URL\' section', { tags: 'a11y' }, () => {
222
+ cy.checkAccessibility(audioPlayerPage.addAudioURLLabel().parents('.audio-player-resource'));
223
+ });
224
+
225
+ it('When user focuses in and out of the \'Source URL\' input field, \'Error: Source URL is required.\' error message should be displayed below \'Source URL\' input field.', () => {
226
+ audioPlayerPage.steps.focusInAndFocusOutOfSourceURLInputField();
227
+ utilities.verifyInnerText(audioPlayerPage.errorMessage(), 'Error: Source URL is required.');
228
+ utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'visible');
229
+ });
230
+
231
+ audioPlayerPage.tests.verifyErrorMessageCSSAndA11y();
232
+
233
+ it('When user adds a MP3 file in \'Source URL\' input field, \'Error: Source URL is required.\' validation message should disappear', () => {
234
+ audioPlayerPage.steps.enterTextInSourceURLInputField(constants.sampleMp3Link);
235
+ utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'notExist');
236
+ });
237
+
238
+ it('When user adds invalid file format URL in \'Source URL\' input field, \'Error: The provided URL does not link to a supported audio file. Please enter a URL for a MP3, WAV, AAC file.\' validation message should be displayed', () => {
239
+ audioPlayerPage.steps.clearTextInSourceURLInputField();
240
+ audioPlayerPage.steps.enterTextInSourceURLInputField(constants.foxImageLink);
241
+ utilities.verifyInnerText(audioPlayerPage.errorMessage(), 'Error: The provided URL does not link to a supported audio file. Please enter a URL for a MP3, WAV, AAC file.');
242
+ utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'visible');
243
+ });
244
+
245
+ audioPlayerPage.tests.verifyErrorMessageCSSAndA11y();
246
+
247
+ it('When user adds valid file URL in \'Source URL\' input field, \'Error: The provided URL does not link to a supported audio file. Please enter a URL for a MP3, WAV, AAC file.\' validation message should disappear', () => {
248
+ audioPlayerPage.steps.clearTextInSourceURLInputField();
249
+ audioPlayerPage.steps.enterTextInSourceURLInputField(constants.sampleMp3Link);
250
+ utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'notExist');
251
+ });
252
+
253
+ it('When user adds invalid text in \'Source URL\' input field, \'Error: The provided URL does not link to a supported audio file. Please enter a URL for a MP3, WAV, AAC file.\' validation message should be displayed', () => {
254
+ audioPlayerPage.steps.clearTextInSourceURLInputField();
255
+ audioPlayerPage.steps.enterTextInSourceURLInputField('Invalid text');
256
+ utilities.verifyInnerText(audioPlayerPage.errorMessage(), 'Error: The provided URL does not link to a supported audio file. Please enter a URL for a MP3, WAV, AAC file.');
257
+ utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'visible');
258
+ });
259
+ });
260
+
261
+ describe('\'Upload audio file\' and \'Add audio URL\' functionality in preview tab', () => {
262
+ abortEarlySetup();
263
+ before(() => {
264
+ audioPlayerPage.steps.navigateToCreateResource('audio player');
265
+ audioPlayerPage.steps.switchToPreviewTab();
266
+ });
267
+
268
+ it('When user has not uploaded any audio file nor added any URL and clicks on \'Play\' button in preview tab, then error message \'Error loading audio\'', () => {
269
+ audioPlayerPage.steps.startPlayback();
270
+ utilities.verifyInnerText(audioPlayerPage.errorMessage(), 'Error loading audio');
271
+ utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'visible');
272
+ });
273
+
274
+ audioPlayerPage.tests.verifyErrorMessageCSSAndA11y();
275
+
276
+ it('When user has uploaded an invalid file and clicks on \'Play\' button in preview tab, then error message \'Error loading audio\'', () => {
277
+ audioPlayerPage.steps.switchToEditTab();
278
+ audioPlayerPage.steps.uploadFile('uploads/sample.mp4');
279
+ audioPlayerPage.steps.switchToPreviewTab();
280
+ audioPlayerPage.steps.startPlayback();
281
+ utilities.verifyInnerText(audioPlayerPage.errorMessage(), 'Error loading audio');
282
+ utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'visible');
283
+ });
284
+
285
+ it('When user adds invalid file format URL in \'Source URL\' input field and clicks on \'Play\' button in preview tab, then error message \'Error loading audio\'', () => {
286
+ audioPlayerPage.steps.switchToEditTab();
287
+ audioPlayerPage.steps.selectAddAudioURLRadioButton();
288
+ audioPlayerPage.steps.enterTextInSourceURLInputField(constants.foxImageLink);
289
+ audioPlayerPage.steps.switchToPreviewTab();
290
+ audioPlayerPage.steps.startPlayback();
291
+ utilities.verifyInnerText(audioPlayerPage.errorMessage(), 'Error loading audio');
292
+ utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'visible');
293
+ });
294
+
295
+ it('When user valid file format URL in \'Source URL\' input field, then audio player should be displayed in preview tab and user should be able to play MP3 audio file.', () => {
296
+ audioPlayerPage.steps.switchToEditTab();
297
+ audioPlayerPage.steps.clearTextInSourceURLInputField();
298
+ audioPlayerPage.steps.enterTextInSourceURLInputField(constants.sampleWAVLink);
299
+ audioPlayerPage.steps.switchToPreviewTab();
300
+ audioPlayerPage.steps.startPlayback();
301
+ audioPlayerPage.steps.waitForPlaybackToBegin();
302
+ });
303
+
304
+ it('When user uploads a valid file, then audio player should be displayed in preview tab and user should be able to play MP3 audio file.', () => {
305
+ audioPlayerPage.steps.switchToEditTab();
306
+ audioPlayerPage.steps.selectUploadAudioFileRadioButton();
307
+ audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
308
+ audioPlayerPage.steps.switchToPreviewTab();
309
+ audioPlayerPage.steps.startPlayback();
310
+ audioPlayerPage.steps.waitForPlaybackToBegin();
311
+ });
312
+ });
313
+ });
@@ -434,7 +434,7 @@ describe('Preview of Audio response for bar audio recorder style', () => {
434
434
  audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
435
435
  });
436
436
 
437
- audioResponsePage.tests.verifyPlaybackSpeedContents();
437
+ audioResponsePage.tests.verifyPlaybackSpeedContents(playbackSpeedOptions);
438
438
 
439
439
  for (let index = 0; index < playbackSpeedOptions.length; index++) {
440
440
  it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the audio playback speed should be changed accordingly`, () => {
@@ -426,7 +426,7 @@ describe('Preview of Audio response for compact audio recorder style', () => {
426
426
  audioResponsePage.steps.recordAndSaveAudioCompactPreview(10000);
427
427
  });
428
428
 
429
- audioResponsePage.tests.verifyPlaybackSpeedContents();
429
+ audioResponsePage.tests.verifyPlaybackSpeedContents(playbackSpeedOptions);
430
430
 
431
431
  for (let index = 0; index < playbackSpeedOptions.length; index++) {
432
432
  it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the audio playback speed should be changed accordingly`, () => {
@@ -465,7 +465,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
465
465
  audioResponsePage.steps.recordAndSaveAudioStandardPreview(10000);
466
466
  });
467
467
 
468
- audioResponsePage.tests.verifyPlaybackSpeedContents();
468
+ audioResponsePage.tests.verifyPlaybackSpeedContents(playbackSpeedOptions);
469
469
 
470
470
  for (let index = 0; index < playbackSpeedOptions.length; index++) {
471
471
  it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the audio playback speed should be changed accordingly`, () => {
@@ -327,7 +327,7 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
327
327
 
328
328
  it('When the user selects a filled option and clicks in the options container, the selected option should get back in the options container', () => {
329
329
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionFromDropzoneToOptionContainerPreviewTab('Eagle', 0);
330
- dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(['Whale', 'Platypus', 'Eagle']);
330
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(['Parrot', 'Whale', 'Eagle']);
331
331
  });
332
332
  });
333
333
 
@@ -36,10 +36,8 @@ describe('Create item page - Drawing response: Grading view, Correct answer view
36
36
  .then(($refID) => {
37
37
  itemReferenceID = $refID;
38
38
  cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
39
- drawingResponsePage.steps.selectStudentViewToolbarOption('text');
39
+ drawingResponsePage.steps.selectStudentViewToolbarOption('Curved line');
40
40
  drawingResponsePage.steps.clickOnStudentViewUpperCanvas();
41
- drawingResponsePage.steps.selectPreviewTabSecondaryToolbarOption('Special characters');
42
- drawingResponsePage.steps.selectCustomSpecialCharacter();
43
41
  studentViewPage.steps.submitResponse();
44
42
  studentViewPage.steps.clickOnGoToGradingViewButton();
45
43
  });
@@ -51,11 +49,10 @@ describe('Create item page - Drawing response: Grading view, Correct answer view
51
49
  utilities.verifyElementVisibilityState(drawingResponsePage.questionInstructionsText(), 'visible');
52
50
  });
53
51
 
54
- it('A preview of the canvas along with the selected tools and controls should be displayed. All contents inside the canvas should be in disabled state', () => {
55
- for (let index = 0; index < defaultToolbarAndControlOptions.length; index++) {
56
- utilities.verifyElementVisibilityState(drawingResponsePage.studentAndGradingViewDrawingToolbarOption(defaultToolbarAndControlOptions[index]), 'visible');
57
- }
58
- utilities.verifyElementDisabledClass(drawingResponsePage.drawingToolWrapper())
52
+ it('A preview of the canvas along with the play button should be displayed and user should be able to click on the play button', () => {
53
+ utilities.verifyElementVisibilityState(drawingResponsePage.gradingViewPlayFeatureButton(), 'visible');
54
+ utilities.verifyElementVisibilityState(drawingResponsePage.previewTabLowerCanvas(), 'visible');
55
+ drawingResponsePage.steps.clickOnPlayButtonInGradingView();
59
56
  });
60
57
 
61
58
  it('Empty score input field and total score should be displayed', () => {