itemengine-cypress-automation 1.0.72 → 1.0.73
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponse/{audioResponseMinimalPreviewSection.js → audioResponseMinimalPreviewSection.smoke.js} +263 -254
- package/cypress/e2e/ILC/AudioResponse/{audioResponseStandardPreviewSection.js → audioResponseStandardPreviewSection.smoke.js} +100 -97
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.smoke.js +121 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachCell.js → groupedOptionsPartialScoreForEachCell.smoke.js} +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachResponse.js → groupedOptionsPartialScoreForEachResponse.smoke.js} +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.smoke.js +164 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{standardTotalScoreDividedBetweenResponse.js → standardTotalScoreDividedBetweenResponse.smoke.js} +21 -18
- package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +753 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.smoke.js +943 -0
- package/cypress/e2e/ILC/EssayResponse/{essayResponseCustomizeFormattingOptions1.js → essayResponseCustomizeFormattingOptions1.smoke.js} +113 -110
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +581 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.smoke.js +111 -0
- package/cypress/e2e/ILC/EssayResponse/{essayResponsePreviewContentsForAllViews.js → essayResponsePreviewContentsForAllViews.smoke.js} +6 -3
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.smoke.js +81 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/{fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.js → fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.smoke.js} +25 -22
- package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownAllOrNothingScoring.js → fillInTheGapsDropdownAllOrNothingScoring.smoke.js} +16 -14
- package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.smoke.js} +80 -74
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.smoke.js +361 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.smoke.js +137 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.smoke.js +171 -0
- package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextAllOrNothingScoring.js → fillInTheGapsOverImageTextAllOrNothingScoring.smoke.js} +32 -29
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextCheckAnswerForAllViews.js → fillInTheGapsOverImageTextCheckAnswerForAllViews.smoke.js} +5 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.smoke.js +137 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.smoke.js +146 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewContentsForAllViews.js → fillInTheGapsOverImageTextPreviewContentsForAllViews.smoke.js} +5 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewTab.js → fillInTheGapsOverImageTextPreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextShowCorrectAnswerForAllView.js → fillInTheGapsOverImageTextShowCorrectAnswerForAllView.smoke.js} +6 -4
- package/cypress/e2e/ILC/FillInTheGapsText/{fillInTheGapsTextAutoScoredScoring.js → fillInTheGapsTextAutoScoredScoring.smoke.js} +12 -9
- package/cypress/e2e/ILC/Highlight/HighlightScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +36 -34
- package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.smoke.js +462 -0
- package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.smoke.js +148 -0
- package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.smoke.js +185 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.smoke.js +138 -0
- package/cypress/e2e/ILC/HighlightImage/{highlightImagePreviewTab.js → highlightImagePreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/HighlightImage/{highlightImageToolsFunctionalityPreviewTab.js → highlightImageToolsFunctionalityPreviewTab.smoke.js} +4 -4
- package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.smoke.js +122 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingAlternateAnswer.js → listMatchingAlternateAnswer.smoke.js} +47 -43
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.smoke.js +211 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.smoke.js +254 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.smoke.js +191 -0
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +34 -32
- package/cypress/e2e/ILC/ListSorting/ListSortingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +41 -38
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.smoke.js +269 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/{multipleSelectionGridAutoScoredScoring.js → multipleSelectionGridAutoScoredScoring.smoke.js} +36 -34
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.smoke.js +407 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/{singleSelectionGridAutoScoredScoring.js → singleSelectionGridAutoScoredScoring.smoke.js} +32 -29
- package/cypress/e2e/ILC/UploadResponse/{uploadResponsePreview.js → uploadResponsePreview.smoke.js} +64 -59
- package/cypress/e2e/ILC/VideoResponse/{videoResponsePreviewTab.js → videoResponsePreviewTab.smoke.js} +290 -281
- package/cypress/pages/components/additionalSettingsPanel.js +0 -27
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +321 -0
- package/cypress/pages/components/createQuestionBasePage.js +1 -7
- package/cypress/pages/components/essayResponseCommonComponents.js +0 -6
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -13
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -10
- package/cypress/pages/components/scoringSectionBase.js +3 -2
- package/cypress/pages/createItemPage.js +3 -79
- package/cypress/pages/dialogBoxBase.js +8 -23
- package/cypress/pages/index.js +1 -4
- package/cypress/pages/itemPreviewSettingsPage.js +446 -0
- package/cypress/pages/multipleSelectionPage.js +113 -64
- package/cypress/pages/selectQuestionResourceToolPage.js +0 -5
- package/cypress/pages/shortTextResponsePage.js +0 -6
- package/cypress/pages/singleSelectionPage.js +0 -1
- package/package.json +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.js +0 -116
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.js +0 -160
- package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.js +0 -932
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.js +0 -572
- package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.js +0 -106
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.js +0 -76
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.js +0 -134
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js +0 -133
- package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.js +0 -457
- package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.js +0 -143
- package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.js +0 -178
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.js +0 -125
- package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.js +0 -117
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.js +0 -207
- package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.js +0 -246
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.js +0 -185
- package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettings.js +0 -820
- package/cypress/e2e/ILC/ListSorting/listSortingAutoScoredScoring.js +0 -936
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.js +0 -263
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.js +0 -402
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.js +0 -356
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.js +0 -134
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.js +0 -156
@@ -2,75 +2,78 @@ import { videoResponsePage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
4
|
const css = Cypress.env('css');
|
5
|
+
const grepTags = Cypress.env('grepTags');
|
5
6
|
|
6
7
|
describe('Create item page - Video response: Preview tab - default state, recording a video', () => {
|
7
8
|
before(() => {
|
8
9
|
cy.loginAs('admin');
|
9
10
|
});
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
'
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
12
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
13
|
+
describe('Video response: Default state of preview tab', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
videoResponsePage.steps.navigateToCreateQuestion('video response');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
videoResponsePage.steps.switchToPreviewTab();
|
19
|
+
});
|
20
|
+
|
21
|
+
it('A start recording interface with a \'Rec\' button and text \'Click/tap anywhere here to start recording\' should be displayed in the preview tab', () => {
|
22
|
+
utilities.verifyElementVisibilityState(videoResponsePage.clickTapAnywhereArea(), 'visible');
|
23
|
+
utilities.verifyInnerText(videoResponsePage.recordButton(), 'REC');
|
24
|
+
utilities.verifyElementVisibilityState(videoResponsePage.recordButton(), 'visible');
|
25
|
+
utilities.verifyInnerText(videoResponsePage.startRecordingText(), 'Click/tap anywhere here to start recording');
|
26
|
+
utilities.verifyElementVisibilityState(videoResponsePage.startRecordingText(), 'visible');
|
27
|
+
});
|
28
|
+
|
29
|
+
it('When the user has not started recording, a status message: \'Allow access to your camera and microphone.\' should be displayed on the recording interface', () => {
|
30
|
+
videoResponsePage.steps.verifyRecordingStatus('Allow access to your camera and microphone.');
|
31
|
+
});
|
32
|
+
|
33
|
+
it('When the user has not started recording, maximum recording length should be displayed in minutes(mm:ss) format', () => {
|
34
|
+
utilities.verifyInnerText(videoResponsePage.recordingTimer(), '15:00');
|
35
|
+
utilities.verifyElementVisibilityState(videoResponsePage.recordingTimer(), 'visible');
|
36
|
+
});
|
37
|
+
|
38
|
+
it('CSS of recording interface', { tags: 'css' }, () => {
|
39
|
+
utilities.verifyCSS(videoResponsePage.clickTapAnywhereArea(), {
|
40
|
+
'background-color': css.color.clickTapAnywhereAreaBg
|
41
|
+
});
|
42
|
+
//TODO: Add CSS of button wrappper here
|
43
|
+
utilities.verifyCSS(videoResponsePage.recordButton(), {
|
44
|
+
'color': css.color.defaultBackground,
|
45
|
+
'font-size': css.fontSize.extraLarge,
|
46
|
+
'font-weight': css.fontWeight.medium,
|
47
|
+
'border': `2px solid ${css.color.defaultBackground}`,
|
48
|
+
'background-color': css.color.recordingIcon
|
49
|
+
});
|
50
|
+
utilities.verifyCSS(videoResponsePage.startRecordingText(), {
|
51
|
+
'color': css.color.defaultBackground,
|
52
|
+
'font-size': css.fontSize.normal,
|
53
|
+
'font-weight': css.fontWeight.regular,
|
54
|
+
});
|
55
|
+
utilities.verifyCSS(videoResponsePage.recordingStatusText(), {
|
56
|
+
'color': css.color.defaultBackground,
|
57
|
+
'font-size': css.fontSize.normal,
|
58
|
+
'font-weight': css.fontWeight.regular,
|
59
|
+
});
|
60
|
+
utilities.verifyCSS(videoResponsePage.recordingTimer(), {
|
61
|
+
'color': css.color.defaultBackground,
|
62
|
+
'font-size': css.fontSize.small,
|
63
|
+
'font-weight': css.fontWeight.regular,
|
64
|
+
});
|
65
|
+
utilities.verifyCSS(videoResponsePage.recordingStatusIcon().find('g'), {
|
66
|
+
'fill': css.color.defaultBackground,
|
67
|
+
});
|
68
|
+
});
|
69
|
+
|
70
|
+
it('Accessibility of recording interface', { tags: 'a11y' }, () => {
|
71
|
+
cy.checkAccessibility(videoResponsePage.clickTapAnywhereArea().parents('.edit-question-preview-wrapper'));
|
72
|
+
});
|
73
|
+
});
|
74
|
+
}
|
75
|
+
|
76
|
+
describe('Video response: Recording a video', { tags: 'smoke' }, () => {
|
74
77
|
abortEarlySetup();
|
75
78
|
before(() => {
|
76
79
|
videoResponsePage.steps.navigateToCreateQuestion('video response');
|
@@ -268,7 +271,7 @@ describe('Create item page - Video response: Preview tab - default state, record
|
|
268
271
|
});
|
269
272
|
});
|
270
273
|
|
271
|
-
describe('Video response playback: Play, pause and seek', () => {
|
274
|
+
describe('Video response playback: Play, pause and seek', { tags: 'smoke' }, () => {
|
272
275
|
let actualVideoSeekedInPercent = 50
|
273
276
|
abortEarlySetup();
|
274
277
|
before(() => {
|
@@ -386,243 +389,249 @@ describe('Create item page - Video response: Preview tab - default state, record
|
|
386
389
|
});
|
387
390
|
});
|
388
391
|
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
it('When the user hovers over \'Volume control\' button, volume control settings should open and by default it should be set to full volume and on hovering away from the button, the volume sliders should disappear', () => {
|
399
|
-
videoResponsePage.steps.hoverOnVolumeControlButton();
|
400
|
-
utilities.verifyElementVisibilityState(videoResponsePage.volumeControlSlider(), 'visible');
|
401
|
-
videoResponsePage.steps.verifyVolumeOfPlaybackPlayer('100');
|
402
|
-
utilities.hoverAwayFromElement();
|
403
|
-
utilities.verifyElementVisibilityState(videoResponsePage.volumeControlSlider(), 'notExist');
|
404
|
-
});
|
405
|
-
|
406
|
-
it('When volume is not set as 0 and user hovers on \'Volume control\' button, then \'Mute\' text should be displayed in a tooltip and on hovering away from the button, the tooltip should disappear', () => {
|
407
|
-
videoResponsePage.steps.hoverOnVolumeControlButton();
|
408
|
-
utilities.verifyElementVisibilityState(videoResponsePage.tooltipText(), 'visible');
|
409
|
-
utilities.verifyInnerText(videoResponsePage.tooltipText(), 'Mute');
|
410
|
-
utilities.hoverAwayFromElement();
|
411
|
-
utilities.verifyElementVisibilityState(videoResponsePage.tooltipText(), 'notExist');
|
412
|
-
});
|
413
|
-
|
414
|
-
it('When the user hovers over \'Volume control slider\', then \'Volume control\' text should be displayed in a tooltip and on hovering away from the button, the tooltip should disappear', () => {
|
415
|
-
videoResponsePage.steps.hoverOnVolumeControlButton();
|
416
|
-
videoResponsePage.steps.hoverOnVolumeControlSlider();
|
417
|
-
videoResponsePage.steps.hoverAwayFromVolumeControlButton();
|
418
|
-
utilities.verifyElementVisibilityState(videoResponsePage.tooltipText(), 'visible');
|
419
|
-
utilities.verifyInnerText(videoResponsePage.tooltipText(), 'Volume control');
|
420
|
-
utilities.hoverAwayFromElement();
|
421
|
-
utilities.verifyElementVisibilityState(videoResponsePage.volumeControlSlider(), 'notExist');
|
422
|
-
utilities.verifyElementVisibilityState(videoResponsePage.tooltipText(), 'notExist');
|
423
|
-
});
|
424
|
-
|
425
|
-
it('When volume is not set as 0 and user clicks on volume control button, then the video should be muted and the volume control button should change to a muted state', () => {
|
426
|
-
videoResponsePage.steps.clickOnVolumeButton();
|
427
|
-
videoResponsePage.steps.hoverOnVolumeControlButton();
|
428
|
-
videoResponsePage.steps.verifyVolumeOfPlaybackPlayer('0');
|
429
|
-
utilities.hoverAwayFromElement();
|
430
|
-
utilities.verifyElementVisibilityState(videoResponsePage.volumeControlSlider(), 'notExist');
|
431
|
-
utilities.verifyElementVisibilityState(videoResponsePage.muteVolumeIcon(), 'visible');
|
432
|
-
videoResponsePage.steps.focusOutFromVolumeControlButton();
|
433
|
-
});
|
392
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
393
|
+
describe('Video response playback: Volume control', () => {
|
394
|
+
abortEarlySetup();
|
395
|
+
before(() => {
|
396
|
+
videoResponsePage.steps.navigateToCreateQuestion('video response');
|
397
|
+
cy.barsPreLoaderWait();
|
398
|
+
videoResponsePage.steps.switchToPreviewTab();
|
399
|
+
videoResponsePage.steps.recordAndSaveVideo(5000);
|
400
|
+
});
|
434
401
|
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
402
|
+
it('When the user hovers over \'Volume control\' button, volume control settings should open and by default it should be set to full volume and on hovering away from the button, the volume sliders should disappear', () => {
|
403
|
+
videoResponsePage.steps.hoverOnVolumeControlButton();
|
404
|
+
utilities.verifyElementVisibilityState(videoResponsePage.volumeControlSlider(), 'visible');
|
405
|
+
videoResponsePage.steps.verifyVolumeOfPlaybackPlayer('100');
|
406
|
+
utilities.hoverAwayFromElement();
|
407
|
+
utilities.verifyElementVisibilityState(videoResponsePage.volumeControlSlider(), 'notExist');
|
408
|
+
});
|
442
409
|
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
410
|
+
it('When volume is not set as 0 and user hovers on \'Volume control\' button, then \'Mute\' text should be displayed in a tooltip and on hovering away from the button, the tooltip should disappear', () => {
|
411
|
+
videoResponsePage.steps.hoverOnVolumeControlButton();
|
412
|
+
utilities.verifyElementVisibilityState(videoResponsePage.tooltipText(), 'visible');
|
413
|
+
utilities.verifyInnerText(videoResponsePage.tooltipText(), 'Mute');
|
414
|
+
utilities.hoverAwayFromElement();
|
415
|
+
utilities.verifyElementVisibilityState(videoResponsePage.tooltipText(), 'notExist');
|
416
|
+
});
|
449
417
|
|
450
|
-
|
451
|
-
|
452
|
-
|
418
|
+
it('When the user hovers over \'Volume control slider\', then \'Volume control\' text should be displayed in a tooltip and on hovering away from the button, the tooltip should disappear', () => {
|
419
|
+
videoResponsePage.steps.hoverOnVolumeControlButton();
|
420
|
+
videoResponsePage.steps.hoverOnVolumeControlSlider();
|
421
|
+
videoResponsePage.steps.hoverAwayFromVolumeControlButton();
|
422
|
+
utilities.verifyElementVisibilityState(videoResponsePage.tooltipText(), 'visible');
|
423
|
+
utilities.verifyInnerText(videoResponsePage.tooltipText(), 'Volume control');
|
424
|
+
utilities.hoverAwayFromElement();
|
425
|
+
utilities.verifyElementVisibilityState(videoResponsePage.volumeControlSlider(), 'notExist');
|
426
|
+
utilities.verifyElementVisibilityState(videoResponsePage.tooltipText(), 'notExist');
|
453
427
|
});
|
454
|
-
|
455
|
-
|
428
|
+
|
429
|
+
it('When volume is not set as 0 and user clicks on volume control button, then the video should be muted and the volume control button should change to a muted state', () => {
|
430
|
+
videoResponsePage.steps.clickOnVolumeButton();
|
431
|
+
videoResponsePage.steps.hoverOnVolumeControlButton();
|
432
|
+
videoResponsePage.steps.verifyVolumeOfPlaybackPlayer('0');
|
433
|
+
utilities.hoverAwayFromElement();
|
434
|
+
utilities.verifyElementVisibilityState(videoResponsePage.volumeControlSlider(), 'notExist');
|
435
|
+
utilities.verifyElementVisibilityState(videoResponsePage.muteVolumeIcon(), 'visible');
|
436
|
+
videoResponsePage.steps.focusOutFromVolumeControlButton();
|
456
437
|
});
|
457
|
-
});
|
458
438
|
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
439
|
+
it('When the user hovers on muted \'Volume control\' button, \'Unmute\' text should be displayed in tooltip', () => {
|
440
|
+
videoResponsePage.steps.hoverOnVolumeControlButton();
|
441
|
+
utilities.verifyElementVisibilityState(videoResponsePage.tooltipText(), 'visible');
|
442
|
+
utilities.verifyInnerText(videoResponsePage.tooltipText(), 'Unmute');
|
443
|
+
utilities.hoverAwayFromElement();
|
444
|
+
utilities.verifyElementVisibilityState(videoResponsePage.tooltipText(), 'notExist');
|
445
|
+
});
|
463
446
|
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
447
|
+
it('When the user clicks on the muted volume control button then the volume setting slider should return to full volume and the volume control button should change to an unmuted state', () => {
|
448
|
+
videoResponsePage.steps.clickOnVolumeButton();
|
449
|
+
videoResponsePage.steps.hoverOnVolumeControlButton();
|
450
|
+
videoResponsePage.steps.verifyVolumeOfPlaybackPlayer('100');
|
451
|
+
utilities.verifyElementVisibilityState(videoResponsePage.unmutedVolumeIcon(), 'visible');
|
452
|
+
});
|
469
453
|
|
470
|
-
|
471
|
-
|
472
|
-
|
454
|
+
it('CSS of volume control section', { tags: 'css' }, () => {
|
455
|
+
utilities.verifyCSS(videoResponsePage.volumeControlSlider(), {
|
456
|
+
'background': `${css.color.transparent} linear-gradient(to right, ${css.color.progressBarElapsedFill} 0%, ${css.color.progressBarElapsedFill} 100%, ${css.color.progressBarRemainingFill} 0%, ${css.color.progressBarRemainingFill} 100%) repeat scroll 0% 0% / auto padding-box border-box`
|
457
|
+
});
|
458
|
+
utilities.verifyCSS(videoResponsePage.volumeControlButton().find('g path'), {
|
459
|
+
'fill': css.color.secondaryBtnBg,
|
460
|
+
});
|
473
461
|
});
|
474
|
-
|
475
|
-
|
462
|
+
|
463
|
+
it('Accessibility of volume control section', { tags: 'a11y' }, () => {
|
464
|
+
cy.checkAccessibility(videoResponsePage.volumeControlSlider());
|
465
|
+
cy.checkAccessibility(videoResponsePage.playbackPlayButton().parents('.video-player-wrapper'));
|
476
466
|
});
|
477
|
-
});
|
478
467
|
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
468
|
+
it('When the user drags the volume control all the way down, video should be muted and the button should update to a muted state', () => {
|
469
|
+
videoResponsePage.steps.setVolumeSliderForPlayback(0);
|
470
|
+
videoResponsePage.steps.verifyVolumeOfPlaybackPlayer('0');
|
471
|
+
utilities.verifyElementVisibilityState(videoResponsePage.muteVolumeIcon(), 'visible');
|
472
|
+
});
|
483
473
|
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
474
|
+
it('CSS of volume control section in muted state', { tags: 'css' }, () => {
|
475
|
+
utilities.verifyCSS(videoResponsePage.volumeControlSlider(), {
|
476
|
+
'background': `${css.color.transparent} linear-gradient(to right, ${css.color.progressBarElapsedFill} 0%, ${css.color.progressBarElapsedFill} 0%, ${css.color.progressBarRemainingFill} -100%, ${css.color.progressBarRemainingFill} 100%) repeat scroll 0% 0% / auto padding-box border-box`
|
477
|
+
});
|
478
|
+
utilities.verifyCSS(videoResponsePage.volumeControlButton().find('g g path'), {
|
479
|
+
'fill': css.color.secondaryBtnBg,
|
480
|
+
});
|
481
|
+
});
|
490
482
|
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
videoResponsePage.steps.navigateToCreateQuestion('video response');
|
496
|
-
cy.barsPreLoaderWait();
|
497
|
-
videoResponsePage.steps.switchToPreviewTab();
|
498
|
-
videoResponsePage.steps.recordAndSaveVideo(4000);
|
499
|
-
});
|
483
|
+
it('Accessibility of volume control section in muted state', { tags: 'a11y' }, () => {
|
484
|
+
cy.checkAccessibility(videoResponsePage.volumeControlSlider());
|
485
|
+
cy.checkAccessibility(videoResponsePage.playbackPlayButton().parents('.video-player-wrapper'));
|
486
|
+
});
|
500
487
|
|
501
|
-
|
502
|
-
|
503
|
-
.
|
488
|
+
it('User should be able to unmute the video by dragging the volume control higher again', () => {
|
489
|
+
videoResponsePage.steps.setVolumeSliderForPlayback(99);
|
490
|
+
videoResponsePage.steps.verifyVolumeOfPlaybackPlayer('100');
|
491
|
+
utilities.verifyElementVisibilityState(videoResponsePage.unmutedVolumeIcon(), 'visible');
|
492
|
+
});
|
504
493
|
});
|
494
|
+
}
|
505
495
|
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
utilities.verifyCSS(videoResponsePage.playbackSpeedButton().find('g'), {
|
516
|
-
'stroke': css.color.secondaryBtnBg,
|
496
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
497
|
+
describe('Video response playback: Playback speed', () => {
|
498
|
+
const playbackSpeedOptions = ['1', '1.25', '1.5', '2'];
|
499
|
+
abortEarlySetup();
|
500
|
+
before(() => {
|
501
|
+
videoResponsePage.steps.navigateToCreateQuestion('video response');
|
502
|
+
cy.barsPreLoaderWait();
|
503
|
+
videoResponsePage.steps.switchToPreviewTab();
|
504
|
+
videoResponsePage.steps.recordAndSaveVideo(4000);
|
517
505
|
});
|
518
|
-
utilities.verifyCSS(videoResponsePage.playbackSpeedOption().eq(0), {
|
519
|
-
'color': css.color.liText,
|
520
|
-
'background-color': css.color.liTextSelectedBg,
|
521
|
-
'font-size': css.fontSize.small
|
522
|
-
});
|
523
|
-
utilities.verifyCSS(videoResponsePage.playbackSpeedOption().eq(1), {
|
524
|
-
'color': css.color.liText,
|
525
|
-
'background-color': css.color.transparent,
|
526
|
-
'font-size': css.fontSize.small
|
527
|
-
});
|
528
|
-
});
|
529
506
|
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
507
|
+
it('When the user hovers overs the playback button, a tooltip \'Playback speed\' should be displayed and on hovering away from the button, the tooltip should disappear', () => {
|
508
|
+
videoResponsePage.playbackSpeedButton()
|
509
|
+
.verifyTooltip('Playback speed');
|
510
|
+
});
|
534
511
|
|
535
|
-
|
536
|
-
it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the video playback speed should be changed accordingly`, () => {
|
537
|
-
videoResponsePage.steps.resetQuestionPreview();
|
538
|
-
videoResponsePage.steps.recordAndSaveVideo(12000);
|
512
|
+
it('When the user hovers overs the playback button, a list of 4 playback speed options - 1x, 1.25x, 1.5x, 2x should be displayed and by default 1x should be in selected state', () => {
|
539
513
|
videoResponsePage.steps.hoverOnPlaybackSpeedButton();
|
540
|
-
videoResponsePage.
|
541
|
-
videoResponsePage.
|
542
|
-
videoResponsePage.steps.
|
543
|
-
|
544
|
-
videoResponsePage.steps.pausePlayback();
|
545
|
-
videoResponsePage.steps.verifyPlaybackElapsedTime(1 + (4 * playbackSpeedOptions[index]));
|
546
|
-
});
|
547
|
-
}
|
548
|
-
});
|
549
|
-
|
550
|
-
describe('Video response playback: Record again', () => {
|
551
|
-
abortEarlySetup();
|
552
|
-
before(() => {
|
553
|
-
videoResponsePage.steps.navigateToCreateQuestion('video response');
|
554
|
-
cy.barsPreLoaderWait();
|
555
|
-
videoResponsePage.steps.switchToPreviewTab();
|
556
|
-
videoResponsePage.steps.recordAndSaveVideo(5000);
|
557
|
-
});
|
558
|
-
|
559
|
-
it('When the user hovers over the \'Record again\' button, a tooltip \'Record again\' should be displayed and on moving away the focus, the tooltip should disappear', () => {
|
560
|
-
videoResponsePage.recordAgainButton()
|
561
|
-
.verifyTooltip('Record again');
|
562
|
-
});
|
563
|
-
|
564
|
-
it('When the user clicks on \'Record again\' button, \'Record again\' popup should be displayed along with \'Are you sure you want to overwrite the existing audio recording?\' message', () => {
|
565
|
-
videoResponsePage.steps.recordAgain();
|
566
|
-
utilities.verifyInnerText(videoResponsePage.dialogBoxTitle(), 'Record again');
|
567
|
-
utilities.verifyElementVisibilityState(videoResponsePage.dialogBoxTitle(), 'visible');
|
568
|
-
utilities.verifyInnerText(videoResponsePage.retakePopupContent(), 'Are you sure you want to overwrite the existing video recording?');
|
569
|
-
utilities.verifyInnerText(videoResponsePage.confirmRetakeButton(), 'Confirm');
|
570
|
-
utilities.verifyElementVisibilityState(videoResponsePage.confirmRetakeButton(), 'visible');
|
571
|
-
utilities.verifyInnerText(videoResponsePage.cancelRetakeButton(), 'Cancel');
|
572
|
-
utilities.verifyElementVisibilityState(videoResponsePage.cancelRetakeButton(), 'visible');
|
573
|
-
});
|
574
|
-
|
575
|
-
it('CSS of \'Record again\' popup', { tags: 'css' }, () => {
|
576
|
-
utilities.verifyCSS(videoResponsePage.dialogBox(), {
|
577
|
-
'border': `1px solid ${css.color.defaultDropdownBorder}`,
|
578
|
-
'background-color': css.color.defaultBackground
|
579
|
-
});
|
580
|
-
utilities.verifyCSS(videoResponsePage.dialogBoxTitle(), {
|
581
|
-
'color': css.color.questionHeading,
|
582
|
-
'font-size': css.fontSize.default,
|
583
|
-
'font-weight': css.fontWeight.semibold
|
584
|
-
});
|
585
|
-
utilities.verifyCSS(videoResponsePage.retakePopupContent(), {
|
586
|
-
'color': css.color.labels,
|
587
|
-
'font-size': css.fontSize.default,
|
588
|
-
'font-weight': css.fontWeight.regular
|
514
|
+
utilities.verifyElementVisibilityState(videoResponsePage.playbackSpeedOptionsList(), 'visible');
|
515
|
+
utilities.verifyElementCount(videoResponsePage.playbackSpeedOption(), 4);
|
516
|
+
videoResponsePage.steps.verifyPlaybackSpeedListOptions();
|
517
|
+
//TODO: need to add selected state assertion when https://redmine.zeuslearning.com/issues/540695 gets fixed
|
589
518
|
})
|
590
|
-
utilities.verifyCSS(videoResponsePage.confirmRetakeButton(), {
|
591
|
-
'background-color': css.color.deleteBtn
|
592
|
-
});
|
593
|
-
utilities.verifyCSS(videoResponsePage.confirmRetakeButton().find('span'), {
|
594
|
-
'color': css.color.whiteText,
|
595
|
-
'font-size': css.fontSize.default,
|
596
|
-
'font-weight': css.fontWeight.regular
|
597
|
-
});
|
598
|
-
utilities.verifyCSS(videoResponsePage.cancelRetakeButton(), {
|
599
|
-
'background-color': css.color.defaultBackground
|
600
|
-
});
|
601
|
-
utilities.verifyCSS(videoResponsePage.cancelRetakeButton().find('span'), {
|
602
|
-
'color': css.color.secondaryBtn,
|
603
|
-
'font-size': css.fontSize.default,
|
604
|
-
'font-weight': css.fontWeight.regular
|
605
|
-
});
|
606
|
-
});
|
607
519
|
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
520
|
+
it('CSS of playback speed options', { tags: 'css' }, () => {
|
521
|
+
utilities.verifyCSS(videoResponsePage.playbackSpeedButton().find('g'), {
|
522
|
+
'stroke': css.color.secondaryBtnBg,
|
523
|
+
});
|
524
|
+
utilities.verifyCSS(videoResponsePage.playbackSpeedOption().eq(0), {
|
525
|
+
'color': css.color.liText,
|
526
|
+
'background-color': css.color.liTextSelectedBg,
|
527
|
+
'font-size': css.fontSize.small
|
528
|
+
});
|
529
|
+
utilities.verifyCSS(videoResponsePage.playbackSpeedOption().eq(1), {
|
530
|
+
'color': css.color.liText,
|
531
|
+
'background-color': css.color.transparent,
|
532
|
+
'font-size': css.fontSize.small
|
533
|
+
});
|
534
|
+
});
|
535
|
+
|
536
|
+
it('Accessibility of playback speed options', { tags: 'a11y' }, () => {
|
537
|
+
cy.checkAccessibility(videoResponsePage.playbackSpeedButton().parents('.video-player-wrapper'));
|
538
|
+
cy.checkAccessibility(videoResponsePage.playbackSpeedOptionsList());
|
539
|
+
});
|
540
|
+
|
541
|
+
for (let index = 0; index < playbackSpeedOptions.length; index++) {
|
542
|
+
it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the video playback speed should be changed accordingly`, () => {
|
543
|
+
videoResponsePage.steps.resetQuestionPreview();
|
544
|
+
videoResponsePage.steps.recordAndSaveVideo(12000);
|
545
|
+
videoResponsePage.steps.hoverOnPlaybackSpeedButton();
|
546
|
+
videoResponsePage.steps.selectPlaybackSpeed(playbackSpeedOptions[index])
|
547
|
+
videoResponsePage.steps.startPlayback();
|
548
|
+
videoResponsePage.steps.waitForPlaybackToBegin();
|
549
|
+
videoResponsePage.steps.addWaitToPlayVideo(4000);
|
550
|
+
videoResponsePage.steps.pausePlayback();
|
551
|
+
videoResponsePage.steps.verifyPlaybackElapsedTime(1 + (4 * playbackSpeedOptions[index]));
|
552
|
+
});
|
553
|
+
}
|
554
|
+
});
|
555
|
+
}
|
556
|
+
|
557
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
558
|
+
describe('Video response playback: Record again', () => {
|
559
|
+
abortEarlySetup();
|
560
|
+
before(() => {
|
561
|
+
videoResponsePage.steps.navigateToCreateQuestion('video response');
|
562
|
+
cy.barsPreLoaderWait();
|
563
|
+
videoResponsePage.steps.switchToPreviewTab();
|
564
|
+
videoResponsePage.steps.recordAndSaveVideo(5000);
|
565
|
+
});
|
566
|
+
|
567
|
+
it('When the user hovers over the \'Record again\' button, a tooltip \'Record again\' should be displayed and on moving away the focus, the tooltip should disappear', () => {
|
568
|
+
videoResponsePage.recordAgainButton()
|
569
|
+
.verifyTooltip('Record again');
|
570
|
+
});
|
571
|
+
|
572
|
+
it('When the user clicks on \'Record again\' button, \'Record again\' popup should be displayed along with \'Are you sure you want to overwrite the existing audio recording?\' message', () => {
|
573
|
+
videoResponsePage.steps.recordAgain();
|
574
|
+
utilities.verifyInnerText(videoResponsePage.dialogBoxTitle(), 'Record again');
|
575
|
+
utilities.verifyElementVisibilityState(videoResponsePage.dialogBoxTitle(), 'visible');
|
576
|
+
utilities.verifyInnerText(videoResponsePage.retakePopupContent(), 'Are you sure you want to overwrite the existing video recording?');
|
577
|
+
utilities.verifyInnerText(videoResponsePage.confirmRetakeButton(), 'Confirm');
|
578
|
+
utilities.verifyElementVisibilityState(videoResponsePage.confirmRetakeButton(), 'visible');
|
579
|
+
utilities.verifyInnerText(videoResponsePage.cancelRetakeButton(), 'Cancel');
|
580
|
+
utilities.verifyElementVisibilityState(videoResponsePage.cancelRetakeButton(), 'visible');
|
581
|
+
});
|
582
|
+
|
583
|
+
it('CSS of \'Record again\' popup', { tags: 'css' }, () => {
|
584
|
+
utilities.verifyCSS(videoResponsePage.dialogBox(), {
|
585
|
+
'border': `1px solid ${css.color.defaultDropdownBorder}`,
|
586
|
+
'background-color': css.color.defaultBackground
|
587
|
+
});
|
588
|
+
utilities.verifyCSS(videoResponsePage.dialogBoxTitle(), {
|
589
|
+
'color': css.color.questionHeading,
|
590
|
+
'font-size': css.fontSize.default,
|
591
|
+
'font-weight': css.fontWeight.semibold
|
592
|
+
});
|
593
|
+
utilities.verifyCSS(videoResponsePage.retakePopupContent(), {
|
594
|
+
'color': css.color.labels,
|
595
|
+
'font-size': css.fontSize.default,
|
596
|
+
'font-weight': css.fontWeight.regular
|
597
|
+
})
|
598
|
+
utilities.verifyCSS(videoResponsePage.confirmRetakeButton(), {
|
599
|
+
'background-color': css.color.deleteBtn
|
600
|
+
});
|
601
|
+
utilities.verifyCSS(videoResponsePage.confirmRetakeButton().find('span'), {
|
602
|
+
'color': css.color.whiteText,
|
603
|
+
'font-size': css.fontSize.default,
|
604
|
+
'font-weight': css.fontWeight.regular
|
605
|
+
});
|
606
|
+
utilities.verifyCSS(videoResponsePage.cancelRetakeButton(), {
|
607
|
+
'background-color': css.color.defaultBackground
|
608
|
+
});
|
609
|
+
utilities.verifyCSS(videoResponsePage.cancelRetakeButton().find('span'), {
|
610
|
+
'color': css.color.secondaryBtn,
|
611
|
+
'font-size': css.fontSize.default,
|
612
|
+
'font-weight': css.fontWeight.regular
|
613
|
+
});
|
614
|
+
});
|
615
|
+
|
616
|
+
it('Accessibility of \'Record again\' popup', { tags: 'a11y' }, () => {
|
617
|
+
cy.checkAccessibility(videoResponsePage.dialogBox());
|
618
|
+
});
|
619
|
+
|
620
|
+
it('When the user clicks on \'Cancel\' button, \'Record again\' popup should close and previous state of playback player should persist', () => {
|
621
|
+
videoResponsePage.steps.cancelRetake();
|
622
|
+
utilities.verifyElementVisibilityState(videoResponsePage.dialogBox(), 'notExist');
|
623
|
+
utilities.verifyElementVisibilityState(videoResponsePage.recordAgainButton(), 'visible');
|
624
|
+
utilities.verifyElementVisibilityState(videoResponsePage.playbackPlayButton(), 'visible');
|
625
|
+
videoResponsePage.steps.verifyVideoPlaybackTimer('00:00 / 00:05');
|
626
|
+
});
|
627
|
+
|
628
|
+
it('When the user clicks on Confirm button of the Record again popup, the previous recording should get deleted and a new recording should begin', () => {
|
629
|
+
videoResponsePage.steps.recordAgain();
|
630
|
+
videoResponsePage.steps.confirmRetake();
|
631
|
+
utilities.verifyElementVisibilityState(videoResponsePage.dialogBox(), 'notExist');
|
632
|
+
videoResponsePage.steps.waitForRecordingToStart();
|
633
|
+
videoResponsePage.steps.verifyRecordingStatus('Recording...')
|
634
|
+
});
|
635
|
+
})
|
636
|
+
}
|
628
637
|
});
|