itemengine-cypress-automation 1.0.189 → 1.0.190-7thMayFixes-fcaf7b8.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 +2 -0
- package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +3 -30
- package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +0 -27
- package/cypress/e2e/ILC/AudioPlayerNew/customizePlayerLayoutSettings.js +9 -9
- package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +12 -12
- package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/editAndPreviewTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +1 -0
- package/cypress/e2e/ILC/AudioResponseNew/headerSection.js +4 -20
- package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +366 -0
- package/cypress/e2e/ILC/ChartsBar/checkAnswerFunctionalityForAllViews.smoke.js +181 -0
- package/cypress/e2e/ILC/ChartsBar/gradingViewAndCorrectAnswerView.smoke.js +283 -0
- package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +396 -130
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +2 -2
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +0 -3
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +3 -5
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +0 -4
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabScoring.js +0 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePageHeaderSection.js +4 -24
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +0 -9
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +3 -3
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +0 -2
- package/cypress/e2e/ILC/EssayResponse/headerSection.js +3 -18
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +0 -1
- package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/headerSection.js +0 -5
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +0 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +5 -5
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +0 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +0 -2
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +6 -6
- package/cypress/e2e/ILC/GridFill/headerSection.js +4 -5
- package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +276 -0
- package/cypress/e2e/ILC/ImageHighlight/checkAnswerFunctionalityForAllViews.smoke.js +141 -0
- package/cypress/e2e/ILC/ImageHighlight/previewContentsForAllViews.smoke.js +150 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/Matching/additionalSettings.js +1 -0
- package/cypress/e2e/ILC/Matching/headerSection.js +2 -2
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +22 -20
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +4 -2
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +4 -2
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +3 -2
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +1 -8
- package/cypress/e2e/ILC/NumberLine/headerSection.js +3 -3
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +5 -4
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +4 -2
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +4 -2
- package/cypress/e2e/ILC/NumberLineLabel/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +4 -2
- package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +2 -1
- package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +3 -2
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +1 -7
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +0 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +2 -2
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +3 -3
- package/cypress/e2e/ILC/VideoResponseNew/customizePlaybackControls.js +2 -2
- package/cypress/e2e/ILC/VideoResponseNew/editTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/VideoResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +6 -6
- package/cypress/e2e/ILC/VideoResponseNew/previewContentsForAllViews.smoke.js +6 -6
- package/cypress/e2e/ILC/VideoResponseNew/standardRecorderStyle.js +9 -9
- package/cypress/e2e/ILC/VideoResponseNew/studentViewSettings.js +2 -4
- package/cypress/pages/audioPlayerPage.js +4 -2
- package/cypress/pages/audioResponsePage.js +2 -0
- package/cypress/pages/chartsBarPage.js +289 -3
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +8 -5
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/barAndLineChartComponent.js +7 -4
- package/cypress/pages/components/chartsCommonComponent.js +33 -0
- package/cypress/pages/components/imageCanvasComponent.js +3 -3
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/questionInputFieldComponent.js +2 -1
- package/cypress/pages/components/resetPopupComponent.js +7 -3
- package/cypress/pages/components/scoringSectionBaseEditTab.js +6 -17
- package/cypress/pages/components/singleMultipleSelectionModeComponent.js +16 -0
- package/cypress/pages/contentBlocksPage.js +1 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +22 -24
- package/cypress/pages/drawingResponsePage.js +3 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +14 -0
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +1 -1
- package/cypress/pages/imageHighlightPage.js +364 -0
- package/cypress/pages/index.js +2 -1
- package/cypress/pages/matchingPage.js +2 -1
- package/cypress/pages/numberLineLabelPage.js +14 -7
- package/cypress/pages/protractorPage.js +1 -1
- package/cypress/pages/readingRulerPage.js +1 -1
- package/cypress/pages/rulerPage.js +3 -3
- package/cypress/pages/textEntryMathPage.js +2 -2
- package/cypress/pages/videoResponsePage.js +6 -5
- package/package.json +1 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
@@ -26,14 +26,14 @@ describe('Create item page - Video response: Preview tab - Standard recorder sty
|
|
26
26
|
utilities.verifyElementVisibilityState(videoResponsePage.pauseButton(), 'visible');
|
27
27
|
videoResponsePage.steps.verifyPauseButtonDisabledState();
|
28
28
|
utilities.verifyElementVisibilityState(videoResponsePage.stopButton(), 'visible');
|
29
|
-
utilities.verifyInnerText(videoResponsePage.recordingTimer(), '
|
29
|
+
utilities.verifyInnerText(videoResponsePage.recordingTimer(), '5:00');
|
30
30
|
});
|
31
31
|
|
32
32
|
it('When the recording starts, the countdown should disappear, status message should change to \'Recording...\', the \'Pause\' button should get enabled, user should be able to view the duration of their recorded video in minutes, displayed as \'(min:secs/min:sec)\'. Pause recording and Stop recording should be displayed in record player. Resume recording button should not be displayed.', () => {
|
33
33
|
utilities.verifyElementVisibilityState(videoResponsePage.startRecordingCountDown(), 'notExist');
|
34
34
|
videoResponsePage.steps.verifyRecordingStatus('Recording...');
|
35
35
|
videoResponsePage.steps.verifyPauseButtonEnabledState();
|
36
|
-
videoResponsePage.steps.verifyRecordingTime('
|
36
|
+
videoResponsePage.steps.verifyRecordingTime('0:04', '5:00');
|
37
37
|
utilities.verifyElementVisibilityState(videoResponsePage.pauseButton(), 'visible');
|
38
38
|
utilities.verifyElementVisibilityState(videoResponsePage.stopButton(), 'visible');
|
39
39
|
utilities.verifyElementVisibilityState(videoResponsePage.resumeButton(), 'notExist');
|
@@ -93,7 +93,7 @@ describe('Create item page - Video response: Preview tab - Standard recorder sty
|
|
93
93
|
videoResponsePage.steps.waitForRecordingToStart();
|
94
94
|
videoResponsePage.steps.addWaitToRecord(3000);
|
95
95
|
videoResponsePage.steps.pauseRecording();
|
96
|
-
videoResponsePage.steps.verifyRecordingTime('
|
96
|
+
videoResponsePage.steps.verifyRecordingTime('0:04', '5:00');
|
97
97
|
videoResponsePage.steps.verifyRecordingStatus('Recording paused');
|
98
98
|
utilities.verifyElementVisibilityState(videoResponsePage.pauseButton(), 'notExist');
|
99
99
|
utilities.verifyElementVisibilityState(videoResponsePage.resumeButton(), 'visible');
|
@@ -134,7 +134,7 @@ describe('Create item page - Video response: Preview tab - Standard recorder sty
|
|
134
134
|
it('When the recorder is in paused state and the user clicks on the \'Resume recording\' button, recording should get resumed. the status message should update to "Recording...". User should be able to view the duration of their recorded video in minutes, displayed as \'(min:secs/min:sec)\'. Pause recording and stop recording buttons should be displayed. Start recording button should not be displayed', () => {
|
135
135
|
videoResponsePage.steps.resumeRecording();
|
136
136
|
videoResponsePage.steps.verifyRecordingStatus('Recording...');
|
137
|
-
videoResponsePage.steps.verifyRecordingTime('
|
137
|
+
videoResponsePage.steps.verifyRecordingTime('0:05', '5:00');
|
138
138
|
utilities.verifyElementVisibilityState(videoResponsePage.pauseButton(), 'visible');
|
139
139
|
utilities.verifyElementVisibilityState(videoResponsePage.stopButton(), 'visible');
|
140
140
|
});
|
@@ -187,7 +187,7 @@ describe('Create item page - Video response: Preview tab - Standard recorder sty
|
|
187
187
|
videoResponsePage.steps.waitForRecordingToStart();
|
188
188
|
videoResponsePage.steps.addWaitToRecord(5000);
|
189
189
|
utilities.verifyInnerText(videoResponsePage.savedResponseText(), 'Your response has been recorded.');
|
190
|
-
videoResponsePage.steps.verifyVideoPlaybackTimer('
|
190
|
+
videoResponsePage.steps.verifyVideoPlaybackTimer('0:00', '0:05');
|
191
191
|
});
|
192
192
|
|
193
193
|
it('When a recording is saved, A video player with \'Retake recording\' button, \'Play\' button and progress bar should be displayed. User should be able to view the duration of their recorded video in minutes, displayed as \'(min:secs)\'. Volume control, Playback speed and full screen buttons should be displayed', () => {
|
@@ -225,7 +225,7 @@ describe('Create item page - Video response: Preview tab - Standard recorder sty
|
|
225
225
|
it('When the user clicks on \'Play\' button, then user should be able to playback the recording. Timer should display the amount of video that has been played and the total recording length in (mm:ss)/(mm:ss) format. \'Your response has been recorded\' message should be displayed below video player', () => {
|
226
226
|
videoResponsePage.steps.startPlayback();
|
227
227
|
videoResponsePage.steps.waitForPlaybackToBegin();
|
228
|
-
videoResponsePage.steps.verifyVideoPlaybackTimer('
|
228
|
+
videoResponsePage.steps.verifyVideoPlaybackTimer('0:03', '0:10');
|
229
229
|
utilities.verifyInnerText(videoResponsePage.savedResponseText(), 'Your response has been recorded.');
|
230
230
|
});
|
231
231
|
|
@@ -271,7 +271,7 @@ describe('Create item page - Video response: Preview tab - Standard recorder sty
|
|
271
271
|
videoResponsePage.steps.startPlayback();
|
272
272
|
videoResponsePage.steps.waitForPlaybackToBegin();
|
273
273
|
videoResponsePage.steps.addWaitToPlayVideo(10000);
|
274
|
-
videoResponsePage.steps.verifyVideoPlaybackTimer('
|
274
|
+
videoResponsePage.steps.verifyVideoPlaybackTimer('0:11', '0:20');
|
275
275
|
videoResponsePage.steps.pauseAndVerifyProgressBarSliderPosition();
|
276
276
|
utilities.verifyElementVisibilityState(videoResponsePage.playbackPlayButton(), 'visible');
|
277
277
|
utilities.verifyElementVisibilityState(videoResponsePage.playbackPauseButton(), 'notExist');
|
@@ -310,7 +310,7 @@ describe('Create item page - Video response: Preview tab - Standard recorder sty
|
|
310
310
|
});
|
311
311
|
|
312
312
|
it('When the video playback is completed, the \'Pause\' button should get replaced with \'Play\' button', () => {
|
313
|
-
videoResponsePage.steps.verifyVideoPlaybackTimer('
|
313
|
+
videoResponsePage.steps.verifyVideoPlaybackTimer('0:20', '0:20');
|
314
314
|
utilities.verifyElementVisibilityState(videoResponsePage.playbackPlayButton(), 'visible');
|
315
315
|
utilities.verifyElementVisibilityState(videoResponsePage.playbackPauseButton(), 'notExist');
|
316
316
|
videoResponsePage.steps.verifyProgressBarSliderPosition(99);
|
@@ -553,7 +553,7 @@ describe('Create item page - Video response: Preview tab - Standard recorder sty
|
|
553
553
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
554
554
|
utilities.verifyElementVisibilityState(videoResponsePage.retakeRecordingButton(), 'visible');
|
555
555
|
utilities.verifyElementVisibilityState(videoResponsePage.playbackPlayButton(), 'visible');
|
556
|
-
videoResponsePage.steps.verifyVideoPlaybackTimer('
|
556
|
+
videoResponsePage.steps.verifyVideoPlaybackTimer('0:00', '0:05');
|
557
557
|
});
|
558
558
|
|
559
559
|
it('When the user clicks on Confirm button of the Retake recording popup, the previous recording should get deleted and a new recording should begin', () => {
|
@@ -91,7 +91,7 @@ describe('Create item page - Audio response: Student view settings for Standard
|
|
91
91
|
utilities.verifyElementVisibilityState(videoResponsePage.recordingTimer(), 'visible');
|
92
92
|
videoResponsePage.steps.addWaitToRecord(2000);
|
93
93
|
videoResponsePage.steps.stopRecording();
|
94
|
-
videoResponsePage.steps.verifyVideoPlaybackTimer('
|
94
|
+
videoResponsePage.steps.verifyVideoPlaybackTimer('0:00', '0:03');
|
95
95
|
utilities.verifyElementVisibilityState(videoResponsePage.playerTimer(), 'visible');
|
96
96
|
});
|
97
97
|
|
@@ -130,7 +130,7 @@ describe('Create item page - Audio response: Student view settings for Standard
|
|
130
130
|
videoResponsePage.steps.startRecording();
|
131
131
|
videoResponsePage.steps.waitForRecordingToStart();
|
132
132
|
videoResponsePage.steps.stopRecording();
|
133
|
-
utilities.verifyElementVisibilityState(videoResponsePage.
|
133
|
+
utilities.verifyElementVisibilityState(videoResponsePage.progressBarSlider(), 'hidden');
|
134
134
|
});
|
135
135
|
});
|
136
136
|
|
@@ -175,14 +175,12 @@ describe('Create item page - Audio response: Student view settings for Standard
|
|
175
175
|
videoResponsePage.steps.startRecording();
|
176
176
|
videoResponsePage.steps.waitForRecordingToStart();
|
177
177
|
videoResponsePage.steps.stopRecording();
|
178
|
-
videoResponsePage.steps.verifyResponseIsRecordedHelpText();
|
179
178
|
videoResponsePage.steps.retakeRecording();
|
180
179
|
videoResponsePage.steps.confirmRetake();
|
181
180
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
182
181
|
utilities.verifyInnerText(videoResponsePage.recordingStatusText(), 'Recording...');
|
183
182
|
videoResponsePage.steps.waitForRecordingToStart();
|
184
183
|
videoResponsePage.steps.stopRecording();
|
185
|
-
videoResponsePage.steps.verifyResponseIsRecordedHelpText();
|
186
184
|
utilities.verifyElementNotDisabled(videoResponsePage.retakeRecordingButton());
|
187
185
|
});
|
188
186
|
|
@@ -12,7 +12,7 @@ const selectors = {
|
|
12
12
|
addAudioURLRadioButton: () => cy.get('.ngie-radio-btn input').eq(1),
|
13
13
|
uploadAudioFileUploadLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(0),
|
14
14
|
uploadAudioFileNameLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(1),
|
15
|
-
deleteAudioFileButton: () => cy.get('[aria-label
|
15
|
+
deleteAudioFileButton: () => cy.get('[aria-label="Delete"]'),
|
16
16
|
sourceUrlLabel: () => cy.get('[class*="AudioPlayerstyles__AudioLabel"]').eq(0),
|
17
17
|
sourceUrlInputField: () => cy.get('input[aria-label="Source URL"]'),
|
18
18
|
uploadAudioChooseFileButton: () => cy.get('.choose-file-upload-button'),
|
@@ -118,6 +118,7 @@ const steps = {
|
|
118
118
|
audioPlayerPage.inputTypeFile()
|
119
119
|
.attachFile(filePath);
|
120
120
|
utilities.verifyElementVisibilityState(audioPlayerPage.audioFileUploadProgressBar(), 'hidden');
|
121
|
+
audioPlayerPage.steps.addWaitToPlayAudio(1000);
|
121
122
|
},
|
122
123
|
|
123
124
|
/**
|
@@ -347,8 +348,9 @@ const steps = {
|
|
347
348
|
*/
|
348
349
|
enterTextInSourceURLInputField: (text) => {
|
349
350
|
audioPlayerPage.sourceUrlInputField()
|
350
|
-
.type(text
|
351
|
+
.type(text)
|
351
352
|
.blur();
|
353
|
+
audioPlayerPage.steps.addWaitToPlayAudio(1000);
|
352
354
|
},
|
353
355
|
|
354
356
|
clearTextInSourceURLInputField: () => {
|
@@ -119,6 +119,7 @@ const steps = {
|
|
119
119
|
...additionalSettingsPanel.steps,
|
120
120
|
...limitNumberOfRetakeComponent.steps,
|
121
121
|
...allowTeachersToDownloadStudentResponseComponent.steps,
|
122
|
+
...commonComponents.steps,
|
122
123
|
startRecordingStandardPreview: () => {
|
123
124
|
audioResponsePage.standardPreviewStartRecordingButton()
|
124
125
|
.click();
|
@@ -799,6 +800,7 @@ const tests = {
|
|
799
800
|
...additionalSettingsAccessibilitySectionComponent.tests,
|
800
801
|
...limitNumberOfRetakeComponent.tests,
|
801
802
|
...allowTeachersToDownloadStudentResponseComponent.tests,
|
803
|
+
...commonComponents.tests,
|
802
804
|
verifyRetakePopupCSSAndA11y: () => {
|
803
805
|
it('CSS of \'Retake\' popup', { tags: 'css' }, () => {
|
804
806
|
utilities.verifyCSS(dialogBoxBase.dialogBox(), {
|
@@ -1,12 +1,16 @@
|
|
1
1
|
import utilities from "../support/helpers/utilities"
|
2
|
-
import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents } from "./components";
|
2
|
+
import { barAndLineChartComponent, chartsCommonComponent, createQuestionBasePage, questionInstructionsComponent, resetPopupComponent, scoringSectionBaseEditTab, commonComponents, autoScoredStudentViewSettings, autoScoredScoringPreviewTab } from "./components";
|
3
|
+
import { dialogBoxBase } from "./dialogBoxBase";
|
4
|
+
const css = Cypress.env('css');
|
3
5
|
|
4
6
|
const selectors = {
|
5
7
|
...questionInstructionsComponent,
|
6
8
|
...barAndLineChartComponent,
|
7
9
|
...chartsCommonComponent,
|
8
10
|
...commonComponents,
|
11
|
+
...dialogBoxBase,
|
9
12
|
barDragHandle: () => cy.get('.bar-drag-handle'),
|
13
|
+
bar: () => cy.get('.ngie-chart-point'),
|
10
14
|
selectChartTypeMaxYLabel: () => cy.get('[class*="ChartsPreviewstyles__CustomInputFieldLabel"]'),
|
11
15
|
selectChartTypeMaxYInputField: () => cy.get('[class*="ChartsPreviewstyles__CustomInputFieldWrapper"] input'),
|
12
16
|
selectChartTypeMaxXLabel: () => cy.get('[class*="ChartsPreviewstyles__CustomInputFieldLabel"]'),
|
@@ -15,6 +19,7 @@ const selectors = {
|
|
15
19
|
selectChartTypeBar: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] .ngie-chart-point'),
|
16
20
|
barLockIcon: () => cy.get('[class*="ChartGridstyle__BarLockIconWrapper"]'),
|
17
21
|
selectChartTypeBarLabel: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartGridstyle__NameDiv-"]'),
|
22
|
+
selectChartTypeMaxBarCountInputField: () => cy.get('[id="max bar count"]'),
|
18
23
|
//specify correct answer section
|
19
24
|
specifyCorrectAnswerBarDragHandle: () => cy.get('.ngie-accordion .bar-drag-handle'),
|
20
25
|
specifyCorrectAnswerBar: () => cy.get('.ngie-accordion .ngie-chart-point'),
|
@@ -24,6 +29,7 @@ const selectors = {
|
|
24
29
|
previewTabBarDragHandle: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible .bar-drag-handle'),
|
25
30
|
previewTabBar: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible .ngie-chart-point'),
|
26
31
|
previewTabBarLabel: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartGridstyle__NameDiv-"]'),
|
32
|
+
previewTabBarTooltipColorBlock: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartTooltipstyles__ColorBox"]:visible')
|
27
33
|
}
|
28
34
|
|
29
35
|
const steps = {
|
@@ -31,8 +37,10 @@ const steps = {
|
|
31
37
|
...questionInstructionsComponent.steps,
|
32
38
|
...scoringSectionBaseEditTab.steps,
|
33
39
|
...barAndLineChartComponent.steps,
|
40
|
+
...autoScoredScoringPreviewTab.steps,
|
34
41
|
...chartsCommonComponent.steps,
|
35
42
|
...resetPopupComponent.steps,
|
43
|
+
...autoScoredStudentViewSettings.steps,
|
36
44
|
/**
|
37
45
|
* @description set the bar height/value in the select chart type section chart
|
38
46
|
* @param {Object} barProperties - The properties and changes to be done on the bar
|
@@ -141,6 +149,18 @@ const steps = {
|
|
141
149
|
.blur();
|
142
150
|
},
|
143
151
|
|
152
|
+
/**
|
153
|
+
* @description Set the Max bar count value in its input field
|
154
|
+
* @param {number} value Max bar value to be set
|
155
|
+
*/
|
156
|
+
setMaxBarCountValue: (value) => {
|
157
|
+
chartsBarPage.selectChartTypeMaxBarCountInputField()
|
158
|
+
.clear()
|
159
|
+
.type(value)
|
160
|
+
.should('have.value', value)
|
161
|
+
.blur();
|
162
|
+
},
|
163
|
+
|
144
164
|
//Preview tab
|
145
165
|
/**
|
146
166
|
* Verify the bar height in preview tab
|
@@ -163,10 +183,31 @@ const steps = {
|
|
163
183
|
utilities.getNthElement(chartsBarPage.previewTabBar(), barIndex)
|
164
184
|
.within(() => {
|
165
185
|
utilities.verifyElementVisibilityState(chartsBarPage.barLockIcon(), 'visible');
|
166
|
-
|
186
|
+
chartsBarPage.steps.verifyDragHandleNotVisible();
|
167
187
|
});
|
168
188
|
},
|
169
189
|
|
190
|
+
/**
|
191
|
+
* Verify locked bar is uneditable in preview tab
|
192
|
+
* @param {number} barIndex index of the bar
|
193
|
+
*/
|
194
|
+
verifyLockedBarIsUneditableInPreviewTab: (barIndex) => {
|
195
|
+
utilities.getNthElement(chartsBarPage.previewTabBar(), barIndex)
|
196
|
+
.invoke('attr', 'height')
|
197
|
+
.then((barValue) => {
|
198
|
+
let originalBarValue = parseFloat(barValue)
|
199
|
+
utilities.getNthElement(chartsBarPage.selectChartTypeBarDragHandle(), barIndex)
|
200
|
+
.focus()
|
201
|
+
.type('{upArrow}{upArrow}{upArrow}{downArrow}{downArrow}{downArrow}', { force: true });
|
202
|
+
utilities.getNthElement(chartsBarPage.specifyCorrectAnswerBar(), barIndex)
|
203
|
+
.should('have.attr', 'height', originalBarValue);
|
204
|
+
});
|
205
|
+
},
|
206
|
+
|
207
|
+
verifyDragHandleNotVisible: () => {
|
208
|
+
utilities.verifyElementVisibilityState(chartsBarPage.barDragHandle().find('svg'), 'notExist');
|
209
|
+
},
|
210
|
+
|
170
211
|
/**
|
171
212
|
* @description increase the bar height/value in the preview tab chart
|
172
213
|
* @param {Object} barProperties - The properties and changes to be done on the bar
|
@@ -199,6 +240,18 @@ const steps = {
|
|
199
240
|
});
|
200
241
|
},
|
201
242
|
|
243
|
+
keyBoardUpBarInPreviewTab: (barIndex) => {
|
244
|
+
utilities.getNthElement(chartsBarPage.previewTabBarDragHandle(), barIndex)
|
245
|
+
.focus()
|
246
|
+
.type('{upArrow}');
|
247
|
+
},
|
248
|
+
|
249
|
+
keyBoardDownBarInPreviewTab: (barIndex) => {
|
250
|
+
utilities.getNthElement(chartsBarPage.previewTabBarDragHandle(), barIndex)
|
251
|
+
.focus()
|
252
|
+
.type('{downArrow}');
|
253
|
+
},
|
254
|
+
|
202
255
|
/**
|
203
256
|
* @description Edit bar label in preview tab chart
|
204
257
|
* @param {number} barIndex Index of the bar to be edited
|
@@ -222,10 +275,243 @@ const steps = {
|
|
222
275
|
utilities.triggerMouseover(utilities.getNthElement(chartsBarPage.previewTabBar(), barIndex))
|
223
276
|
chartsBarPage.barAndPointTooltipDeleteButton()
|
224
277
|
.click();
|
278
|
+
},
|
279
|
+
|
280
|
+
/**
|
281
|
+
* Verify the bar height in correct answer section tab
|
282
|
+
* @param {Object} barProperties - The properties of the bar
|
283
|
+
* @param {number} barProperties.barIndex index of the bar
|
284
|
+
* @param {number} barProperties.barValue Height of the bar as per the axis
|
285
|
+
* @param {number} barProperties.range Maximum value of the axis on which bar value is determined
|
286
|
+
*/
|
287
|
+
verifyBarHeightInCorrectAnswerSection: ({ barIndex, barValue, range }) => {
|
288
|
+
let barHeight = parseFloat(barValue /= range)
|
289
|
+
chartsBarPage.previewTabChartWrapper()
|
290
|
+
.eq(1)
|
291
|
+
.within(() => {
|
292
|
+
utilities.getNthElement(chartsBarPage.bar(), barIndex)
|
293
|
+
.should('have.attr', 'height', barHeight);
|
294
|
+
});
|
295
|
+
},
|
296
|
+
|
297
|
+
/**
|
298
|
+
* Verify the bar is locked in correct answer section
|
299
|
+
* @param {number} barIndex index of the bar
|
300
|
+
*/
|
301
|
+
verifyBarIsLockedInCorrectAnswerSection: (barIndex) => {
|
302
|
+
chartsBarPage.previewTabChartWrapper()
|
303
|
+
.eq(1)
|
304
|
+
.within(() => {
|
305
|
+
utilities.getNthElement(chartsBarPage.bar(), barIndex)
|
306
|
+
.within(() => {
|
307
|
+
utilities.verifyElementVisibilityState(chartsBarPage.barLockIcon(), 'visible');
|
308
|
+
utilities.verifyElementVisibilityState(chartsBarPage.barDragHandle().find('svg'), 'notExist');
|
309
|
+
});
|
310
|
+
});
|
311
|
+
},
|
312
|
+
|
313
|
+
/**
|
314
|
+
* Verify the correct/incorrect icon of bar in preview tab
|
315
|
+
* @param {number} barIndex index of the bar
|
316
|
+
* @param {string} icon correct or incorrect icon
|
317
|
+
* @example verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct')
|
318
|
+
*/
|
319
|
+
verifyBarCorrectIncorrectIconInPreviewTab: (barIndex, icon) => {
|
320
|
+
utilities.getNthElement(chartsBarPage.previewTabBar(), barIndex)
|
321
|
+
.within(() => {
|
322
|
+
chartsBarPage.tickIconWrapper()
|
323
|
+
.should('be.visible')
|
324
|
+
.and('have.class', `${icon}-option-icon`);
|
325
|
+
});
|
326
|
+
},
|
327
|
+
|
328
|
+
/**
|
329
|
+
* Verify the correct/incorrect icon not exists for bar in preview tab
|
330
|
+
* @param {number} barIndex index of the bar
|
331
|
+
*/
|
332
|
+
verifyBarCorrectIncorrectIconNotExistsInPreviewTab: (barIndex) => {
|
333
|
+
utilities.getNthElement(chartsBarPage.previewTabBar(), barIndex)
|
334
|
+
.within(() => {
|
335
|
+
utilities.verifyElementVisibilityState(chartsBarPage.tickIconWrapper(), 'notExist');
|
336
|
+
});
|
337
|
+
},
|
338
|
+
|
339
|
+
/**
|
340
|
+
* Verify the correct/incorrect icon of bar in correct answer section
|
341
|
+
* @param {number} barIndex index of the bar
|
342
|
+
* @example verifyBarCorrectIconInCorrectAnswerSection(0)
|
343
|
+
*/
|
344
|
+
verifyBarCorrectIconInCorrectAnswerSection: (barIndex) => {
|
345
|
+
chartsBarPage.previewTabChartWrapper()
|
346
|
+
.eq(1)
|
347
|
+
.within(() => {
|
348
|
+
utilities.getNthElement(chartsBarPage.bar(), barIndex)
|
349
|
+
.within(() => {
|
350
|
+
chartsBarPage.tickIconWrapper()
|
351
|
+
.should('be.visible')
|
352
|
+
.and('have.class', 'correct-option-icon');
|
353
|
+
});
|
354
|
+
});
|
355
|
+
},
|
356
|
+
|
357
|
+
/**
|
358
|
+
* Verify the correct/incorrect icon not exists for bar in correct answer section
|
359
|
+
* @param {number} barIndex index of the bar
|
360
|
+
*/
|
361
|
+
verifyBarCorrectIncorrectIconNotExistsInCorrectAnswerSection: (barIndex) => {
|
362
|
+
chartsBarPage.previewTabChartWrapper()
|
363
|
+
.eq(1)
|
364
|
+
.within(() => {
|
365
|
+
utilities.getNthElement(chartsBarPage.bar(), barIndex)
|
366
|
+
.within(() => {
|
367
|
+
utilities.verifyElementVisibilityState(chartsBarPage.tickIconWrapper(), 'notExist');
|
368
|
+
});
|
369
|
+
});
|
370
|
+
},
|
371
|
+
|
372
|
+
/**
|
373
|
+
* Verify the bar is locked in correct answer section
|
374
|
+
* @param {number} barIndex index of the bar
|
375
|
+
*/
|
376
|
+
verifyBarIsLockedInCorrectAnswerSection: (barIndex) => {
|
377
|
+
chartsBarPage.previewTabChartWrapper()
|
378
|
+
.eq(1)
|
379
|
+
.within(() => {
|
380
|
+
utilities.getNthElement(chartsBarPage.bar(), barIndex)
|
381
|
+
.within(() => {
|
382
|
+
utilities.verifyElementVisibilityState(chartsBarPage.barLockIcon(), 'visible');
|
383
|
+
utilities.verifyElementVisibilityState(chartsBarPage.barDragHandle().find('svg'), 'notExist');
|
384
|
+
});
|
385
|
+
});
|
386
|
+
},
|
387
|
+
|
388
|
+
/**
|
389
|
+
* @description Verify chart range in correct answer section
|
390
|
+
* @param {number} maximumValue maximum value of range
|
391
|
+
*/
|
392
|
+
verifyChartRangeInCorrectAnswerSection: (maximumValue) => {
|
393
|
+
chartsBarPage.previewTabChartWrapper()
|
394
|
+
.eq(1)
|
395
|
+
.within(() => {
|
396
|
+
utilities.verifyTextContent(utilities.getNthElement(chartsBarPage.yAxisCoordinate(), 0), maximumValue);
|
397
|
+
});
|
398
|
+
},
|
399
|
+
|
400
|
+
/**
|
401
|
+
* @description Verify graph title in correct answer section
|
402
|
+
* @param {string} graphTitle Title of graph
|
403
|
+
*/
|
404
|
+
verifyGraphTitleInCorrectAnswerSection: (graphTitle) => {
|
405
|
+
chartsBarPage.previewTabChartWrapper()
|
406
|
+
.eq(1)
|
407
|
+
.within(() => {
|
408
|
+
utilities.verifyTextContent(utilities.getNthElement(chartsBarPage.graphTitle(), 0), graphTitle);
|
409
|
+
});
|
410
|
+
},
|
411
|
+
|
412
|
+
/**
|
413
|
+
* @description Verify Y axis label in correct answer section
|
414
|
+
* @param {string} yAxisLabel
|
415
|
+
*/
|
416
|
+
verifyYAxisLabelInCorrectAnswerSection: (yAxisLabel) => {
|
417
|
+
chartsBarPage.previewTabChartWrapper()
|
418
|
+
.eq(1)
|
419
|
+
.within(() => {
|
420
|
+
utilities.verifyTextContent(utilities.getNthElement(chartsBarPage.yAxisLabel(), 0), yAxisLabel);
|
421
|
+
});
|
422
|
+
},
|
423
|
+
|
424
|
+
/**
|
425
|
+
* @description Verify X axis label in correct answer section
|
426
|
+
* @param {string} yAxisLabel
|
427
|
+
*/
|
428
|
+
verifyXAxisLabelInCorrectAnswerSection: (XAxisLabel) => {
|
429
|
+
chartsBarPage.previewTabChartWrapper()
|
430
|
+
.eq(1)
|
431
|
+
.within(() => {
|
432
|
+
utilities.verifyTextContent(utilities.getNthElement(chartsBarPage.xAxisLabel(), 0), XAxisLabel);
|
433
|
+
});
|
434
|
+
},
|
435
|
+
|
436
|
+
|
437
|
+
/**
|
438
|
+
* @description verify bar in correct answer section
|
439
|
+
* @param {Object} barProperties - The properties and changes to be done on the bar
|
440
|
+
* @param {number} barProperties.barIndex index of the bar
|
441
|
+
* @param {number} barProperties.barValue value of th bar as per Y axis
|
442
|
+
* @param {number} barProperties.range Maximum value of the axis on which bar value is determined
|
443
|
+
*/
|
444
|
+
verifyBarInCorrectAnswerSection: ({ barIndex, barValue, range }) => {
|
445
|
+
chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: barIndex, barValue: barValue, range: range });
|
446
|
+
chartsBarPage.steps.verifyBarCorrectIconInCorrectAnswerSection(barIndex);
|
447
|
+
},
|
448
|
+
|
449
|
+
/**
|
450
|
+
* @description verify locked bar in correct answer section
|
451
|
+
* @param {Object} barProperties - The properties and changes to be done on the bar
|
452
|
+
* @param {number} barProperties.barIndex index of the bar
|
453
|
+
* @param {number} barProperties.barValue value of th bar as per Y axis
|
454
|
+
* @param {number} barProperties.range Maximum value of the axis on which bar value is determined
|
455
|
+
*/
|
456
|
+
verifyLockedBarInCorrectAnswerSection: ({ barIndex, barValue, range }) => {
|
457
|
+
chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: barIndex, barValue: barValue, range: range });
|
458
|
+
chartsBarPage.steps.verifyBarIsLockedInCorrectAnswerSection(barIndex);
|
459
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInCorrectAnswerSection(barIndex);
|
460
|
+
},
|
461
|
+
}
|
462
|
+
|
463
|
+
const tests = {
|
464
|
+
...autoScoredScoringPreviewTab.tests,
|
465
|
+
...resetPopupComponent.tests,
|
466
|
+
|
467
|
+
/**
|
468
|
+
* Verify bar tooltip contents with css and a11y in preview tab
|
469
|
+
* @param {number} barIndex index of the bar
|
470
|
+
* @param {string} barBackground rgb value of the bar background
|
471
|
+
* @param {string} barLabel label of the bar
|
472
|
+
*/
|
473
|
+
verifyBarTooltipContentsCSSAndA11yInPreviewTab: (barIndex, barBackground, barLabel) => {
|
474
|
+
it('When user hovers over the bar, then bar tooltip should be displayed', () => {
|
475
|
+
utilities.triggerMouseover(utilities.getNthElement(chartsBarPage.previewTabBar(), barIndex));
|
476
|
+
utilities.verifyElementVisibilityState(chartsBarPage.barAndPointTooltipWrapper(), 'visible');
|
477
|
+
});
|
478
|
+
|
479
|
+
it('The bar tooltip should contain, bar background color block, bar label button, and delete button', () => {
|
480
|
+
utilities.verifyCSS(chartsBarPage.previewTabBarTooltipColorBlock(), {
|
481
|
+
'background-color': barBackground
|
482
|
+
});
|
483
|
+
utilities.verifyInnerText(barAndLineChartComponent.barAndPointTooltipLabelButton(), barLabel);
|
484
|
+
utilities.verifyElementVisibilityState(barAndLineChartComponent.barAndPointTooltipDeleteButton(), 'visible');
|
485
|
+
});
|
486
|
+
|
487
|
+
it('When user hovers on the delete button, then \'Delete bar\' tooltip should be displayed', () => {
|
488
|
+
chartsBarPage.barAndPointTooltipDeleteButton()
|
489
|
+
.verifyTooltip('Delete bar');
|
490
|
+
});
|
491
|
+
|
492
|
+
it('CSS of bar tooltip', { tags: 'css' }, () => {
|
493
|
+
utilities.verifyCSS(barAndLineChartComponent.barAndPointTooltipLabelButton(), {
|
494
|
+
'color': css.color.activeButtons,
|
495
|
+
'font-size': css.fontSize.default,
|
496
|
+
'font-weight': css.fontWeight.bold
|
497
|
+
});
|
498
|
+
barAndLineChartComponent.barAndPointTooltipDeleteButton()
|
499
|
+
.verifyPseudoClassBeforeProperty('color', css.color.deleteIcon);
|
500
|
+
});
|
501
|
+
|
502
|
+
it('Accessibility of Reset dialog box', { tags: 'a11y' }, () => {
|
503
|
+
cy.checkAccessibility(chartsBarPage.barAndPointTooltipWrapper());
|
504
|
+
});
|
505
|
+
|
506
|
+
it('When user hovers away from the bar, then bar tooltip should be not be displayed', () => {
|
507
|
+
utilities.triggerMouseout(utilities.getNthElement(chartsBarPage.previewTabBar(), barIndex));
|
508
|
+
utilities.verifyElementVisibilityState(chartsBarPage.barAndPointTooltipWrapper(), 'notExist');
|
509
|
+
});
|
225
510
|
}
|
226
511
|
}
|
227
512
|
|
228
513
|
export const chartsBarPage = {
|
229
514
|
...selectors,
|
230
|
-
steps
|
515
|
+
steps,
|
516
|
+
tests
|
231
517
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
2
2
|
import { dialogBoxBase } from "../dialogBoxBase";
|
3
3
|
import { commonComponents } from "./commonComponents";
|
4
|
-
import {
|
4
|
+
import { scoringSectionBaseEditTab } from "./scoringSectionBaseEditTab";
|
5
5
|
const css = Cypress.env('css');
|
6
6
|
|
7
7
|
const selectors = {
|
@@ -250,11 +250,11 @@ const tests = {
|
|
250
250
|
*/
|
251
251
|
verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty: (accordionName) => {
|
252
252
|
it(`When the user focuses in and out of the empty points input field, no points error message should be displayed below the points input field and error icon should not be displayed on the \'${accordionName}\' accordion`, () => {
|
253
|
-
|
253
|
+
scoringSectionBaseEditTab.pointsInputField()
|
254
254
|
.focus();
|
255
|
-
|
255
|
+
scoringSectionBaseEditTab.pointsInputField()
|
256
256
|
.blur();
|
257
|
-
utilities.verifyElementVisibilityState(
|
257
|
+
utilities.verifyElementVisibilityState(scoringSectionBaseEditTab.pleaseEnterPointsErrorMessage(), 'notExist')
|
258
258
|
if (accordionName == 'Correct') {
|
259
259
|
autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
|
260
260
|
.within(() => {
|
@@ -346,7 +346,10 @@ const tests = {
|
|
346
346
|
.within(() => {
|
347
347
|
utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
|
348
348
|
});
|
349
|
-
|
349
|
+
scoringSectionBaseEditTab.pointsWrapper()
|
350
|
+
.within(() => {
|
351
|
+
utilities.verifyElementVisibilityState(scoringSectionBaseEditTab.pleaseEnterPointsErrorMessage(), 'notExist');
|
352
|
+
});
|
350
353
|
if (questionType != 'list ordering' && questionType != 'short text response' && questionType != 'text entry math') {
|
351
354
|
steps.verifySpecifyCorrectAnswerErrorMessage();
|
352
355
|
}
|
@@ -74,7 +74,7 @@ const steps = {
|
|
74
74
|
const tests = {
|
75
75
|
verifyAllowStudentsToCheckAnswerLabelAndCheckboxCSS: () => {
|
76
76
|
it('\'Allow student to check answer\' label and checkbox should be displayed and it should be unchecked by default', () => {
|
77
|
-
utilities.verifyInnerText(autoScoredStudentViewSettings.allowStudentToCheckAnswerLabel(), 'Allow
|
77
|
+
utilities.verifyInnerText(autoScoredStudentViewSettings.allowStudentToCheckAnswerLabel(), 'Allow student to check answer');
|
78
78
|
autoScoredStudentViewSettings.steps.verifyAllowStudentsToCheckAnswerCheckboxUnchecked();
|
79
79
|
});
|
80
80
|
|
@@ -4,6 +4,8 @@ const selectors = {
|
|
4
4
|
toolsLabel: () => cy.get('[class*="SelectChartTypestyles__OptionTitle"]'),
|
5
5
|
addBarOrPointOptionButton: () => cy.get('#add .icon-button-custom-format'),
|
6
6
|
addBarOrPointOptionLabel: () => cy.get('.drag-item-label-wrapper'),
|
7
|
+
yAxisCoordinate: () => cy.get('[class*="ChartGridstyle__ValueDiv"]'),
|
8
|
+
yAxisLabel: () => cy.get('[class*="ChartsPreviewstyles__LeftWrapper"] .title-container'),
|
7
9
|
selectChartTypeChartToolsAddBarOrPointButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(0),
|
8
10
|
selectChartTypeChartToolsUndoButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(1),
|
9
11
|
selectChartTypeChartToolsRedoButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(1),
|
@@ -11,14 +13,15 @@ const selectors = {
|
|
11
13
|
selectChartTypeYAxisLabelButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartsPreviewstyles__LeftWrapper"] .title-container'),
|
12
14
|
selectChartTypePoint: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] .ngie-chart-point'),
|
13
15
|
barAndPointTooltipLockUnlockButton: () => cy.get('[class*="ChartTooltipstyles__LockIconWrapper"] button'),
|
14
|
-
barAndPointTooltipDeleteButton: () => cy.get('.charts-tooltip-delete-icon-wrapper button'),
|
15
|
-
barAndPointTooltipLabelButton: () => cy.get('.charts-tooltip-data-label .title-container'),
|
16
|
+
barAndPointTooltipDeleteButton: () => cy.get('.charts-tooltip-delete-icon-wrapper:visible button'),
|
17
|
+
barAndPointTooltipLabelButton: () => cy.get('.charts-tooltip-data-label:visible .title-container'),
|
18
|
+
barAndPointTooltipWrapper: () => cy.get('.charts-tooltip-wrapper'),
|
16
19
|
|
17
20
|
//Specify correct answer section
|
18
21
|
specifyCorrectAnswerToolsAddBarOrPointButton: () => cy.get('.ngie-accordion [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(0),
|
19
22
|
specifyCorrectAnswerToolsUndoButton: () => cy.get('.ngie-accordion [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(1),
|
20
|
-
specifyCorrectAnswerToolsRedoButton: () => cy.get('.ngie-accordion [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(
|
21
|
-
specifyCorrectAnswerToolsResetButton: () => cy.get('.ngie-accordion [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(
|
23
|
+
specifyCorrectAnswerToolsRedoButton: () => cy.get('.ngie-accordion [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(2),
|
24
|
+
specifyCorrectAnswerToolsResetButton: () => cy.get('.ngie-accordion [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(3),
|
22
25
|
|
23
26
|
//Preview tab
|
24
27
|
previewTabToolsAddBarOrPointButton: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartToolsstyles__ChartToolsWrapper"] button').eq(0),
|
@@ -1,8 +1,14 @@
|
|
1
|
+
import utilities from "../../support/helpers/utilities";
|
2
|
+
import { autoScoredScoringPreviewTab } from "./autoScoredScoringPreviewTab";
|
3
|
+
import { correctIncorrectAnswerLabelComponent } from "./correctIncorrectAnswerLabelComponent";
|
4
|
+
|
1
5
|
const selectors = {
|
2
6
|
selectChartTypesTitle: () => cy.get('.options-label'),
|
3
7
|
barToggleButton: () => cy.get('[data-ngie-testid="bar-toggle-button"]'),
|
4
8
|
lineToggleButton: () => cy.get('[data-ngie-testid="line-toggle-button"]'),
|
5
9
|
dotPlotToggleButton: () => cy.get('[data-ngie-testid="dot-plot-toggle-button"]'),
|
10
|
+
graphTitle: () => cy.get('[class*="ChartsPreviewstyles__TopWrapper"] .title-container'),
|
11
|
+
xAxisLabel: () => cy.get('[class*="ChartsPreviewstyles__BottomWrapper"] .title-container'),
|
6
12
|
selectChartTypeGraphTitleButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartsPreviewstyles__TopWrapper"] .title-container'),
|
7
13
|
selectChartTypeXAxisLabelButton: () => cy.get('[class*="Chartsstyles__ChartsQuestionWrapper"] [class*="ChartsPreviewstyles__BottomWrapper"] .title-container'),
|
8
14
|
pointsInputField: () => cy.get('[class*="Chartsstyles__PointsFieldWrapper"] [class*="points-input-field"] input[type="text"]'),
|
@@ -15,8 +21,13 @@ const selectors = {
|
|
15
21
|
graphLabelPopupSaveButton: () => cy.get('.compact-popup-action-button-wrapper button').eq(1),
|
16
22
|
|
17
23
|
//preview tab
|
24
|
+
previewTabTool: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartToolsstyles__ChartToolsWrapper"] button'),
|
25
|
+
previewTabToolBarWrapper: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartToolsstyles__ChartToolsWrapper"]'),
|
26
|
+
previewTabChartWrapper: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible'),
|
18
27
|
previewTabGraphTitle: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartsPreviewstyles__TopWrapper"] .title-container'),
|
19
28
|
previewTabXAxisLabelButton: () => cy.get('[class*="ChartsPreviewstyles__PreviewWrapper"]:visible [class*="ChartsPreviewstyles__BottomWrapper"] .title-container'),
|
29
|
+
tickIconWrapper: () => cy.get('.tick-icon-wrapper svg'),
|
30
|
+
correctAnswersLabel: () => cy.get('[class*="Chartsstyle__CorrectAnswerHeader"]')
|
20
31
|
}
|
21
32
|
|
22
33
|
const steps = {
|
@@ -97,6 +108,28 @@ const steps = {
|
|
97
108
|
chartsCommonComponent.steps.addInputToChartLabelPopupInputField(text);
|
98
109
|
chartsCommonComponent.steps.saveGraphLabelPopup();
|
99
110
|
},
|
111
|
+
|
112
|
+
/**
|
113
|
+
* @param {("correct" | "incorrect")} answerStatus - The status of the answer.
|
114
|
+
* @description Verifies the visibility and content of the correct/incorrect answer label block.
|
115
|
+
* If the answer is correct, it also verifies the visibility of the correct icon;
|
116
|
+
* otherwise, it verifies the visibility of the incorrect icon.
|
117
|
+
*/
|
118
|
+
verifyCorrectIncorrectAnswerLabel: (answerStatus) => {
|
119
|
+
utilities.verifyElementVisibilityState(correctIncorrectAnswerLabelComponent.correctIncorrectAnswerBlock(), 'exist');
|
120
|
+
utilities.verifyInnerText(correctIncorrectAnswerLabelComponent.correctIncorrectStatusMessageText(), `Your answer is${answerStatus}`)
|
121
|
+
if (answerStatus === 'correct') {
|
122
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
123
|
+
} else {
|
124
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'visible');
|
125
|
+
}
|
126
|
+
},
|
127
|
+
|
128
|
+
verifyCorrectAnswerSectionNotExist: () => {
|
129
|
+
chartsCommonComponent.previewTabChartWrapper()
|
130
|
+
.eq(1)
|
131
|
+
.should('not.exist');
|
132
|
+
}
|
100
133
|
}
|
101
134
|
|
102
135
|
export const chartsCommonComponent = {
|