itemengine-cypress-automation 1.0.193-packageUpdated-7f1e306.0 → 1.0.193-packageUpdated-0af2e49.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +3 -3
- package/cypress/e2e/ILC/AudioPlayerNew/audioOverviewAndTranscript.js +568 -0
- package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +4 -4
- package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +5 -5
- package/cypress/e2e/ILC/AudioPlayerNew/customizePlayerLayoutSettings.js +2 -2
- package/cypress/e2e/ILC/AudioPlayerNew/headerSection.js +125 -0
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +5 -5
- package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +4 -4
- package/cypress/e2e/ILC/AudioPlayerNew/studentViewSettings.js +3 -3
- package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +19 -17
- package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +7 -4
- package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +366 -0
- package/cypress/e2e/ILC/ChartsLine/checkAnswerFunctionalityForAllViews.smoke.js +183 -0
- package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +281 -0
- package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +595 -0
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +8 -8
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +241 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +241 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternatePoints.js +285 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/manuallyAndNonScored.js +164 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +281 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsScoring.js +467 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +250 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeigtsCorrectPointsGreaterThanAlternativePoints.js +281 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +260 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsScoring.js +184 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +229 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +261 -0
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +409 -0
- package/cypress/e2e/ILC/chartsDotsPlot/checkAnswerFunctionalityForAllViews.smoke.js +199 -0
- package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +223 -0
- package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +402 -0
- package/cypress/pages/audioPlayerPage.js +229 -9
- package/cypress/pages/chartsBarPage.js +2 -70
- package/cypress/pages/chartsDotPlotPage.js +986 -3
- package/cypress/pages/chartsLinePage.js +368 -9
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +0 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/barAndLineChartComponent.js +27 -1
- package/cypress/pages/components/chartsCommonComponent.js +31 -2
- package/cypress/pages/components/createQuestionBasePage.js +1 -0
- package/cypress/pages/components/layoutSectionComponent.js +2 -2
- package/cypress/pages/components/singleMultipleSelectionModeComponent.js +5 -0
- package/cypress/pages/components/toolSettingsComponent.js +2 -2
- package/cypress/pages/feedbackScalePage.js +1 -1
- package/cypress/pages/gridFillPage.js +13 -6
- package/cypress/pages/imageHighlightPage.js +308 -2
- package/cypress/pages/numberLinePage.js +40 -16
- package/cypress/pages/textEntryMathPage.js +1 -1
- package/cypress/pages/videoResponsePage.js +350 -6
- package/package.json +1 -1
- package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +0 -366
@@ -1,4 +1,5 @@
|
|
1
1
|
import utilities from "../support/helpers/utilities"
|
2
|
+
import { dialogBoxBase } from "./dialogBoxBase";
|
2
3
|
import { additionalSettingsPanel, commonComponents, createQuestionBasePage, questionInstructionsComponent, scoringSectionBase, playbackControlsBaseComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, limitNumberOfRetakeComponent, studentViewSettingsLabelComponent, allowTeachersToDownloadStudentResponseComponent, additionalSettingsAccessibilitySectionComponent } from "./components"
|
3
4
|
import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
|
4
5
|
const css = Cypress.env('css');
|
@@ -60,6 +61,44 @@ const selectors = {
|
|
60
61
|
videoSettingsButtonLabel: () => cy.get('.audio-indicator [class*="CustomizePlaybackControlsstyles__Label"]'),
|
61
62
|
timerButtonVideoSettings: () => cy.get('[data-ngie-testid="timer-toggle-button"]'),
|
62
63
|
progressIndicatorButtonVideoSettings: () => cy.get('[data-ngie-testid="progress-indicator-toggle-button"]'),
|
64
|
+
|
65
|
+
//video recorder style
|
66
|
+
videoRecorderStyleLabel: () => cy.get('.recorder-style-label'),
|
67
|
+
standardRecorderStyleButton: () => cy.get('[data-ngie-testid="standard-toggle-button"]'),
|
68
|
+
compactRecorderStyleButton: () => cy.get('[data-ngie-testid="compact-toggle-button"]'),
|
69
|
+
videoRecorderDefaultWidthLabel: () => cy.get('[class*="VideoRecorderWidth"] [class*="PropertyLabel"]'),
|
70
|
+
videoRecorderDefaultWidthInputField: () => cy.get('[class*="VideoRecorderWidth"] .video-recorder-width-input-field input'),
|
71
|
+
|
72
|
+
//compact style
|
73
|
+
recordButtonCompactPreview: () => cy.get('.Record-button'),
|
74
|
+
pauseRecordingButtonCompactPreview: () => cy.get('.Pause-button'),
|
75
|
+
stopRecordingButtonCompactPreview: () => cy.get('.Stop-button'),
|
76
|
+
resumeRecordingButtonCompactPreview: () => cy.get('.Resume-button'),
|
77
|
+
retakeButtonCompactPreview: () => cy.get('.Retake-button'),
|
78
|
+
playPlaybackButtonCompactPreview: () => cy.get('.Play-button'),
|
79
|
+
pausePlaybackButtonCompactPreview: () => cy.get('.Pause-button'),
|
80
|
+
recordingHelpTextCompactPreview: () => cy.get('[class*="ClickToStartRecordingWrapper"]'),
|
81
|
+
recordingStatusTextCompactPreview: () => cy.get('.recording-status-text'),
|
82
|
+
recordingTimerCompactPreview: () => cy.get('[class*="VideoRecorderstyle__RecordTimer"]'),
|
83
|
+
playbackTimeCompactPreview: () => cy.get('[class*="VideoRecorderstyle__PlayerTimerWrapper"]'),
|
84
|
+
recorderFlyoutCompactPreview: () => cy.get('[class*="VideoOverlaystyle__LineReaderOverlay"]'),
|
85
|
+
stopRecordingFlyoutButton: () => cy.get('.compact-Stop-button'),
|
86
|
+
pauseRecordingFlyoutButton: () => cy.get('.compact-Pause-button'),
|
87
|
+
resumeRecordingFlyoutButton: () => cy.get('.compact-Record-button'),
|
88
|
+
playPlaybackFlyoutButton: () => cy.get('.compact-Play-button'),
|
89
|
+
pausePlaybackFlyoutButton: () => cy.get('.compact-Pause-button'),
|
90
|
+
retakeFlyoutButton: () => cy.get('.compact-Retake-button'),
|
91
|
+
playbackProgressBar: () => cy.get('.audio-playback-slider-wrapper'),
|
92
|
+
previewPlaybackSlider: () => cy.get('input[aria-label="Slider bar"]'),
|
93
|
+
recordedResponseHelpText: () => cy.get('[class*="CompaactRecorderText"]'),
|
94
|
+
resizeIconCompactRecorderFlyout: () => cy.get('.resizeMaskButton'),
|
95
|
+
dragHandleCompactRecorderFlyout: () => cy.get('.drag-handle-left-right-move-button'),
|
96
|
+
|
97
|
+
//student view settings
|
98
|
+
allowStudentsToResizeVideoRecorderLabel: () => cy.get('[data-ngie-testid="allow-students-to-resize-video-recorder-checkbox"] .MuiFormControlLabel-label'),
|
99
|
+
allowStudentsToResizeVideoRecorderCheckbox: () => cy.get('[data-ngie-testid="allow-students-to-resize-video-recorder-checkbox"] input'),
|
100
|
+
allowStudentsToRepositionVideoRecorderLabel: () => cy.get('[data-ngie-testid="allow-students-to-reposition-video-recorder-checkbox"] .MuiFormControlLabel-label'),
|
101
|
+
allowStudentsToRepositionVideoRecorderCheckbox: () => cy.get('[data-ngie-testid="allow-students-to-reposition-video-recorder-checkbox"] input'),
|
63
102
|
}
|
64
103
|
|
65
104
|
const steps = {
|
@@ -271,10 +310,23 @@ const steps = {
|
|
271
310
|
* This function extracts the elapsed time from the video player, calculates the total elapsed time in seconds,
|
272
311
|
* and then compares it to the expected time.
|
273
312
|
* @param {number} time - The expected playback time in seconds.
|
313
|
+
* @param {("Standard" | "Compact")} recorderStyle - The style of the recorder ('Standard' or 'Compact').
|
274
314
|
* @throws {Error} Throws an error if the actual playback time does not match the expected time.
|
275
315
|
*/
|
276
|
-
verifyPlaybackElapsedTime: (time) => {
|
277
|
-
|
316
|
+
verifyPlaybackElapsedTime: (time, recorderStyle) => {
|
317
|
+
let playbackTimeElement;
|
318
|
+
|
319
|
+
switch (recorderStyle) {
|
320
|
+
case 'Standard':
|
321
|
+
playbackTimeElement = videoResponsePage.playerTimer();
|
322
|
+
break;
|
323
|
+
case 'Compact':
|
324
|
+
playbackTimeElement = videoResponsePage.playbackTimeCompactPreview();
|
325
|
+
break;
|
326
|
+
default:
|
327
|
+
throw new Error('Invalid recorder style');
|
328
|
+
};
|
329
|
+
playbackTimeElement
|
278
330
|
.invoke('text')
|
279
331
|
.then(text => {
|
280
332
|
let elapsedTime = text.split('/')[0]
|
@@ -531,7 +583,7 @@ const steps = {
|
|
531
583
|
videoResponsePage.seekButtonControlsForPlayback()
|
532
584
|
.should('not.have.class', 'ngie-toggle-button-selected');
|
533
585
|
break;
|
534
|
-
case 'Record
|
586
|
+
case 'Record again':
|
535
587
|
videoResponsePage.recordAgainButtonControlsForPlayback()
|
536
588
|
.should('not.have.class', 'ngie-toggle-button-selected');
|
537
589
|
break;
|
@@ -539,11 +591,11 @@ const steps = {
|
|
539
591
|
videoResponsePage.volumeButtonControlsForPlayback()
|
540
592
|
.should('not.have.class', 'ngie-toggle-button-selected');
|
541
593
|
break;
|
542
|
-
case 'Playback
|
594
|
+
case 'Playback speed':
|
543
595
|
videoResponsePage.playbackSpeedButtonControlsForPlayback()
|
544
596
|
.should('not.have.class', 'ngie-toggle-button-selected');
|
545
597
|
break;
|
546
|
-
case 'Full
|
598
|
+
case 'Full screen':
|
547
599
|
videoResponsePage.fullScreenButtonControlsForPlayback()
|
548
600
|
.should('not.have.class', 'ngie-toggle-button-selected');
|
549
601
|
break;
|
@@ -655,6 +707,262 @@ const steps = {
|
|
655
707
|
default:
|
656
708
|
throw new Error('Invalid button');
|
657
709
|
}
|
710
|
+
},
|
711
|
+
|
712
|
+
//Steps related to compact recorder style
|
713
|
+
/**
|
714
|
+
* Selects the video recorder style based on the provided style.
|
715
|
+
* @param {('Standard' | 'Compact')} recorderStyle - The style of the video recorder to select.
|
716
|
+
* @throws {Error} Will throw an error if an invalid recorder style is provided.
|
717
|
+
*/
|
718
|
+
selectVideoRecorderStyle: (recorderStyle) => {
|
719
|
+
switch (recorderStyle) {
|
720
|
+
case 'Standard':
|
721
|
+
videoResponsePage.standardRecorderStyleButton()
|
722
|
+
.click()
|
723
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
724
|
+
break;
|
725
|
+
case 'Compact':
|
726
|
+
videoResponsePage.compactRecorderStyleButton()
|
727
|
+
.click()
|
728
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
729
|
+
break;
|
730
|
+
default:
|
731
|
+
throw new Error('Invalid recorder style');
|
732
|
+
}
|
733
|
+
},
|
734
|
+
|
735
|
+
startRecordingCompactPreview: () => {
|
736
|
+
videoResponsePage.recordButtonCompactPreview()
|
737
|
+
.click();
|
738
|
+
},
|
739
|
+
|
740
|
+
stopRecordingCompactPreview: () => {
|
741
|
+
videoResponsePage.stopRecordingButtonCompactPreview()
|
742
|
+
.click();
|
743
|
+
},
|
744
|
+
|
745
|
+
waitForRecordingToStartCompactPreview: () => {
|
746
|
+
videoResponsePage.recordingTimerCompactPreview()
|
747
|
+
.should('contain', '0:01 /')
|
748
|
+
},
|
749
|
+
|
750
|
+
/**
|
751
|
+
* @param {string} recordingStatus - The expected recording status, such as 'Allow access to your camera and microphone.',
|
752
|
+
* 'Preparing to record', 'Recording...', 'Recording paused', or 'Saving'.
|
753
|
+
* @throws {Error} Throws an error if an invalid recording status is provided.
|
754
|
+
* @description this function verifies the display of recording status and associated icons in the video response interface.
|
755
|
+
*/
|
756
|
+
verifyRecordingStatusCompactPreview: (recordingStatus) => {
|
757
|
+
const statusIcon = videoResponsePage.recordingStatusIcon();
|
758
|
+
|
759
|
+
let expectedIconId = null;
|
760
|
+
|
761
|
+
switch (recordingStatus) {
|
762
|
+
case 'Preparing to record':
|
763
|
+
case 'Recording...':
|
764
|
+
expectedIconId = 'g#Recording\\.\\.\\.';
|
765
|
+
break;
|
766
|
+
case 'Recording paused':
|
767
|
+
expectedIconId = '.rec-pause-btn';
|
768
|
+
break;
|
769
|
+
default:
|
770
|
+
throw new Error('Invalid recording status');
|
771
|
+
}
|
772
|
+
|
773
|
+
statusIcon.find(`${expectedIconId}`).should('be.visible');
|
774
|
+
utilities.verifyInnerText(videoResponsePage.recordingStatusTextCompactPreview(), recordingStatus);
|
775
|
+
utilities.verifyElementVisibilityState(videoResponsePage.recordingStatusTextCompactPreview(), 'visible');
|
776
|
+
},
|
777
|
+
|
778
|
+
/**
|
779
|
+
* Verifies the displayed recording time against the expected elapsed time and total time.
|
780
|
+
* @param {string} elapsedTime The elapsed time of the recording.
|
781
|
+
* @param {string} totalTime The total time of the recording.
|
782
|
+
*/
|
783
|
+
verifyRecordingTimeCompactPreview: (elapsedTime, totalTime) => {
|
784
|
+
utilities.verifyInnerText(videoResponsePage.recordingTimerCompactPreview(), `${elapsedTime} / ${totalTime}`);
|
785
|
+
},
|
786
|
+
|
787
|
+
/**
|
788
|
+
* @param {string} elapsedTime playing time of the recorded video
|
789
|
+
* @param {string} totalTime The total time of the recorded video
|
790
|
+
* @description this function is used to verify the playing time of a recorded video
|
791
|
+
*/
|
792
|
+
verifyVideoPlaybackTimerCompactPreview: (elapsedTime, totalTime) => {
|
793
|
+
videoResponsePage.playerTimer()
|
794
|
+
.should('have.text', `${elapsedTime}/${totalTime}`);
|
795
|
+
},
|
796
|
+
|
797
|
+
pauseRecordingCompactPreview: () => {
|
798
|
+
videoResponsePage.pauseRecordingButtonCompactPreview()
|
799
|
+
.click();
|
800
|
+
},
|
801
|
+
|
802
|
+
resumeRecordingCompactPreview: () => {
|
803
|
+
videoResponsePage.resumeRecordingButtonCompactPreview()
|
804
|
+
.click();
|
805
|
+
},
|
806
|
+
|
807
|
+
verifyRecordingLengthAfterResumingCompactPreview: () => {
|
808
|
+
videoResponsePage.recordingTimerCompactPreview()
|
809
|
+
.invoke('text')
|
810
|
+
.then(($timer) => {
|
811
|
+
const currentTimer = $timer.split(' / ')[0];
|
812
|
+
const currentSeconds = parseInt(currentTimer.split(':')[1], 10);
|
813
|
+
expect(currentSeconds).to.be.gte(6);
|
814
|
+
});
|
815
|
+
},
|
816
|
+
|
817
|
+
/**
|
818
|
+
* @description Records a video and saves it for a specified duration for the compact recorder style.
|
819
|
+
* @param {number} time - The duration (in milliseconds) for which the video should be recorded.
|
820
|
+
* @throws {Error} Throws an error if any step in the recording process fails.
|
821
|
+
*/
|
822
|
+
recordAndSaveVideoCompactPreview: (time) => {
|
823
|
+
videoResponsePage.steps.startRecordingCompactPreview();
|
824
|
+
utilities.verifyElementVisibilityState(videoResponsePage.startRecordingCountDown(), 'visible')
|
825
|
+
utilities.verifyElementVisibilityState(videoResponsePage.startRecordingCountDown(), 'notExist')
|
826
|
+
videoResponsePage.steps.waitForRecordingToStartCompactPreview()
|
827
|
+
videoResponsePage.steps.addWaitToRecord(time - 1000);
|
828
|
+
videoResponsePage.steps.stopRecordingCompactPreview();
|
829
|
+
},
|
830
|
+
|
831
|
+
startPlaybackCompactPreview: () => {
|
832
|
+
videoResponsePage.playPlaybackButtonCompactPreview()
|
833
|
+
.click();
|
834
|
+
},
|
835
|
+
|
836
|
+
pausePlaybackCompactPreview: () => {
|
837
|
+
videoResponsePage.pausePlaybackButtonCompactPreview()
|
838
|
+
.click();
|
839
|
+
},
|
840
|
+
|
841
|
+
waitForPlaybackToBeginCompactPreview: () => {
|
842
|
+
videoResponsePage.playbackTimeCompactPreview()
|
843
|
+
.should('contain', '0:01/')
|
844
|
+
},
|
845
|
+
|
846
|
+
pauseAndVerifyProgressBarSliderPositionCompactPreview: () => {
|
847
|
+
let initialWidthProgressBar
|
848
|
+
playbackControlsBaseComponent.progressBarSlider()
|
849
|
+
.then(($currWidth) => {
|
850
|
+
initialWidthProgressBar = $currWidth[0].valueAsNumber
|
851
|
+
});
|
852
|
+
videoResponsePage.steps.pausePlaybackCompactPreview();
|
853
|
+
playbackControlsBaseComponent.progressBarSlider()
|
854
|
+
.then(($finalWidth) => {
|
855
|
+
cy.log('The assertion is verifying the value synchronously i.e in real time')
|
856
|
+
const finalWidth = $finalWidth[0].valueAsNumber
|
857
|
+
expect(finalWidth).to.closeTo(initialWidthProgressBar, 5)
|
858
|
+
});
|
859
|
+
},
|
860
|
+
|
861
|
+
retakeRecordingCompactPreview: () => {
|
862
|
+
videoResponsePage.retakeButtonCompactPreview()
|
863
|
+
.click();
|
864
|
+
},
|
865
|
+
|
866
|
+
verifyRetakePopupContents: () => {
|
867
|
+
utilities.verifyInnerText(videoResponsePage.retakePopupContent(), 'Are you sure you want to overwrite the existing video recording?');
|
868
|
+
utilities.verifyInnerText(videoResponsePage.confirmRetakeButton(), 'Confirm');
|
869
|
+
utilities.verifyElementVisibilityState(videoResponsePage.confirmRetakeButton(), 'visible');
|
870
|
+
utilities.verifyInnerText(videoResponsePage.cancelRetakeButton(), 'Cancel');
|
871
|
+
utilities.verifyElementVisibilityState(videoResponsePage.cancelRetakeButton(), 'visible');
|
872
|
+
},
|
873
|
+
|
874
|
+
pauseRecordingFlyoutButtonCompactPreview: () => {
|
875
|
+
videoResponsePage.pauseRecordingFlyoutButton()
|
876
|
+
.click();
|
877
|
+
},
|
878
|
+
|
879
|
+
resumeRecordingFlyoutButtonCompactPreview: () => {
|
880
|
+
videoResponsePage.resumeRecordingFlyoutButton()
|
881
|
+
.click();
|
882
|
+
},
|
883
|
+
|
884
|
+
stopRecordingFlyoutButtonCompactPreview: () => {
|
885
|
+
videoResponsePage.stopRecordingFlyoutButton()
|
886
|
+
.click();
|
887
|
+
},
|
888
|
+
|
889
|
+
startPlaybackFlyoutButtonCompactPreview: () => {
|
890
|
+
videoResponsePage.playPlaybackFlyoutButton()
|
891
|
+
.click();
|
892
|
+
},
|
893
|
+
|
894
|
+
pausePlaybackFlyoutButtonCompactPreview: () => {
|
895
|
+
videoResponsePage.pausePlaybackFlyoutButton()
|
896
|
+
.click();
|
897
|
+
},
|
898
|
+
|
899
|
+
retakeRecordingFlyoutButtonCompactPreview: () => {
|
900
|
+
videoResponsePage.retakeFlyoutButton()
|
901
|
+
.click();
|
902
|
+
},
|
903
|
+
|
904
|
+
verifyAllowStudentsToResizeVideoRecorderCheckboxCheckedState: () => {
|
905
|
+
videoResponsePage.allowStudentsToResizeVideoRecorderCheckbox()
|
906
|
+
.should('be.checked');
|
907
|
+
},
|
908
|
+
|
909
|
+
uncheckAllowStudentsToResizeVideoRecorderCheckbox: () => {
|
910
|
+
videoResponsePage.allowStudentsToResizeVideoRecorderCheckbox()
|
911
|
+
.click()
|
912
|
+
.should('not.be.checked');
|
913
|
+
},
|
914
|
+
|
915
|
+
verifyAllowStudentsToRepositionVideoRecorderCheckboxCheckedState: () => {
|
916
|
+
videoResponsePage.allowStudentsToRepositionVideoRecorderCheckbox()
|
917
|
+
.should('be.checked');
|
918
|
+
},
|
919
|
+
|
920
|
+
uncheckAllowStudentsToRepositionVideoRecorderCheckbox: () => {
|
921
|
+
videoResponsePage.allowStudentsToRepositionVideoRecorderCheckbox()
|
922
|
+
.click()
|
923
|
+
.should('not.be.checked');
|
924
|
+
},
|
925
|
+
|
926
|
+
verifyStandardRecorderStyleToggleButtonSelectedState: () => {
|
927
|
+
videoResponsePage.standardRecorderStyleButton()
|
928
|
+
.should('have.class', 'ngie-toggle-button-selected');
|
929
|
+
},
|
930
|
+
|
931
|
+
verifyVideoRecorderDefaultWidthInputFieldValue: (value) => {
|
932
|
+
utilities.verifyInputFieldValue(videoResponsePage.videoRecorderDefaultWidthInputField(), value);
|
933
|
+
|
934
|
+
},
|
935
|
+
|
936
|
+
/**
|
937
|
+
* Set the default width for the video recorder.
|
938
|
+
* @param {number} value - The value to set as the default width.
|
939
|
+
*/
|
940
|
+
setVideoRecorderDefaultWidth: (value) => {
|
941
|
+
videoResponsePage.videoRecorderDefaultWidthInputField()
|
942
|
+
.clear()
|
943
|
+
.type(value)
|
944
|
+
.blur();
|
945
|
+
},
|
946
|
+
|
947
|
+
clearVideoRecorderDefaultWidthInputField: () => {
|
948
|
+
videoResponsePage.videoRecorderDefaultWidthInputField()
|
949
|
+
.clear()
|
950
|
+
.blur();
|
951
|
+
},
|
952
|
+
|
953
|
+
/**
|
954
|
+
* Verify the dimensions of the video recorder flyout.
|
955
|
+
* @param {number} width - The expected width of the flyout.
|
956
|
+
* @param {number} height - The expected height of the flyout.
|
957
|
+
*/
|
958
|
+
verifyVideoRecorderFlyoutDimensions: (width, height) => {
|
959
|
+
videoResponsePage.recorderFlyoutCompactPreview()
|
960
|
+
.then(($element) => {
|
961
|
+
const flyoutHeight = $element[0].clientHeight;
|
962
|
+
const flyoutWidth = $element[0].clientWidth;
|
963
|
+
expect(flyoutHeight).to.be.closeTo(height, 2)
|
964
|
+
expect(flyoutWidth).to.be.closeTo(width, 2)
|
965
|
+
});
|
658
966
|
}
|
659
967
|
}
|
660
968
|
|
@@ -669,7 +977,43 @@ const tests = {
|
|
669
977
|
...studentViewSettingsLabelComponent.tests,
|
670
978
|
...additionalSettingsPanel.tests,
|
671
979
|
...allowTeachersToDownloadStudentResponseComponent.tests,
|
672
|
-
...
|
980
|
+
...playbackControlsBaseComponent.tests,
|
981
|
+
...additionalSettingsAccessibilitySectionComponent.tests,
|
982
|
+
verifyRetakePopupCSSAndA11y: () => {
|
983
|
+
it('CSS of \'Retake\' popup', { tags: 'css' }, () => {
|
984
|
+
utilities.verifyCSS(dialogBoxBase.dialogBox(), {
|
985
|
+
'border': `1px solid ${css.color.defaultDropdownBorder}`,
|
986
|
+
'background-color': css.color.defaultBackground
|
987
|
+
});
|
988
|
+
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
989
|
+
'color': css.color.questionHeading,
|
990
|
+
'font-size': css.fontSize.heading,
|
991
|
+
'font-weight': css.fontWeight.semibold
|
992
|
+
});
|
993
|
+
utilities.verifyCSS(videoResponsePage.retakePopupContent(), {
|
994
|
+
'border-top': `1px solid ${css.color.secondaryBtnBorder}`,
|
995
|
+
'color': css.color.labels,
|
996
|
+
'font-size': css.fontSize.default,
|
997
|
+
'font-weight': css.fontWeight.regular
|
998
|
+
});
|
999
|
+
utilities.verifyCSS(videoResponsePage.confirmRetakeButton(), {
|
1000
|
+
'background-color': css.color.deleteBtn,
|
1001
|
+
'color': css.color.whiteText,
|
1002
|
+
'font-size': css.fontSize.default,
|
1003
|
+
'font-weight': css.fontWeight.semibold
|
1004
|
+
});
|
1005
|
+
utilities.verifyCSS(videoResponsePage.cancelRetakeButton(), {
|
1006
|
+
'background-color': css.color.secondaryBtnBg,
|
1007
|
+
'color': css.color.secondaryBtn,
|
1008
|
+
'font-size': css.fontSize.default,
|
1009
|
+
'font-weight': css.fontWeight.semibold
|
1010
|
+
});
|
1011
|
+
});
|
1012
|
+
|
1013
|
+
it('Accessibility of \'Retake\' popup', { tags: 'a11y' }, () => {
|
1014
|
+
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
1015
|
+
});
|
1016
|
+
}
|
673
1017
|
}
|
674
1018
|
|
675
1019
|
export const videoResponsePage = {
|