itemengine-cypress-automation 1.0.202 → 1.0.203
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/config-files/ilqa.json +1 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +3 -3
- package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +14 -2
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightBasic.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightBasic.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +356 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +320 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +355 -0
- package/cypress/e2e/ILC/ChartsBar/Scoring/toleranceThresholdScoring.js +141 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/pagination.js +170 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettingsForDropzones.js +170 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/singleSelectionPreviewScoring.js +250 -0
- package/cypress/e2e/ILC/ImageHighlight/singleMultipleSelection.js +99 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/additionalSettings.js +89 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationBorderProperties.js +53 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationGridProperties.js +98 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationLayoutProperties.js +89 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/styleAndLayoutCustomizationBorderProperties.js +54 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/styleAndLayoutCustomizationLayoutProperties.js +90 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/styleAndLayoutCutomizationGridProperties.js +99 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingPenaltyScoring.js +61 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsBasic.js +227 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +380 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +294 -0
- package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +383 -0
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +7 -7
- package/cypress/pages/chartsBarPage.js +1 -4
- package/cypress/pages/chartsDotPlotPage.js +0 -13
- package/cypress/pages/components/additionalSettingsPanel.js +1 -0
- package/cypress/pages/components/ariaLabelSectionComponent.js +1 -1
- package/cypress/pages/components/chartsCommonComponent.js +19 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +1 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +1836 -134
- package/cypress/pages/components/singleMultipleSelectionModeComponent.js +74 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +25 -2
- package/cypress/pages/essayResponsePage.js +9 -1
- package/cypress/pages/feedbackScalePage.js +1 -1
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +111 -30
- package/cypress/pages/matchingPage.js +2 -1
- package/cypress/pages/multipleSelectionGridPage.js +4 -2
- package/cypress/pages/shortTextResponsePage.js +2 -2
- package/cypress/pages/singleSelectionGridPage.js +4 -2
- package/cypress/pages/textEntryMathPage.js +1 -0
- package/cypress/pages/textEntryMathWithImagePage.js +1 -1
- package/cypress/pages/uploadResponsePage.js +1 -3
- package/package.json +1 -1
@@ -0,0 +1,355 @@
|
|
1
|
+
import { chartsBarPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create item page - Charts - Bar: Partial equal weights scoring with alternative answer - When Correct answer points are more than alternative Answer points', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Question Preview: AutoScored - Partial equal weights with alternative answer: When Correct Answer points are more than alternative Answer points', () => {
|
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.addBarOrPointInChartInSelectChartTypeSection();
|
16
|
+
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
17
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 3, range: 10 });
|
18
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 });
|
19
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 3, range: 10 });
|
20
|
+
chartsBarPage.steps.lockBar(1);
|
21
|
+
chartsBarPage.steps.allotPoints(20);
|
22
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 3, range: 10 });
|
23
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 5, range: 10 });
|
24
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 4, range: 10 });
|
25
|
+
chartsBarPage.steps.addAlternativeAnswerAccordion(1);
|
26
|
+
chartsBarPage.steps.allotPoints(10);
|
27
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 4, range: 10 });
|
28
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 4, range: 10 });
|
29
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 4, value: 6, range: 10 });
|
30
|
+
chartsBarPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
31
|
+
//chartsBarPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
32
|
+
chartsBarPage.steps.switchToPreviewTab();
|
33
|
+
});
|
34
|
+
|
35
|
+
it('When the user selects \'Grading\' view without attempting the question, then user should be provided with 0 points, correct icon should be displayed for bar set to correct by default, incorrect icon should be displayed for incorrect graph, the correct accordion answer should be displayed in the correct answer section graph and incorrect status message should be displayed', () => {
|
36
|
+
chartsBarPage.steps.switchToGradingView();
|
37
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
38
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
39
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
40
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
41
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
42
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
43
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
44
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
45
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
46
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
47
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
48
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
49
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
50
|
+
/* cy.log('When the user selects check answer without attempting the question, then correct/incorrect status message should not 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')
|
51
|
+
chartsBarPage.steps.checkAnswer();
|
52
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
53
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
54
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
55
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
56
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
57
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
58
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
59
|
+
});
|
60
|
+
|
61
|
+
it('When the user incorrectly attempts the answer, then the user should be awarded with points for the correctly set bars(in this case only the locked bar) and on switching to grading view, correct/incorrect status message should not be displayed, incorrect icons should be displayed on the incorrect bars and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
62
|
+
chartsBarPage.steps.resetQuestionPreview();
|
63
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 5, range: 10 });
|
64
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 1, range: 10 });
|
65
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 1, range: 10 });
|
66
|
+
chartsBarPage.steps.verifyPreviewScore(4, 20);
|
67
|
+
chartsBarPage.steps.switchToGradingView();
|
68
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
69
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
70
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
71
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
72
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
73
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
74
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
75
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
76
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
77
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
78
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
79
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
80
|
+
/* cy.log('When the user selects check answer after incorrectly attempting the question, then correct/incorrect status message should not be displayed, incorrect icons should be displayed on the incorrectly attempted bars')
|
81
|
+
chartsBarPage.steps.checkAnswer();
|
82
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
83
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
84
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
85
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
86
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
87
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
88
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
89
|
+
});
|
90
|
+
|
91
|
+
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed', () => {
|
92
|
+
chartsBarPage.steps.resetQuestionPreview();
|
93
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
94
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 4, range: 10 });
|
95
|
+
chartsBarPage.steps.verifyPreviewScore(20, 20);
|
96
|
+
chartsBarPage.steps.switchToGradingView();
|
97
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
98
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
99
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
100
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
101
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
102
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
103
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
104
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
105
|
+
/* cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
106
|
+
chartsBarPage.steps.checkAnswer();
|
107
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
108
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
109
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
110
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
111
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
112
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
113
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
114
|
+
});
|
115
|
+
|
116
|
+
it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed', () => {
|
117
|
+
chartsBarPage.steps.resetQuestionPreview();
|
118
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 4, range: 10 });
|
119
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 4, range: 10 });
|
120
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 6, range: 10 });
|
121
|
+
chartsBarPage.steps.verifyPreviewScore(10, 20);
|
122
|
+
chartsBarPage.steps.switchToGradingView();
|
123
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
124
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
125
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
126
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
127
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
128
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
129
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
130
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
131
|
+
/* cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
132
|
+
chartsBarPage.steps.checkAnswer();
|
133
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
134
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
135
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
136
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
137
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
138
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
139
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
140
|
+
});
|
141
|
+
|
142
|
+
|
143
|
+
it('When the user attempts the question with partially correct exclusively from the correct accordion, then the user should be awarded with points for the correctly set bars and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
144
|
+
chartsBarPage.steps.resetQuestionPreview();
|
145
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 1, range: 10 });
|
146
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
147
|
+
chartsBarPage.steps.verifyPreviewScore(12, 20);
|
148
|
+
chartsBarPage.steps.switchToGradingView();
|
149
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
150
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
151
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
152
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
153
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
154
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
155
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
156
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
157
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
158
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
159
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
160
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
161
|
+
/* cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
162
|
+
chartsBarPage.steps.checkAnswer();
|
163
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
164
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
165
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
166
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
167
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
168
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
169
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
170
|
+
});
|
171
|
+
|
172
|
+
it('When the user attempts the question with partially correct exclusively from the alternative accordion, then the user should be awarded with points for the correctly set bars and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
173
|
+
chartsBarPage.steps.resetQuestionPreview();
|
174
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 1, range: 10 });
|
175
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 6, range: 10 });
|
176
|
+
chartsBarPage.steps.verifyPreviewScore(6, 20);
|
177
|
+
chartsBarPage.steps.switchToGradingView();
|
178
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
179
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
180
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
181
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
182
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
183
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
184
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
185
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
186
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
187
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
188
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
189
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
190
|
+
/* cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
191
|
+
chartsBarPage.steps.checkAnswer();
|
192
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
193
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
194
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
195
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
196
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
197
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
198
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
199
|
+
});
|
200
|
+
|
201
|
+
it('When the user attempts the question with more answers from the correct accordion than the alternate accordion, then the user should be awarded with points for the correctly set bars from the correct accordion and on switching to \'Grading\' view, correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
202
|
+
chartsBarPage.steps.resetQuestionPreview();
|
203
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
204
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 6, range: 10 });
|
205
|
+
chartsBarPage.steps.verifyPreviewScore(12, 20);
|
206
|
+
chartsBarPage.steps.switchToGradingView();
|
207
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
208
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
209
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
210
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
211
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
212
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
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: 5, range: 10 });
|
216
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
217
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
218
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
219
|
+
/* cy.log('When the user attempts the question with more answers from the correct accordion than the alternate accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
220
|
+
chartsBarPage.steps.checkAnswer();
|
221
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
222
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
223
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
224
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
225
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
226
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
227
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
228
|
+
});
|
229
|
+
|
230
|
+
it('When the user attempts the question with more answers from the alternate accordion than the correct accordion, then the user should be awarded with points for the correctly set bars from the alternate accordion and on switching to \'Grading\' view, correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
231
|
+
chartsBarPage.steps.resetQuestionPreview();
|
232
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 4, range: 10 });
|
233
|
+
chartsBarPage.steps.verifyPreviewScore(8, 20);
|
234
|
+
chartsBarPage.steps.switchToGradingView();
|
235
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
236
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
237
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
238
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
239
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
240
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
241
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
242
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
243
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
244
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
245
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
246
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
247
|
+
/* cy.log('When the user attempts the question with more answers from the alternate accordion than the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed on the alternate accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
248
|
+
chartsBarPage.steps.checkAnswer();
|
249
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
250
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
251
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
252
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
253
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
254
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
255
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
256
|
+
});
|
257
|
+
|
258
|
+
it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with points for the correctly set bars and on switching to \'Grading\' view, correct icon should be displayed besides response field with correct answer responses, incorrect icon should be displayed beside responses from the alternative tab, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
259
|
+
chartsBarPage.steps.resetQuestionPreview();
|
260
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 1, range: 10 });
|
261
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
262
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 6, range: 10 });
|
263
|
+
chartsBarPage.steps.verifyPreviewScore(8, 20);
|
264
|
+
chartsBarPage.steps.switchToGradingView();
|
265
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
266
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
267
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
268
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
269
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
270
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
271
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
272
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
273
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
274
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
275
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
276
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
277
|
+
/* cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
278
|
+
chartsBarPage.steps.checkAnswer();
|
279
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
280
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
281
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
282
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
283
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
284
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
285
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
286
|
+
});
|
287
|
+
|
288
|
+
it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with points for the correctly set bars from the correct accordion and on switching to \'Grading\' view, correct icon should be besides the common response, incorrect icons should be displayed on the incorrect bars, correct/incorrect status message should not be displayed and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
289
|
+
chartsBarPage.steps.resetQuestionPreview();
|
290
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 1, range: 10 });
|
291
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 1, range: 10 });
|
292
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 4, range: 10 });
|
293
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 1, range: 10 });
|
294
|
+
chartsBarPage.steps.verifyPreviewScore(8, 20);
|
295
|
+
chartsBarPage.steps.switchToGradingView();
|
296
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
297
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
298
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
299
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
300
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
301
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
302
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
303
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
304
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
305
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
306
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
307
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
308
|
+
/* cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icons should be displayed on the incorrect bars, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
309
|
+
chartsBarPage.steps.checkAnswer();
|
310
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
311
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
312
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
313
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
314
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
315
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
316
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
317
|
+
});
|
318
|
+
|
319
|
+
it('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response from the correct accordion overpowers the combined score of the alternative accordion answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect status message should not be displayed and correct answer section with a preview of the entire grid with correct answers from the correct accordion should be displayed', () => {
|
320
|
+
cy.log('Pre-step: Switching to Edit tab and allotting points to correct and alternative accordion such that the difference between the points is substantial')
|
321
|
+
chartsBarPage.steps.switchToEditTab();
|
322
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 8, range: 10 });
|
323
|
+
chartsBarPage.steps.allotPoints(10);
|
324
|
+
chartsBarPage.steps.expandCorrectAnswerAccordion();
|
325
|
+
chartsBarPage.steps.allotPoints(50);
|
326
|
+
chartsBarPage.steps.switchToPreviewTab();
|
327
|
+
|
328
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 8, range: 10 });
|
329
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 6, range: 10 });
|
330
|
+
chartsBarPage.steps.verifyPreviewScore(12.5, 50);
|
331
|
+
chartsBarPage.steps.switchToGradingView();
|
332
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
333
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
334
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
335
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
336
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
337
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
338
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
339
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 10 });
|
340
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 4, range: 10 });
|
341
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
342
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
343
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
344
|
+
/* cy.log('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion and clicks on \'Check answer\' button, correct icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect status message and correct answer section should not be displayed')
|
345
|
+
chartsBarPage.steps.checkAnswer();
|
346
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
347
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
348
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
349
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
350
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
351
|
+
chartsBarPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
352
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist(); */
|
353
|
+
});
|
354
|
+
});
|
355
|
+
});
|
@@ -0,0 +1,141 @@
|
|
1
|
+
import { chartsBarPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create item page - Charts - Bar : All or nothing with Tolerance/Threshold', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Tolerance/Threshold - scoring', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
chartsBarPage.steps.navigateToCreateQuestion('charts');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
15
|
+
chartsBarPage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
16
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 0, value: 3, range: 10 });
|
17
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 1, value: 2, range: 10 });
|
18
|
+
chartsBarPage.steps.setBarValueInSelectChartTypeSection({ barIndex: 3, value: 3, range: 10 });
|
19
|
+
chartsBarPage.steps.lockBar(1);
|
20
|
+
chartsBarPage.steps.allotPoints(20);
|
21
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 0, value: 3, range: 10 });
|
22
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 2, value: 6, range: 10 });
|
23
|
+
chartsBarPage.steps.setBarValueInSpecifyCorrectAnswerSection({ barIndex: 3, value: 5, range: 10 });
|
24
|
+
chartsBarPage.steps.setToleranceThresholdValue(1);
|
25
|
+
});
|
26
|
+
|
27
|
+
it('When the user selects \'Grading\' view without attempting the question,the correct answer should be displayed in the correct answer section graph and your answer is incorrect status message should be displayed', () => {
|
28
|
+
chartsBarPage.steps.switchToPreviewTab();
|
29
|
+
chartsBarPage.steps.switchToGradingView();
|
30
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
31
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
32
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
33
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
34
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
35
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
36
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
37
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
|
38
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
|
39
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
40
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
41
|
+
});
|
42
|
+
|
43
|
+
it('When user attempt question by setting the bar value as per tolerance value, then user should be awarded full points in preview tab and switching to grading view, correct bar should have correct icons, and status message \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
44
|
+
chartsBarPage.steps.resetQuestionPreview();
|
45
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 2, range: 10 });
|
46
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
47
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 6, range: 10 });
|
48
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 1, range: 10 });
|
49
|
+
chartsBarPage.steps.verifyPreviewScore(20, 20);
|
50
|
+
chartsBarPage.steps.switchToGradingView();
|
51
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
52
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
53
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
54
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
55
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
56
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
57
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
58
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
59
|
+
});
|
60
|
+
|
61
|
+
it('When user attempt question partially correct by setting some bars as per tolerance value, some by setting incorrect value, then user should be awarded 0 points in preview tab and switching to grading view, correct bars should have correct icons, incorrect bars should have incorrect icons and status message \'Your answer is incorrect\' should be displayed and correct answer section should be displayed', () => {
|
62
|
+
chartsBarPage.steps.resetQuestionPreview();
|
63
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 2, range: 10 });
|
64
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 5, range: 10 });
|
65
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 2, range: 10 });
|
66
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 3, range: 10 });
|
67
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
68
|
+
chartsBarPage.steps.switchToGradingView();
|
69
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
70
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
71
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
72
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
73
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
74
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
75
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
76
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
77
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
|
78
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
|
79
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
80
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
81
|
+
});
|
82
|
+
|
83
|
+
it('When the user attempts the question incorrectly by setting bar value outside the tolerance range, then user should be awarded 0 points in preview tab and switching to grading view, incorrect bars should have incorrect icons and status message \'Your answer is incorrect\' should be displayed and correct answer section should be displayed', () => {
|
84
|
+
chartsBarPage.steps.resetQuestionPreview();
|
85
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 1, range: 10 });
|
86
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 4, range: 10 });
|
87
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 7, range: 10 });
|
88
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 2, range: 10 });
|
89
|
+
chartsBarPage.steps.verifyPreviewScore(0, 20);
|
90
|
+
chartsBarPage.steps.switchToGradingView();
|
91
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
92
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
93
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
94
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
95
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
96
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
97
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 0, barValue: 3, range: 10 });
|
98
|
+
chartsBarPage.steps.verifyLockedBarInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 10 });
|
99
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 2, barValue: 6, range: 10 });
|
100
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 3, barValue: 5, range: 10 });
|
101
|
+
chartsBarPage.steps.verifyBarInCorrectAnswerSection({ barIndex: 4, barValue: 0, range: 10 });
|
102
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
103
|
+
});
|
104
|
+
|
105
|
+
it('When the user attempts the question correctly by setting bar value as per specify correct answer section, then user should be awarded full points in preview tab and switching to grading view, correct bars should have correct icons and status message \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
106
|
+
chartsBarPage.steps.resetQuestionPreview();
|
107
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 6, range: 10 });
|
108
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 5, range: 10 });
|
109
|
+
chartsBarPage.steps.verifyPreviewScore(20, 20);
|
110
|
+
chartsBarPage.steps.switchToGradingView();
|
111
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
112
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
113
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
114
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
115
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
116
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
117
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
118
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
119
|
+
});
|
120
|
+
|
121
|
+
it('When the user updates the tolerance/threshold value in edit tab then tolerance value should get updated in preview tab and when user attempts the question correctly by setting bar value as per tolerance range, then user should be awarded full points in preview tab and switching to grading view, correct bars should have correct icon and status message \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
122
|
+
chartsBarPage.steps.switchToEditTab();
|
123
|
+
chartsBarPage.steps.setToleranceThresholdValue(2);
|
124
|
+
chartsBarPage.steps.switchToPreviewTab();
|
125
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 0, value: 1, range: 10 });
|
126
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 2, value: 4, range: 10 });
|
127
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 3, value: 7, range: 10 });
|
128
|
+
chartsBarPage.steps.setBarValueInPreviewTab({ barIndex: 4, value: 2, range: 10 });
|
129
|
+
chartsBarPage.steps.verifyPreviewScore(20, 20);
|
130
|
+
chartsBarPage.steps.switchToGradingView();
|
131
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(0, 'correct');
|
132
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconNotExistsInPreviewTab(1);
|
133
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(2, 'correct');
|
134
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(3, 'correct');
|
135
|
+
chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
|
136
|
+
chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
137
|
+
chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
|
138
|
+
chartsBarPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
139
|
+
});
|
140
|
+
});
|
141
|
+
});
|