itemengine-cypress-automation 1.0.193-packageUpdated-b3f3d0b.0 → 1.0.193

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +3 -3
  2. package/cypress/e2e/ILC/AudioPlayerNew/audioOverviewAndTranscript.js +568 -0
  3. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +4 -4
  4. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +5 -5
  5. package/cypress/e2e/ILC/AudioPlayerNew/customizePlayerLayoutSettings.js +2 -2
  6. package/cypress/e2e/ILC/AudioPlayerNew/headerSection.js +125 -0
  7. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +5 -5
  8. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +4 -4
  9. package/cypress/e2e/ILC/AudioPlayerNew/studentViewSettings.js +3 -3
  10. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +19 -17
  11. package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +7 -4
  12. package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +366 -0
  13. package/cypress/e2e/ILC/ChartsLine/checkAnswerFunctionalityForAllViews.smoke.js +183 -0
  14. package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +281 -0
  15. package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +595 -0
  16. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +8 -8
  17. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +241 -0
  18. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +241 -0
  19. package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternatePoints.js +285 -0
  20. package/cypress/e2e/ILC/ImageHighlight/Scoring/manuallyAndNonScored.js +164 -0
  21. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +281 -0
  22. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsScoring.js +467 -0
  23. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +250 -0
  24. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeigtsCorrectPointsGreaterThanAlternativePoints.js +281 -0
  25. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +260 -0
  26. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsScoring.js +184 -0
  27. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +229 -0
  28. package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +261 -0
  29. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +409 -0
  30. package/cypress/e2e/ILC/chartsDotsPlot/checkAnswerFunctionalityForAllViews.smoke.js +199 -0
  31. package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +223 -0
  32. package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +402 -0
  33. package/cypress/pages/audioPlayerPage.js +229 -9
  34. package/cypress/pages/chartsBarPage.js +2 -70
  35. package/cypress/pages/chartsDotPlotPage.js +986 -3
  36. package/cypress/pages/chartsLinePage.js +368 -9
  37. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +0 -1
  38. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
  39. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
  40. package/cypress/pages/components/barAndLineChartComponent.js +27 -1
  41. package/cypress/pages/components/chartsCommonComponent.js +31 -2
  42. package/cypress/pages/components/createQuestionBasePage.js +1 -0
  43. package/cypress/pages/components/layoutSectionComponent.js +2 -2
  44. package/cypress/pages/components/singleMultipleSelectionModeComponent.js +5 -0
  45. package/cypress/pages/components/toolSettingsComponent.js +2 -2
  46. package/cypress/pages/feedbackScalePage.js +1 -1
  47. package/cypress/pages/gridFillPage.js +13 -6
  48. package/cypress/pages/imageHighlightPage.js +308 -2
  49. package/cypress/pages/numberLinePage.js +40 -16
  50. package/cypress/pages/videoResponsePage.js +350 -6
  51. package/package.json +1 -1
