itemengine-cypress-automation 1.0.204 → 1.0.205
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/audioOverviewAndTranscript.js +2 -2
- package/cypress/e2e/ILC/ChartsBar/Scoring/addAndDeleteBarAllOrNothingScoring.js +302 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/manuallyAndNonScored.js +282 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +385 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +386 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +386 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +337 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -1
- package/cypress/e2e/ILC/ChartsBar/chartFunctionalitySpecifyCorrectAnswerSection.js +258 -0
- package/cypress/e2e/ILC/ChartsBar/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/gridSettings.js +439 -0
- package/cypress/e2e/ILC/ChartsBar/headerSection.js +105 -0
- package/cypress/e2e/ILC/ChartsBar/labelOptionsSection.js +450 -0
- package/cypress/e2e/ILC/ChartsBar/specifyCorrectAnswerSection.js +91 -0
- package/cypress/e2e/ILC/ChartsBar/toolSettings.js +73 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/manuallyAndNonScoredScoring.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +3 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneMinimumAndPenaltyScoring.js +6 -6
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +169 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDraggableOptionsPanel.js +119 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDropzoneBorderStyleProperties.js +113 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDropzoneProperties.js +251 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationLayoutProperties.js +277 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +0 -2
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +1 -5
- package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +14 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/styleAndLayoutCutomization.js +378 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +479 -0
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +3 -1
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsCellShadeCountBasics.js +7 -7
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingPenaltyScoring.js +1 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +1 -0
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -3
- package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +7 -7
- package/cypress/e2e/ILC/ListOrderingDropdown/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +3 -4
- package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +10 -9
- package/cypress/e2e/ILC/Matching/toolSettings.js +1 -0
- package/cypress/e2e/ILC/MultipleSelection/additionalSettings.js +1 -0
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +36 -16
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +326 -176
- package/cypress/e2e/ILC/MultipleSelection/blockCreateItem.js +2 -2
- package/cypress/e2e/ILC/MultipleSelection/manuallyAndNonScoredScoring.js +37 -15
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsBasic.js +38 -17
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +441 -186
- package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsBasic.js +33 -14
- package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +330 -164
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/manuallyAndNonScoredScoring.js +4 -4
- package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +20 -7
- package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +83 -66
- package/cypress/e2e/ILC/SingleSelection/blockCreateItem.js +2 -2
- package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +25 -17
- package/cypress/e2e/ILC/SingleSelection/trueOrFalseCreateItem.js +2 -2
- package/cypress/e2e/ILC/SingleSelectionGridNew/additionalSettings.js +89 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +3 -3
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +2 -2
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +2 -2
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -2
- package/cypress/e2e/ILC/VideoResponseNew/studentViewSettingsCompactRecorderStyle.js +0 -2
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingPenaltyScoring.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsBasic.js +15 -15
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +21 -21
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +17 -17
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +21 -21
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/toleranceThresholdScoring.js +1 -1
- package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +8 -4
- package/cypress/e2e/ILC/chartsDotsPlot/toolSettings.js +0 -1
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/pages/audioResponsePage.js +1 -1
- package/cypress/pages/chartsBarPage.js +785 -5
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/barAndLineChartComponent.js +180 -9
- package/cypress/pages/components/chartsCommonComponent.js +1 -0
- package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +77 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +2 -3
- package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +1 -1
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +24 -7
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +8 -4
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/pages/components/imageCanvasComponent.js +112 -2
- package/cypress/pages/components/index.js +1 -0
- package/cypress/pages/components/layoutSectionComponent.js +4 -3
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +960 -3
- package/cypress/pages/drawingResponsePage.js +2 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +4 -3
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +18 -3
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +65 -3
- package/cypress/pages/listOrderingPage.js +3 -3
- package/cypress/pages/multipleSelectionPage.js +77 -25
- package/cypress/pages/rulerPage.js +5 -0
- package/cypress/pages/singleSelectionPage.js +40 -1
- package/cypress/pages/videoResponsePage.js +1 -1
- package/package.json +1 -1
@@ -291,8 +291,8 @@ describe('Audio player: Audio overview and Transcript section', () => {
|
|
291
291
|
utilities.verifyInnerText(audioPlayerPage.dialogBoxTitle(), 'Delete');
|
292
292
|
});
|
293
293
|
|
294
|
-
it('The pop up should be displayed with the message \'Are you sure you want to delete the transcript?\'', () => {
|
295
|
-
utilities.verifyInnerText(audioPlayerPage.dialogBoxContent(), 'Are you sure you want to delete the transcript?');
|
294
|
+
it('The pop up should be displayed with the message \'Are you sure you want to delete the transcript file?\'', () => {
|
295
|
+
utilities.verifyInnerText(audioPlayerPage.dialogBoxContent(), 'Are you sure you want to delete the transcript file?');
|
296
296
|
utilities.verifyInnerText(audioPlayerPage.buttonAccept(), 'Delete transcript');
|
297
297
|
utilities.verifyInnerText(audioPlayerPage.buttonReject(), 'Cancel');
|
298
298
|
});
|
@@ -0,0 +1,302 @@
|
|
1
|
+
import { chartsBarPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create item page - Charts - Bar: Add and Delete bar All or nothing scoring', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Charts - Bar: Add bar All or nothing scoring', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
chartsBarPage.steps.navigateToCreateQuestion('charts');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
|
15
|
+
chartsBarPage.steps.selectAddBarOrPointToolbarOption();
|
16
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 1, range: 10 });
|
17
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 });
|
18
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 3, range: 10 });
|
19
|
+
chartsBarPage.steps.allotPoints(20);
|
20
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 3, range: 10 });
|
21
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 1, value: 6, range: 10 });
|
22
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 5, range: 10 });
|
23
|
+
chartsBarPage.steps.addBarOrPointInChartInSpecifyCorrectAnswerSection();
|
24
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 2, range: 10 });
|
25
|
+
chartsBarPage.steps.switchToPreviewTab();
|
26
|
+
});
|
27
|
+
|
28
|
+
it('When the user selects \'Grading\' view without attempting the question, then user should be provided with 0 points, incorrect icon should be displayed for incorrect graph, the correct answer should be displayed in the correct answer section graph and your answer is incorrect status message should be displayed', () => {
|
29
|
+
chartsBarPage.steps.switchToGradingView();
|
30
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
31
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
32
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'incorrect');
|
33
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
34
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
35
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
36
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
37
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
38
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 2, range: 10 });
|
39
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
40
|
+
});
|
41
|
+
|
42
|
+
// Fully incorrect case
|
43
|
+
it('When the user attempts the default available bars incorrectly, then the user should be 0 awarded points and on switching to grading view, your answer is incorrect status message should be displayed, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
|
44
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 2, range: 10 });
|
45
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 3, range: 10 });
|
46
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
47
|
+
chartsBarPage.steps.switchToGradingView();
|
48
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
49
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'incorrect');
|
50
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
51
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
52
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
53
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
54
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
55
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 2, range: 10 });
|
56
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
57
|
+
});
|
58
|
+
|
59
|
+
it('When the user attempts the question incorrectly by adding a new bar and incorrectly attempting all bars, then the user should be awarded with 0 points and on switching to grading view your answer is incorrect status message should be displayed, correct icons should be displayed on the correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars and correct answer section should be displayed with the correct answers', () => {
|
60
|
+
chartsBarPage.steps.resetQuestionPreview();
|
61
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 4, range: 10 });
|
62
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 4, range: 10 });
|
63
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 4, range: 10 });
|
64
|
+
chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
|
65
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 4, range: 10 });
|
66
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
67
|
+
chartsBarPage.steps.switchToGradingView();
|
68
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
69
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'incorrect');
|
70
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
71
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
72
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
73
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
74
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
75
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
76
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 2, range: 10 });
|
77
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
78
|
+
});
|
79
|
+
|
80
|
+
// Partially correct cases
|
81
|
+
it('When the user attempts the question partially correct with incorrect answer without adding any bar, then the user should be awarded with 0 points and on switching to grading view your answer is incorrect status message should be displayed, correct icons should be displayed for correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars and correct answer section should be displayed with the correct answers', () => {
|
82
|
+
chartsBarPage.steps.resetQuestionPreview()
|
83
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
|
84
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 2, range: 10 });
|
85
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
86
|
+
chartsBarPage.steps.switchToGradingView();
|
87
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
88
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'incorrect');
|
89
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
90
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
91
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
92
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
93
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
94
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 2, range: 10 });
|
95
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
96
|
+
});
|
97
|
+
|
98
|
+
it('When the user attempts the question partially correct by correctly setting all the default available bars, then the user should be awarded with 0 points and on switching to grading view your answer is incorrect status message should be displayed, correct icons should be displayed on the correctly attempted/set bars, and correct answer section should be displayed with the correct answers', () => {
|
99
|
+
chartsBarPage.steps.resetQuestionPreview()
|
100
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
|
101
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 6, range: 10 });
|
102
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
103
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
104
|
+
chartsBarPage.steps.switchToGradingView();
|
105
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
106
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'correct');
|
107
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
108
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
109
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
110
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
111
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
112
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 2, range: 10 });
|
113
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
114
|
+
});
|
115
|
+
|
116
|
+
it('When the user attempts the question partially correct by correctly setting all the default available bars and adding a new bar but keeping it zero, then the user should be awarded with 0 points and on switching to grading view your answer is incorrect status message should be displayed, correct icons should be displayed on the correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars and correct answer section should be displayed with the correct answers', () => {
|
117
|
+
chartsBarPage.steps.resetQuestionPreview();
|
118
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
|
119
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 6, range: 10 });
|
120
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
121
|
+
chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
|
122
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
123
|
+
chartsBarPage.steps.switchToGradingView();
|
124
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
125
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'correct');
|
126
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
127
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
128
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
129
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
130
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
131
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
132
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 2, range: 10 });
|
133
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
134
|
+
});
|
135
|
+
|
136
|
+
it('When the user attempts the question partially correct by correctly setting all the default available bars and adding a new bar but attempting it incorrectly, then the user should be awarded with 0 points and on switching to grading view your answer is incorrect status message should be displayed, correct icons should be displayed on the correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars and correct answer section should be displayed with the correct answers', () => {
|
137
|
+
chartsBarPage.steps.resetQuestionPreview()
|
138
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
|
139
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 6, range: 10 });
|
140
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
141
|
+
chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
|
142
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 4, range: 10 });
|
143
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
144
|
+
chartsBarPage.steps.switchToGradingView();
|
145
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
146
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'correct');
|
147
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
148
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
149
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
150
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
151
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
152
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
153
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 2, range: 10 });
|
154
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
155
|
+
});
|
156
|
+
|
157
|
+
// Fully correct
|
158
|
+
it('When the user attempts the question correctly then the user should be awarded with full points and on switching to grading view \'Your answer is correct\' should be displayed, correct icons should be displayed on the correctly attempted/set bars and the correct answer section graph should not be displayed', () => {
|
159
|
+
chartsBarPage.steps.resetQuestionPreview();
|
160
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
|
161
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 6, range: 10 });
|
162
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
163
|
+
chartsBarPage.steps.addBarOrPointInChartInPreviewTab();
|
164
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 2, range: 10 });
|
165
|
+
chartsBarPage.steps.verifyPreviewScore(20, 20);
|
166
|
+
chartsBarPage.steps.switchToGradingView();
|
167
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
168
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'correct');
|
169
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
170
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
171
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
172
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
173
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
174
|
+
});
|
175
|
+
});
|
176
|
+
|
177
|
+
describe('Charts - Bar: Delete bar All or nothing scoring', () => {
|
178
|
+
abortEarlySetup();
|
179
|
+
before(() => {
|
180
|
+
chartsBarPage.steps.navigateToCreateQuestion('charts');
|
181
|
+
cy.barsPreLoaderWait();
|
182
|
+
chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
|
183
|
+
chartsBarPage.steps.selectAddBarOrPointToolbarOption();
|
184
|
+
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
185
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 1, range: 10 });
|
186
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 });
|
187
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 2, value: 3, range: 10 });
|
188
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 4, range: 10 });
|
189
|
+
chartsBarPage.steps.allotPoints(20);
|
190
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 3, range: 10 });
|
191
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 1, value: 6, range: 10 });
|
192
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 5, range: 10 });
|
193
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 1, range: 10 });
|
194
|
+
chartsBarPage.steps.deleteBarInSpecifyCorrectAnswerSection(3);
|
195
|
+
chartsBarPage.steps.switchToPreviewTab();
|
196
|
+
});
|
197
|
+
|
198
|
+
it('When the user selects \'Grading\' view without attempting the question, then user should be provided with 0 points, incorrect icon should be displayed for incorrect graph, the correct answer should be displayed in the correct answer section graph and your answer is incorrect status message should be displayed', () => {
|
199
|
+
chartsBarPage.steps.switchToGradingView();
|
200
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
201
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
202
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'incorrect');
|
203
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
204
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
205
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
206
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
207
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
208
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
209
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
210
|
+
});
|
211
|
+
|
212
|
+
// Fully incorrect case
|
213
|
+
it('When the user attempts the default available bars incorrectly, then the user should be 0 awarded points and on switching to grading view, your answer is incorrect status message should be displayed, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
|
214
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 4, range: 10 });
|
215
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 4, range: 10 });
|
216
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 4, range: 10 });
|
217
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 4, range: 10 });
|
218
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
219
|
+
chartsBarPage.steps.switchToGradingView();
|
220
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
221
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'incorrect');
|
222
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
223
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
224
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
225
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
226
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
227
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
228
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
229
|
+
});
|
230
|
+
|
231
|
+
it('When the user attempts the question incorrectly by deleting bar and incorrectly attempting all remaining bars, then the user should be awarded with 0 points and on switching to grading view your answer is incorrect status message should be displayed, correct icons should be displayed on the correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars and correct answer section should be displayed with the correct answers', () => {
|
232
|
+
chartsBarPage.steps.resetQuestionPreview();
|
233
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 4, range: 10 });
|
234
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 4, range: 10 });
|
235
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 4, range: 10 });
|
236
|
+
chartsBarPage.steps.deleteBarInPreviewTab(3);
|
237
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
238
|
+
chartsBarPage.steps.switchToGradingView();
|
239
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
240
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'incorrect');
|
241
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
242
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
243
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
244
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
245
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
246
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
247
|
+
});
|
248
|
+
|
249
|
+
// Partially correct cases
|
250
|
+
it('When the user attempts the question partially correct with incorrect answer without deleting any bar, then the user should be awarded with 0 points and on switching to grading view your answer is incorrect status message should be displayed, correct icons should be displayed for correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars and correct answer section should be displayed with the correct answers', () => {
|
251
|
+
chartsBarPage.steps.resetQuestionPreview()
|
252
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
|
253
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 2, range: 10 });
|
254
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
255
|
+
chartsBarPage.steps.switchToGradingView();
|
256
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
257
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'incorrect');
|
258
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
259
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
260
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
261
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
262
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
263
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
264
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
265
|
+
});
|
266
|
+
|
267
|
+
it('When the user attempts the question partially correct by correctly setting all the required bars except the one to be deleted, then the user should be awarded with 0 points and on switching to grading view your answer is incorrect status message should be displayed, correct icons should be displayed on the correctly attempted/set bars, and correct answer section should be displayed with the correct answers', () => {
|
268
|
+
chartsBarPage.steps.resetQuestionPreview()
|
269
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
|
270
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 6, range: 10 });
|
271
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
272
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
273
|
+
chartsBarPage.steps.switchToGradingView();
|
274
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
275
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'correct');
|
276
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
277
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
278
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
279
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
280
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 1, barValue: 6, range: 10 });
|
281
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
282
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
283
|
+
});
|
284
|
+
|
285
|
+
// Fully correct
|
286
|
+
it('When the user attempts the question correctly then the user should be awarded with full points and on switching to grading view \'Your answer is correct\' should be displayed, correct icons should be displayed on the correctly attempted/set bars and the correct answer section graph should not be displayed', () => {
|
287
|
+
chartsBarPage.steps.resetQuestionPreview();
|
288
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 3, range: 10 });
|
289
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 1, value: 6, range: 10 });
|
290
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
291
|
+
chartsBarPage.steps.deleteBarInPreviewTab(3);
|
292
|
+
chartsBarPage.steps.verifyPreviewScore(20, 20);
|
293
|
+
chartsBarPage.steps.switchToGradingView();
|
294
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
295
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(1, 'correct');
|
296
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
297
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
298
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
299
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
300
|
+
});
|
301
|
+
});
|
302
|
+
});
|
@@ -0,0 +1,282 @@
|
|
1
|
+
import { chartsBarPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const options = ['sprout', 'plant', 'flower', 'seed'];
|
5
|
+
const correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
6
|
+
|
7
|
+
describe('Create Item page - Charts - Bar: Manually and non scored', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Question Preview: Manually Scored', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
chartsBarPage.steps.navigateToCreateQuestion('charts');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
|
18
|
+
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
19
|
+
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
20
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 3, range: 10 });
|
21
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 });
|
22
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 3, range: 10 });
|
23
|
+
chartsBarPage.steps.lockBar(1);
|
24
|
+
chartsBarPage.steps.allotPoints(20);
|
25
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 3, range: 10 });
|
26
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 6, range: 10 });
|
27
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 5, range: 10 });
|
28
|
+
chartsBarPage.steps.expandScoringTypeDropdown();
|
29
|
+
chartsBarPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
30
|
+
chartsBarPage.steps.switchToPreviewTab();
|
31
|
+
});
|
32
|
+
|
33
|
+
it('Question instructions and default bar chart should be displayed in the preview tab', () => {
|
34
|
+
chartsBarPage.steps.verifyQuestionInstructionsTextPreviewTab('Set the bar on the chart for the profits of the years');
|
35
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 3, range: 10 });
|
36
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 10 });
|
37
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 0, range: 10 });
|
38
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 3, barValue: 3, range: 10 });
|
39
|
+
chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 4, barValue: 0, range: 10 });
|
40
|
+
});
|
41
|
+
|
42
|
+
chartsBarPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Manually scored');
|
43
|
+
});
|
44
|
+
|
45
|
+
describe('Question Preview: Non Scored', () => {
|
46
|
+
abortEarlySetup();
|
47
|
+
before(() => {
|
48
|
+
chartsBarPage.steps.navigateToCreateQuestion('charts');
|
49
|
+
cy.barsPreLoaderWait();
|
50
|
+
chartsBarPage.steps.addTextInQuestionInstructionsInputField('Set the bar on the chart for the profits of the years');
|
51
|
+
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
52
|
+
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
53
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 3, range: 10 });
|
54
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 });
|
55
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 3, range: 10 });
|
56
|
+
chartsBarPage.steps.lockBar(1);
|
57
|
+
chartsBarPage.steps.allotPoints(20);
|
58
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 3, range: 10 });
|
59
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 6, range: 10 });
|
60
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 5, range: 10 });
|
61
|
+
chartsBarPage.steps.expandScoringTypeDropdown();
|
62
|
+
chartsBarPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
63
|
+
// chartsBarPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
64
|
+
chartsBarPage.steps.switchToPreviewTab();
|
65
|
+
});
|
66
|
+
|
67
|
+
chartsBarPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Non scored');
|
68
|
+
|
69
|
+
it('When the user selects \'Grading\' view without attempting the question, correct icon should be displayed for bar set to correct by default, incorrect icon should be displayed for incorrect graph, the correct answer should be displayed in the correct answer section graph and correct/incorrect status message should be displayed', () => {
|
70
|
+
chartsBarPage.steps.switchToGradingView();
|
71
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
72
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
73
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
74
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
75
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
76
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
77
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
78
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
|
79
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
|
80
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
81
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
82
|
+
/* cy.log('When the user selects check answer without attempting the question, then correct/incorrect status message should be displayed, incorrect icons should be displayed on the unattempted bars and correct icons should be displayed on the bar which is correct by default')
|
83
|
+
chartsBarPage.steps.checkAnswer();
|
84
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
85
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
86
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
87
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
88
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
89
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
90
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
91
|
+
});
|
92
|
+
|
93
|
+
// Fully incorrect case
|
94
|
+
it('When the user incorrectly sets a bar which was correct by default then on switching to grading view, correct/incorrect status message should be displayed, incorrect icons should be displayed on the incorrectly attempted bars and correct answer section should be displayed with the correct answers', () => {
|
95
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 5, range: 10 });
|
96
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 2, range: 10 });
|
97
|
+
chartsBarPage.steps.switchToGradingView();
|
98
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
99
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
100
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
101
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
102
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
103
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
104
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
105
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
106
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
|
107
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
|
108
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
109
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
110
|
+
/* cy.log('When the user selects check answer after incorrectly attempting the question, then correct/incorrect status message should be displayed, incorrect icons should be displayed on the incorrectly attempted bars')
|
111
|
+
chartsBarPage.steps.checkAnswer();
|
112
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
113
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
114
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
115
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
116
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
117
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
118
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
119
|
+
});
|
120
|
+
|
121
|
+
// Partially correct cases
|
122
|
+
it('When the user incorrectly sets a bar which was set to 0 and correct by default, and on switching to grading view correct/incorrect status message should be displayed, correct icons should be displayed for correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars and correct answer section should be displayed with the correct answers', () => {
|
123
|
+
chartsBarPage.steps.resetQuestionPreview()
|
124
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 5, range: 10 });
|
125
|
+
chartsBarPage.steps.switchToGradingView();
|
126
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
127
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
128
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
129
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
130
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
131
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
132
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
133
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
134
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
|
135
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
|
136
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
137
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
138
|
+
/* cy.log('When the user selects check answer without attempting the question, then correct/incorrect status message should be displayed, correct icons should be displayed for correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars')
|
139
|
+
chartsBarPage.steps.checkAnswer();
|
140
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
141
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
142
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
143
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
144
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
145
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
146
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
147
|
+
});
|
148
|
+
|
149
|
+
it('When the user attempts the question partially correct by incorrectly setting a bar which was incorrect by default, and on switching to grading view correct/incorrect status message should be displayed, correct icons should be displayed on the correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars and correct answer section should be displayed with the correct answers', () => {
|
150
|
+
chartsBarPage.steps.resetQuestionPreview()
|
151
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 2, range: 10 });
|
152
|
+
chartsBarPage.steps.switchToGradingView();
|
153
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
154
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
155
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
156
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
157
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
158
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
159
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
160
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
161
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
|
162
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
|
163
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
164
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
165
|
+
/* cy.log('When the user selects check answer without attempting the question, then correct/incorrect status message should be displayed, correct icons should be displayed for correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars')
|
166
|
+
chartsBarPage.steps.checkAnswer();
|
167
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
168
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
169
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
170
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
171
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
172
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
173
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
174
|
+
});
|
175
|
+
|
176
|
+
it('When the user attempts the question partially correct by incorrectly setting a bar to zero which was incorrect by default, and on switching to grading view correct/incorrect status message should be displayed, correct icons should be displayed on the correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars and correct answer section should be displayed with the correct answers', () => {
|
177
|
+
chartsBarPage.steps.resetQuestionPreview()
|
178
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 0, range: 10 });
|
179
|
+
chartsBarPage.steps.switchToGradingView();
|
180
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
181
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
182
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
183
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
184
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
185
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
186
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
187
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
188
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
|
189
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
|
190
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
191
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
192
|
+
/* cy.log('When the user selects check answer without attempting the question, then correct/incorrect status message should be displayed, correct icons should be displayed for correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars')
|
193
|
+
chartsBarPage.steps.checkAnswer();
|
194
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
195
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
196
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
197
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
198
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
199
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
200
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
201
|
+
});
|
202
|
+
|
203
|
+
it('When the user attempts the question partially correct by incorrectly setting a bar which was set to zero by default, and on switching to grading view correct/incorrect status message should be displayed, correct icons should be displayed on the correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars and correct answer section should be displayed with the correct answers', () => {
|
204
|
+
chartsBarPage.steps.resetQuestionPreview()
|
205
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 9, range: 10 });
|
206
|
+
chartsBarPage.steps.switchToGradingView();
|
207
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
208
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
209
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
210
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
211
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
212
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
213
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
214
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
215
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
|
216
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
|
217
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
218
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
219
|
+
/* cy.log('When the user selects check answer without attempting the question, then correct/incorrect status message should be displayed, correct icons should be displayed for correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars')
|
220
|
+
chartsBarPage.steps.checkAnswer();
|
221
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
222
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
223
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
224
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
225
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
226
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
227
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
228
|
+
});
|
229
|
+
|
230
|
+
it('When the user attempts the question partially correct by setting all bars correctly except 1 and on switching to grading view correct/incorrect status message should be displayed, correct icons should be displayed on the correctly attempted/set bars and incorrect icons should be displayed on the incorrectly attempted/set bars and correct answer section should be displayed with the correct answers', () => {
|
231
|
+
chartsBarPage.steps.resetQuestionPreview()
|
232
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 5, range: 10 });
|
233
|
+
chartsBarPage.steps.switchToGradingView();
|
234
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
235
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
236
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
237
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
238
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
239
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
240
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
241
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
242
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
|
243
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
|
244
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
245
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
246
|
+
/* cy.log('When the user selects check answer without attempting the question, then correct/incorrect status message should be displayed, correct icons should be displayed for correctly attempted/set bars, incorrect icons should be displayed on the incorrectly attempted/set bars')
|
247
|
+
chartsBarPage.steps.checkAnswer();
|
248
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
249
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
250
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
251
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
252
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
253
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
254
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
255
|
+
});
|
256
|
+
|
257
|
+
// Fully correct
|
258
|
+
it('When the user attempts the question correctly and on switching to grading view \'Your answer is correct\' should be displayed, correct icons should be displayed on the correctly attempted/set bars and the correct answer section graph should not be displayed', () => {
|
259
|
+
chartsBarPage.steps.resetQuestionPreview()
|
260
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 6, range: 10 });
|
261
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 5, range: 10 });
|
262
|
+
chartsBarPage.steps.switchToGradingView();
|
263
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
264
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
265
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
266
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
267
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
268
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
269
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
270
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
271
|
+
/* cy.log('When the user selects check answer without attempting the question, then correct/incorrect status message should be displayed, correct icons should be displayed for correctly attempted/set bars')
|
272
|
+
chartsBarPage.steps.checkAnswer();
|
273
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
274
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
275
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
276
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
277
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
278
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
279
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
280
|
+
});
|
281
|
+
});
|
282
|
+
});
|