@@ -12,7 +12,7 @@ describe('Compact audio player style - Default : Preview tab functionality', ()
12
12
  abortEarlySetup();
13
13
  before(() => {
14
14
  audioPlayerPage.steps.navigateToCreateResource('audio player');
15
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
15
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
16
16
  audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Compact');
17
17
  audioPlayerPage.steps.switchToPreviewTab();
18
18
  });
@@ -128,7 +128,7 @@ describe('Compact audio player style - Default : Preview tab functionality', ()
128
128
  abortEarlySetup();
129
129
  before(() => {
130
130
  audioPlayerPage.steps.navigateToCreateResource('audio player');
131
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
131
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
132
132
  audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Compact');
133
133
  audioPlayerPage.steps.switchToPreviewTab();
134
134
  audioPlayerPage.steps.clickOnPlayButton();
@@ -222,7 +222,7 @@ describe('Compact audio player style - Default : Preview tab functionality', ()
222
222
  abortEarlySetup();
223
223
  before(() => {
224
224
  audioPlayerPage.steps.navigateToCreateResource('audio player');
225
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
225
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
226
226
  audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Compact');
227
227
  audioPlayerPage.steps.switchToPreviewTab();
228
228
  audioPlayerPage.steps.clickOnPlayButton();
@@ -298,7 +298,7 @@ describe('Compact audio player style - Default : Preview tab functionality', ()
298
298
  abortEarlySetup();
299
299
  before(() => {
300
300
  audioPlayerPage.steps.navigateToCreateResource('audio player');
301
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
301
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
302
302
  audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Compact');
303
303
  audioPlayerPage.steps.switchToPreviewTab();
304
304
  audioPlayerPage.steps.clickOnPlayButton();
@@ -326,7 +326,7 @@ describe('Compact audio player style - Default : Preview tab functionality', ()
326
326
  abortEarlySetup();
327
327
  before(() => {
328
328
  audioPlayerPage.steps.navigateToCreateResource('audio player');
329
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
329
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
330
330
  audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Compact');
331
331
  audioPlayerPage.steps.switchToPreviewTab();
332
332
  audioPlayerPage.steps.clickOnPlayButton();
@@ -157,7 +157,7 @@ describe('Create Item page - Audio player: Customize player layout settings', ()
157
157
  abortEarlySetup();
158
158
  before(() => {
159
159
  audioPlayerPage.steps.navigateToCreateResource('audio player');
160
- audioPlayerPage.steps.uploadFile('uploads/sample10sec.mp3');
160
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample10sec.mp3');
161
161
  audioPlayerPage.steps.expandCustomizePlayerLayoutSettingsAccordion();
162
162
  audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Standard');
163
163
  });
@@ -242,7 +242,7 @@ describe('Create Item page - Audio player: Customize player layout settings', ()
242
242
  abortEarlySetup();
243
243
  before(() => {
244
244
  audioPlayerPage.steps.navigateToCreateResource('audio player');
245
- audioPlayerPage.steps.uploadFile('uploads/sample10sec.mp3');
245
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample10sec.mp3');
246
246
  audioPlayerPage.steps.expandCustomizePlayerLayoutSettingsAccordion();
247
247
  audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Standard');
248
248
  audioPlayerPage.steps.switchToPreviewTab();
@@ -0,0 +1,125 @@
1
+ import { audioPlayerPage, dialogBoxBase, selectQuestionResourceToolPage } 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('Create question page - Audio player: Header section and saving resource tool', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Header section contents', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ audioPlayerPage.steps.navigateToCreateResource('audio player');
16
+ });
17
+
18
+ audioPlayerPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Audio player');
19
+ });
20
+
21
+ describe('Tabs section', () => {
22
+ abortEarlySetup();
23
+ before(() => {
24
+ audioPlayerPage.steps.navigateToCreateResource('audio player');
25
+ });
26
+
27
+ audioPlayerPage.tests.verifyTabsSection();
28
+ });
29
+
30
+ describe('Cancel button', () => {
31
+ abortEarlySetup();
32
+ before(() => {
33
+ audioPlayerPage.steps.navigateToCreateResource('audio player');
34
+ });
35
+
36
+ it('When user has made no edits and clicks on cancel button, the user should be directed back to the \'Select a question or tool\' page', () => {
37
+ audioPlayerPage.steps.clickOnCancelButton();
38
+ utilities.verifyElementVisibilityState(selectQuestionResourceToolPage.selectAQuestionHeaderText(), 'visible');
39
+ utilities.verifyElementVisibilityState(selectQuestionResourceToolPage.resourceAndToolOptionTitle(), 'visible');
40
+ });
41
+
42
+ it('When user has made some edits/changes and clicks on cancel button, a popup should be displayed with message \'Are you sure you want to leave this page? Your changes have not been saved.\'', () => {
43
+ selectQuestionResourceToolPage.steps.selectQuestionType('audio player');
44
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
45
+ audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Standard');
46
+ audioPlayerPage.steps.clickOnCancelButton();
47
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
48
+ utilities.verifyInnerText(dialogBoxBase.dialogBoxContent(), 'Are you sure you want to leave this page? Your changes have not been saved.');
49
+ utilities.verifyInnerText(dialogBoxBase.buttonAccept(), 'Yes, I want to leave this page');
50
+ utilities.verifyInnerText(dialogBoxBase.buttonReject(), 'No, I\'d like to go back');
51
+ });
52
+
53
+ it('CSS of popup', { tags: 'css' }, () => {
54
+ utilities.verifyCSS(dialogBoxBase.dialogBox(), {
55
+ 'background-color': css.color.defaultBackground
56
+ })
57
+
58
+ utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
59
+ 'color': css.color.sectionHeading,
60
+ 'font-size': css.fontSize.default,
61
+ 'font-weight': css.fontWeight.regular
62
+ });
63
+ utilities.verifyCSS(dialogBoxBase.buttonAccept(), {
64
+ 'color': css.color.primaryBtn,
65
+ 'font-size': css.fontSize.default,
66
+ 'font-weight': css.fontWeight.semibold,
67
+ 'background-color': css.color.primaryBtnBg
68
+ });
69
+ utilities.verifyCSS(dialogBoxBase.buttonReject(), {
70
+ 'color': css.color.secondaryBtn,
71
+ 'font-size': css.fontSize.default,
72
+ 'font-weight': css.fontWeight.semibold,
73
+ 'background-color': css.color.transparent
74
+ });
75
+ });
76
+
77
+ it('Accessibility of popup', { tags: 'a11y' }, () => {
78
+ cy.checkAccessibility(dialogBoxBase.dialogBox());
79
+ });
80
+
81
+ 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`, () => {
82
+ dialogBoxBase.steps.clickOnRejectButtonInDialogBox()
83
+ audioPlayerPage.steps.verifyEditTabSelectedState()
84
+ utilities.verifyElementVisibilityState(audioPlayerPage.audioPlayerStyleLabel(), 'visible');
85
+ });
86
+
87
+ it(`Clicking on \'Yes, I want to leave this page\' button should should discard all changes and direct the user to the \'Select a question\' page.`, () => {
88
+ audioPlayerPage.steps.clickOnCancelButton();
89
+ dialogBoxBase.steps.clickOnAcceptButtonInDialogBox()
90
+ utilities.verifyElementVisibilityState(selectQuestionResourceToolPage.selectAQuestionHeaderText(), 'visible');
91
+ utilities.verifyElementVisibilityState(selectQuestionResourceToolPage.resourceAndToolOptionTitle(), 'visible');
92
+ });
93
+ });
94
+
95
+ describe('Save button', () => {
96
+ abortEarlySetup();
97
+ before(() => {
98
+ audioPlayerPage.steps.navigateToCreateResource('audio player');
99
+ });
100
+
101
+ describe('Validation error messages', () => {
102
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
103
+
104
+ it('Validation error message(s) should be displayed below required input field(s)', () => {
105
+ utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'visible');
106
+ utilities.verifyInnerText(audioPlayerPage.errorMessage(), 'Error: The file type is not supported. Please upload a file with the following supported formats: MP3, WAV, AAC.');
107
+ });
108
+
109
+ it('Validation error message(s) should disappear when required input field(s) are filled', () => {
110
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
111
+ audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
112
+ });
113
+
114
+ audioPlayerPage.tests.verifyCreateItemWrapperContentsA11y();
115
+ });
116
+
117
+ describe('Saving a resource tool', () => {
118
+ it('When user has filled all the mandatory fields then on clicking on \'Save\' button, the resource tool should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
119
+ audioPlayerPage.steps.saveAQuestionAndVerifySnackbar();
120
+ });
121
+
122
+ audioPlayerPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
123
+ });
124
+ });
125
+ });
@@ -20,8 +20,8 @@ describe('Preview tab contents for all views', () => {
20
20
  switch (view) {
21
21
  case 'Question preview':
22
22
  audioPlayerPage.steps.navigateToCreateResource('audio player');
23
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
24
- audioPlayerPage.steps.addInputToAudioDescriptionInputField('Sample audio description');
23
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
24
+ audioPlayerPage.steps.addInputToAudioOverviewInputField('Sample audio description');
25
25
  audioPlayerPage.steps.selectTypeInTranscriptRadioButton();
26
26
  audioPlayerPage.steps.enterTextInTranscriptInputField('Sample transcript');
27
27
  audioPlayerPage.steps.switchToPreviewTab();
@@ -107,7 +107,7 @@ describe('Preview tab contents for all views', () => {
107
107
  });
108
108
 
109
109
  it('The added audio description and transcript should be displayed in preview tab', () => {
110
- utilities.verifyInnerText(audioPlayerPage.descriptionPreviewTab(), 'Sample audio description');
110
+ utilities.verifyInnerText(audioPlayerPage.audioOverviewPreviewTab(), 'Sample audio description');
111
111
  utilities.verifyElementVisibilityState(audioPlayerPage.playbackSpeedButton(), 'visible');
112
112
  audioPlayerPage.steps.clickOnTranscriptButton();
113
113
  utilities.verifyInnerText(audioPlayerPage.transcriptContentPreviewTab(), 'Sample transcript');
@@ -142,7 +142,7 @@ describe('Preview tab contents for all views', () => {
142
142
  utilities.verifyCSS(audioPlayerPage.transcriptButton(), {
143
143
  'background-color': css.color.selectToolbarOptionBg
144
144
  });
145
- utilities.verifyCSS(audioPlayerPage.descriptionPreviewTab(), {
145
+ utilities.verifyCSS(audioPlayerPage.audioOverviewPreviewTab(), {
146
146
  'color': css.color.text,
147
147
  'font-size': css.fontSize.default,
148
148
  'font-weight': css.fontWeight.regular
@@ -155,7 +155,7 @@ describe('Preview tab contents for all views', () => {
155
155
  });
156
156
 
157
157
  it('Accessibility of standard recording interface in Preview tab', { tags: 'a11y' }, () => {
158
- cy.checkAccessibility(audioPlayerPage.descriptionPreviewTab().parents('.audio-resource-preview-wrapper'));
158
+ cy.checkAccessibility(audioPlayerPage.audioOverviewPreviewTab().parents('.audio-resource-preview-wrapper'));
159
159
  });
160
160
  });
161
161
  });
@@ -147,7 +147,7 @@ describe('Standard audio player style: Edit tab contents and preview tab functio
147
147
  abortEarlySetup();
148
148
  before(() => {
149
149
  audioPlayerPage.steps.navigateToCreateResource('audio player');
150
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
150
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
151
151
  audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Standard');
152
152
  audioPlayerPage.steps.switchToPreviewTab();
153
153
  });
@@ -274,7 +274,7 @@ describe('Standard audio player style: Edit tab contents and preview tab functio
274
274
  abortEarlySetup();
275
275
  before(() => {
276
276
  audioPlayerPage.steps.navigateToCreateResource('audio player');
277
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
277
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
278
278
  audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Standard');
279
279
  audioPlayerPage.steps.switchToPreviewTab();
280
280
  audioPlayerPage.steps.startPlayback();
@@ -377,7 +377,7 @@ describe('Standard audio player style: Edit tab contents and preview tab functio
377
377
  abortEarlySetup();
378
378
  before(() => {
379
379
  audioPlayerPage.steps.navigateToCreateResource('audio player');
380
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
380
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
381
381
  audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Standard');
382
382
  audioPlayerPage.steps.switchToPreviewTab();
383
383
  });
@@ -403,7 +403,7 @@ describe('Standard audio player style: Edit tab contents and preview tab functio
403
403
  abortEarlySetup();
404
404
  before(() => {
405
405
  audioPlayerPage.steps.navigateToCreateResource('audio player');
406
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
406
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
407
407
  audioPlayerPage.steps.selectAudioPlayerStyleToggleButton('Standard');
408
408
  audioPlayerPage.steps.switchToPreviewTab();
409
409
  });
@@ -64,7 +64,7 @@ describe('Student view settings - Allow students to download audio and Limit pla
64
64
 
65
65
  it('When the user focuses in and out of the \'Play attempts limit\' input field, no error message should be displayed', () => {
66
66
  audioPlayerPage.steps.focusInAndFocusOutOfPlayAttemptsLimitInputField()
67
- utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'notExist');
67
+ audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
68
68
  })
69
69
 
70
70
  it('CSS of student view settings section', { tags: 'css' }, () => {
@@ -114,7 +114,7 @@ describe('Student view settings - Allow students to download audio and Limit pla
114
114
  abortEarlySetup();
115
115
  before(() => {
116
116
  audioPlayerPage.steps.navigateToCreateResource('audio player');
117
- audioPlayerPage.steps.uploadFile('uploads/sample10Sec.mp3');
117
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample10Sec.mp3');
118
118
  audioPlayerPage.steps.switchToPreviewTab();
119
119
  });
120
120
 
@@ -159,7 +159,7 @@ describe('Student view settings - Allow students to download audio and Limit pla
159
159
  abortEarlySetup();
160
160
  before(() => {
161
161
  audioPlayerPage.steps.navigateToCreateResource('audio player');
162
- audioPlayerPage.steps.uploadFile('uploads/sample10Sec.mp3');
162
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample10Sec.mp3');
163
163
  audioPlayerPage.steps.switchToPreviewTab();
164
164
  });
165
165
 
@@ -1,4 +1,4 @@
1
- import { audioPlayerPage } from "../../../pages";
1
+ import { audioPlayerPage, dialogBoxBase } from "../../../pages";
2
2
  import utilities from "../../../support/helpers/utilities";
3
3
  import abortEarlySetup from "../../../support/helpers/abortEarly";
4
4
  import constants from "../../../fixtures/constants";
@@ -81,9 +81,11 @@ describe('Audio player: Edit tab', () => {
81
81
  });
82
82
 
83
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');
84
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
85
+ utilities.verifyElementVisibilityState(audioPlayerPage.audioFileUploadProgressBar(), 'visible');
85
86
  utilities.verifyInnerText(audioPlayerPage.uploadedFileNameLabel(), 'sample.mp3');
86
87
  utilities.verifyElementVisibilityState(audioPlayerPage.uploadedFileNameLabel(), 'visible');
88
+ utilities.verifyElementVisibilityState(audioPlayerPage.audioFileUploadProgressBar(), 'hidden');
87
89
  });
88
90
 
89
91
  it('CSS of progress bar and file name when file upload is in progress', { tags: 'css' }, () => {
@@ -97,13 +99,13 @@ describe('Audio player: Edit tab', () => {
97
99
  });
98
100
 
99
101
  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');
102
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample2.mp3');
101
103
  utilities.verifyInnerText(audioPlayerPage.uploadedFileNameLabel(), 'sample2.mp3');
102
104
  utilities.verifyElementVisibilityState(audioPlayerPage.uploadedFileNameLabel(), 'visible');
103
105
  });
104
106
 
105
107
  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')
108
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp4')
107
109
  utilities.verifyInnerText(audioPlayerPage.errorMessage(), 'Error: The file type is not supported. Please upload a file with the following supported formats: MP3, WAV, AAC.');
108
110
  utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'visible');
109
111
  });
@@ -111,8 +113,8 @@ describe('Audio player: Edit tab', () => {
111
113
  audioPlayerPage.tests.verifyErrorMessageCSSAndA11y();
112
114
 
113
115
  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
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample2.mp3');
117
+ audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
116
118
  });
117
119
 
118
120
  it('When user has uploaded an audio file, then delete button should appear beside uploaded file\'s name', () => {
@@ -137,7 +139,7 @@ describe('Audio player: Edit tab', () => {
137
139
 
138
140
  it('When user clicks on the \'Delete\' button, then \'Delete\' popup should be displayed', () => {
139
141
  audioPlayerPage.steps.deleteAudioFile();
140
- utilities.verifyElementVisibilityState(audioPlayerPage.dialogBox(), 'visible');
142
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
141
143
  utilities.verifyInnerText(audioPlayerPage.dialogBoxTitle(), 'Delete');
142
144
  });
143
145
 
@@ -148,7 +150,7 @@ describe('Audio player: Edit tab', () => {
148
150
  });
149
151
 
150
152
  it('CSS of popup', { tags: 'css' }, () => {
151
- utilities.verifyCSS(audioPlayerPage.dialogBox(), {
153
+ utilities.verifyCSS(dialogBoxBase.dialogBox(), {
152
154
  'background-color': css.color.defaultBackground,
153
155
  });
154
156
  utilities.verifyCSS(audioPlayerPage.dialogBoxContent().find('[class*="DeletePopupWrapper"]'), {
@@ -170,19 +172,19 @@ describe('Audio player: Edit tab', () => {
170
172
  });
171
173
 
172
174
  it('Accessibility of the popup', () => {
173
- cy.checkAccessibility(audioPlayerPage.dialogBox());
175
+ cy.checkAccessibility(dialogBoxBase.dialogBox());
174
176
  });
175
177
 
176
178
  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
+ dialogBoxBase.steps.clickOnRejectButtonInDialogBox()();
180
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
179
181
  utilities.verifyInnerText(audioPlayerPage.uploadedFileNameLabel(), 'sample2.mp3');
180
182
  });
181
183
 
182
184
  it('When user clicks on \'Delete\' button, then popup should close and uploaded audio file should be deleted', () => {
183
185
  audioPlayerPage.steps.deleteAudioFile();
184
- audioPlayerPage.steps.clickOnAcceptButtonInDialogBox();
185
- utilities.verifyElementVisibilityState(audioPlayerPage.dialogBox(), 'notExist');
186
+ dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
187
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
186
188
  utilities.verifyInnerText(audioPlayerPage.uploadAudioNoFileChosenLabel(), 'No file chosen');
187
189
  });
188
190
  });
@@ -232,7 +234,7 @@ describe('Audio player: Edit tab', () => {
232
234
 
233
235
  it('When user adds a MP3 file in \'Source URL\' input field, \'Error: Source URL is required.\' validation message should disappear', () => {
234
236
  audioPlayerPage.steps.enterTextInSourceURLInputField(constants.sampleMp3Link);
235
- utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'notExist');
237
+ audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
236
238
  });
237
239
 
238
240
  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', () => {
@@ -247,7 +249,7 @@ describe('Audio player: Edit tab', () => {
247
249
  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
250
  audioPlayerPage.steps.clearTextInSourceURLInputField();
249
251
  audioPlayerPage.steps.enterTextInSourceURLInputField(constants.sampleMp3Link);
250
- utilities.verifyElementVisibilityState(audioPlayerPage.errorMessage(), 'notExist');
252
+ audioPlayerPage.steps.verifyErrorMessageIsNotDisplayed();
251
253
  });
252
254
 
253
255
  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', () => {
@@ -275,7 +277,7 @@ describe('Audio player: Edit tab', () => {
275
277
 
276
278
  it('When user has uploaded an invalid file and clicks on \'Play\' button in preview tab, then error message \'Error loading audio\'', () => {
277
279
  audioPlayerPage.steps.switchToEditTab();
278
- audioPlayerPage.steps.uploadFile('uploads/sample.mp4');
280
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp4');
279
281
  audioPlayerPage.steps.switchToPreviewTab();
280
282
  audioPlayerPage.steps.startPlayback();
281
283
  utilities.verifyInnerText(audioPlayerPage.errorMessage(), 'Error loading audio');
@@ -304,7 +306,7 @@ describe('Audio player: Edit tab', () => {
304
306
  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
307
  audioPlayerPage.steps.switchToEditTab();
306
308
  audioPlayerPage.steps.selectUploadAudioFileRadioButton();
307
- audioPlayerPage.steps.uploadFile('uploads/sample.mp3');
309
+ audioPlayerPage.steps.uploadAudioFile('uploads/sample.mp3');
308
310
  audioPlayerPage.steps.switchToPreviewTab();
309
311
  audioPlayerPage.steps.startPlayback();
310
312
  audioPlayerPage.steps.waitForPlaybackToBegin();
@@ -557,7 +557,7 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
557
557
  });
558
558
 
559
559
  it('When user performs more than 1 actions and then clicks on undo button, then undo button should be enabled' ,() => {
560
- cy.log('Reset the chart');
560
+ cy.log('Pre-step: Reset the chart');
561
561
  chartsBarPage.steps.clickOnResetButtonPreviewTab();
562
562
  chartsBarPage.steps.confirmReset();
563
563
  chartsBarPage.steps.deleteBarInPreviewTab(0);
@@ -573,6 +573,11 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
573
573
 
574
574
  //Reset button
575
575
  it('When the user clicks on Reset button then reset popup should be displayed', () => {
576
+ cy.log('Pre-step: Editing the graph');
577
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, barValue: 20, range: 20 });
578
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, barValue: 2, range: 20 });
579
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, barValue: 0, range: 20 });
580
+ chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, barValue: 6, range: 20 });
576
581
  chartsBarPage.steps.clickOnResetButtonPreviewTab();
577
582
  utilities.verifyElementVisibilityState(chartsBarPage.dialogBox(), 'visible');
578
583
  });
@@ -581,12 +586,10 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
581
586
 
582
587
  it('When user clicks on cancel button in reset popup, then reset popup should close and chart should not be reset', () => {
583
588
  chartsBarPage.steps.cancelReset();
584
- chartsBarPage.steps.editBarLabelInPreviewTab(0, '2000');
585
- chartsBarPage.steps.editBarLabelInPreviewTab(1, '2001');
586
589
  chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 20, range: 20 });
587
590
  chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 20 });
588
591
  chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 0, range: 20 });
589
- chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 4, range: 20 });
592
+ chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 6, range: 20 });
590
593
  });
591
594
 
592
595
  it('When the user clicks on Reset button and confirms reset, then all the chart actions should be reverted and chart should be reverted to default state', () => {