itemengine-cypress-automation 1.0.247-06SeptUpdates-b1623d7.0 → 1.0.247
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +349 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +348 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +415 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingPenaltyScoring.js +54 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightBasic.js +254 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightBasic.js +255 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +3 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +2 -0
- package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +2 -0
- package/cypress/e2e/ILC/ImageHighlight/toolsFunctionalityEditTab.js +2 -2
- package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +270 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsBasic.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +236 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialEqualWeightsBasic.js +150 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/setPointsPopup.js +88 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +97 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/studentViewSettings.js +134 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/additionalSettings.js +131 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabBasicSection.js +167 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +202 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/headerSection.js +76 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/manuallyAndNonScoredEditTab.js +72 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/minimumScoringPenaltyPointsAndRoundingDropdown.js +197 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/optionsOrientationSection.js +180 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/studentViewSettings.js +130 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionsPanel.js +121 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneConnectorStyle.js +68 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionAlignment.js +71 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionPlacement.js +64 -0
- package/cypress/e2e/ILC/MatchingDropdown/styleAndLayoutCustomization.js +270 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +272 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +6 -6
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/pages/audioPlayerPage.js +4 -4
- package/cypress/pages/audioResponsePage.js +9 -1
- package/cypress/pages/chartsBarPage.js +3 -3
- package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +51 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/pages/components/index.js +1 -10
- package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +604 -0
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -6
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
- package/cypress/pages/essayResponseBasicPage.js +4 -4
- package/cypress/pages/essayResponseMathPage.js +4 -4
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
- package/cypress/pages/index.js +0 -1
- package/cypress/pages/itemPreviewPage.js +1 -2
- package/cypress/pages/itemPreviewSettingsPage.js +3 -3
- package/cypress/pages/listOrderingPage.js +384 -10
- package/cypress/pages/matchingPage.js +512 -13
- package/cypress/pages/multipleSelectionPage.js +2 -2
- package/cypress/pages/numberLineLabelPage.js +3 -3
- package/cypress/pages/shortTextResponsePage.js +0 -37
- package/cypress/pages/singleSelectionPage.js +2 -2
- package/cypress/pages/textEntryMathPage.js +41 -9
- package/cypress/pages/textSelectionPage.js +2 -2
- package/cypress/pages/uploadResponsePage.js +2 -3
- package/cypress/pages/videoResponsePage.js +9 -2
- package/package.json +1 -1
- package/cypress/fixtures/specialAndMathCharacters.js +0 -120
- package/cypress/pages/components/autoScoredAdditionalSettings.js +0 -183
- package/cypress/pages/components/autoScoredPreviewBase.js +0 -92
- package/cypress/pages/components/autoScoredScoringSection.js +0 -199
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +0 -377
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +0 -297
- package/cypress/pages/components/autoScoredStudentViewSettingsForPredefinedOptions.js +0 -84
- package/cypress/pages/components/listSortingAndOrderingBase.js +0 -401
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +0 -91
- package/cypress/pages/components/scoringSectionBase.js +0 -354
- package/cypress/pages/components/specialAndCustomSpecialCharactersComponent.js +0 -80
- package/cypress/pages/components/specialCharactersFlyoutComponent.js +0 -59
- package/cypress/pages/listSortingPage.js +0 -1198
package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js
ADDED
@@ -0,0 +1,415 @@
|
|
1
|
+
import { chartsLinePage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create item page - Charts - Point: All or nothing scoring with alternative answer - When Correct answer points are more than alternative Answer points', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question Preview: AutoScored - All or nothing with alternative answer: When Correct Answer points are more than alternative Answer points', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
chartsLinePage.steps.navigateToCreateQuestion('charts');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
chartsLinePage.steps.selectLineButton();
|
17
|
+
chartsLinePage.steps.addTextInQuestionInstructionsInputField('Set the points on the chart for the profits of the years');
|
18
|
+
chartsLinePage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
19
|
+
chartsLinePage.steps.addBarOrPointInChartInSelectChartTypeSection();
|
20
|
+
chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 0, value: 3, range: 10 });
|
21
|
+
chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 1, value: 2, range: 10 });
|
22
|
+
chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 3, value: 3, range: 10 });
|
23
|
+
chartsLinePage.steps.lockPoint(1);
|
24
|
+
chartsLinePage.steps.allotPoints(20);
|
25
|
+
chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
|
26
|
+
chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
|
27
|
+
chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
|
28
|
+
chartsLinePage.steps.addAlternativeAnswerAccordion(1);
|
29
|
+
chartsLinePage.steps.allotPoints(10);
|
30
|
+
chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
|
31
|
+
chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
|
32
|
+
chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 4, value: 6, range: 10 });
|
33
|
+
//chartsLinePage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
34
|
+
chartsLinePage.steps.switchToPreviewTab();
|
35
|
+
});
|
36
|
+
|
37
|
+
//Need to remove skip once https://redmine.zeuslearning.com/issues/577535 , https://redmine.zeuslearning.com/issues/577716 is resolved
|
38
|
+
it.skip('When the user selects \'Grading\' view without attempting the question, then user should be provided with 0 points, correct/incorrect icons should not be displayed, the correct accordion answer should be displayed in the correct answer section graph and correct/incorrect status message should not be displayed', () => {
|
39
|
+
chartsLinePage.steps.switchToGradingView();
|
40
|
+
chartsLinePage.steps.verifyPreviewScore(0, 20);
|
41
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(0);
|
42
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
43
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(2);
|
44
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(3);
|
45
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(4);
|
46
|
+
chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
47
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
|
48
|
+
chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
|
49
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
|
50
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
|
51
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
|
52
|
+
chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
53
|
+
/*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')
|
54
|
+
chartsLinePage.steps.checkAnswer();
|
55
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
56
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
57
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
58
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
59
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
|
60
|
+
chartsLinePage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
61
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();*/
|
62
|
+
});
|
63
|
+
|
64
|
+
it('CSS of correct answer section', { tags: 'css' }, () => {
|
65
|
+
chartsLinePage.steps.switchToGradingView();
|
66
|
+
utilities.verifyCSS(chartsLinePage.correctAnswersLabel(), {
|
67
|
+
'color': css.color.sectionHeading,
|
68
|
+
'font-size': css.fontSize.default,
|
69
|
+
'font-weight': css.fontWeight.bold
|
70
|
+
});
|
71
|
+
chartsLinePage.steps.switchToStudentView();
|
72
|
+
});
|
73
|
+
|
74
|
+
it('Accessibility of correct answer section', { tags: 'a11y' }, () => {
|
75
|
+
chartsLinePage.steps.switchToGradingView();
|
76
|
+
cy.checkAccessibility(chartsLinePage.previewTabQuestionWrapper());
|
77
|
+
chartsLinePage.steps.switchToStudentView();
|
78
|
+
});
|
79
|
+
|
80
|
+
it('When the user incorrectly attempts the answer, then the user should be awarded with 0 points and on switching to grading view \'Your answer is incorrect\' should 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', () => {
|
81
|
+
chartsLinePage.steps.resetQuestionPreview();
|
82
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 5, range: 10 });
|
83
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
|
84
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 1, range: 10 });
|
85
|
+
chartsLinePage.steps.verifyPreviewScore(0, 20);
|
86
|
+
chartsLinePage.steps.switchToGradingView();
|
87
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
88
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
89
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
90
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
91
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
92
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
93
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
|
94
|
+
chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
|
95
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
|
96
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
|
97
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
|
98
|
+
chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
99
|
+
/*cy.log('When the user selects check answer after incorrectly attempting the question, then \'Your answer is incorrect\' should be displayed, incorrect icons should be displayed on the incorrectly attempted bars')
|
100
|
+
chartsLinePage.steps.checkAnswer();
|
101
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
102
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
103
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
104
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
105
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
106
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
107
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();*/
|
108
|
+
});
|
109
|
+
|
110
|
+
it('CSS of incorrect answer state', { tags: 'css' }, () => {
|
111
|
+
chartsLinePage.steps.switchToGradingView();
|
112
|
+
chartsLinePage.incorrectIcon()
|
113
|
+
.verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
|
114
|
+
utilities.verifyCSS(chartsLinePage.correctIncorrectAnswerBlock(), {
|
115
|
+
'background-color': css.color.incorrectAnswerLabelBg,
|
116
|
+
'border': `1px solid ${css.color.incorrectAnswer}`
|
117
|
+
});
|
118
|
+
utilities.verifyCSS(chartsLinePage.correctIncorrectStatusMessageText(), {
|
119
|
+
'color': css.color.text,
|
120
|
+
'font-size': css.fontSize.default,
|
121
|
+
'font-weight': css.fontWeight.regular
|
122
|
+
});
|
123
|
+
chartsLinePage.steps.switchToStudentView();
|
124
|
+
});
|
125
|
+
|
126
|
+
it('Accessibility of incorrect answer state', { tags: 'a11y' }, () => {
|
127
|
+
chartsLinePage.steps.switchToGradingView();
|
128
|
+
cy.checkAccessibility(chartsLinePage.previewTabQuestionWrapper());
|
129
|
+
chartsLinePage.steps.switchToStudentView();
|
130
|
+
});
|
131
|
+
|
132
|
+
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, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
133
|
+
chartsLinePage.steps.resetQuestionPreview();
|
134
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 5, range: 10 });
|
135
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 3, value: 4, range: 10 });
|
136
|
+
chartsLinePage.steps.verifyPreviewScore(20, 20);
|
137
|
+
chartsLinePage.steps.switchToGradingView();
|
138
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
139
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
140
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
141
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'correct');
|
142
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
|
143
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
144
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();
|
145
|
+
chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
146
|
+
/*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, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
147
|
+
chartsLinePage.steps.checkAnswer();
|
148
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
149
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
150
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
151
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'correct');
|
152
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
|
153
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
154
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();*/
|
155
|
+
});
|
156
|
+
|
157
|
+
it('CSS of Correct answer state', { tags: 'css' }, () => {
|
158
|
+
chartsLinePage.steps.switchToGradingView();
|
159
|
+
utilities.verifyCSS(chartsLinePage.previewScoreText(), {
|
160
|
+
'color': css.color.whiteText,
|
161
|
+
'background-color': css.color.correctAnswer
|
162
|
+
});
|
163
|
+
chartsLinePage.correctIcon()
|
164
|
+
.verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
|
165
|
+
utilities.verifyCSS(chartsLinePage.correctIncorrectAnswerBlock(), {
|
166
|
+
'background-color': css.color.correctAnswerLabelBg,
|
167
|
+
'border': `1px solid ${css.color.correctAnswer}`
|
168
|
+
});
|
169
|
+
utilities.verifyCSS(chartsLinePage.correctIncorrectStatusMessageText(), {
|
170
|
+
'color': css.color.text,
|
171
|
+
'font-size': css.fontSize.default,
|
172
|
+
'font-weight': css.fontWeight.regular
|
173
|
+
});
|
174
|
+
chartsLinePage.steps.switchToStudentView();
|
175
|
+
});
|
176
|
+
|
177
|
+
it('Accessibility of correct answer state', { tags: 'a11y' }, () => {
|
178
|
+
chartsLinePage.steps.switchToGradingView();
|
179
|
+
cy.checkAccessibility(chartsLinePage.previewTabQuestionWrapper());
|
180
|
+
chartsLinePage.steps.switchToStudentView();
|
181
|
+
});
|
182
|
+
|
183
|
+
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, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
184
|
+
chartsLinePage.steps.resetQuestionPreview();
|
185
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 4, range: 10 });
|
186
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 3, value: 4, range: 10 });
|
187
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 6, range: 10 });
|
188
|
+
chartsLinePage.steps.verifyPreviewScore(10, 20);
|
189
|
+
chartsLinePage.steps.switchToGradingView();
|
190
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
191
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
192
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
193
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'correct');
|
194
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
|
195
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
196
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();
|
197
|
+
chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
198
|
+
/*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, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
199
|
+
chartsLinePage.steps.checkAnswer();
|
200
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
201
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
202
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
203
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'correct');
|
204
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
|
205
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
206
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();*/
|
207
|
+
});
|
208
|
+
|
209
|
+
it('When the user attempts the question with partially correct exclusively from the correct accordion, then the user should be awarded 0 points 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 a status message with text \'Your answer is incorrect\' and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
210
|
+
chartsLinePage.steps.resetQuestionPreview();
|
211
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 5, range: 10 });
|
212
|
+
chartsLinePage.steps.verifyPreviewScore(0, 20);
|
213
|
+
chartsLinePage.steps.switchToGradingView();
|
214
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
215
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
216
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
217
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
218
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
|
219
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
220
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
|
221
|
+
chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
|
222
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
|
223
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
|
224
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
|
225
|
+
chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
226
|
+
/*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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
227
|
+
chartsLinePage.steps.checkAnswer();
|
228
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
229
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
230
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
231
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
232
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
|
233
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
234
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();*/
|
235
|
+
});
|
236
|
+
|
237
|
+
//Failed due to https://redmine.zeuslearning.com/issues/575252
|
238
|
+
it('When the user attempts the question with partially correct exclusively from the alternative accordion, then the user should be awarded 0 points 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 a status message with text \'Your answer is incorrect\' and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
239
|
+
chartsLinePage.steps.resetQuestionPreview();
|
240
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 4, range: 10 });
|
241
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 6, range: 10 });
|
242
|
+
chartsLinePage.steps.verifyPreviewScore(0, 20);
|
243
|
+
chartsLinePage.steps.switchToGradingView();
|
244
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
245
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
246
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
247
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
248
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
249
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
250
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
|
251
|
+
chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
|
252
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
|
253
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
|
254
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
|
255
|
+
chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
256
|
+
/*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 a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
257
|
+
chartsLinePage.steps.checkAnswer();
|
258
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
259
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
260
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
261
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
262
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
|
263
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
264
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();*/
|
265
|
+
});
|
266
|
+
|
267
|
+
it('When the user attempts the question with all answers from the correct accordion except one, then the user should be awarded 0 points 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 a status message with text \'Your answer is incorrect\' and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
268
|
+
chartsLinePage.steps.resetQuestionPreview();
|
269
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 5, range: 10 });
|
270
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 3, value: 4, range: 10 });
|
271
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 1, range: 10 });
|
272
|
+
chartsLinePage.steps.verifyPreviewScore(0, 20);
|
273
|
+
chartsLinePage.steps.switchToGradingView();
|
274
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
275
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
276
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
277
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'correct');
|
278
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
279
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
280
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
|
281
|
+
chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
|
282
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
|
283
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
|
284
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
|
285
|
+
chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
286
|
+
/*cy.log('When the user attempts the question with all answers from the correct accordion except one and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
287
|
+
chartsLinePage.steps.checkAnswer();
|
288
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
289
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
290
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
291
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'correct');
|
292
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
293
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
294
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();*/
|
295
|
+
});
|
296
|
+
|
297
|
+
it('When the user attempts the question with more answers from the correct accordion than the alternate accordion, then the user should be awarded 0 points 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, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
298
|
+
chartsLinePage.steps.resetQuestionPreview();
|
299
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 5, range: 10 });
|
300
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 6, range: 10 });
|
301
|
+
chartsLinePage.steps.verifyPreviewScore(0, 20);
|
302
|
+
chartsLinePage.steps.switchToGradingView();
|
303
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
304
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
305
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
306
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
307
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
308
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
309
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
|
310
|
+
chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
|
311
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
|
312
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
|
313
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
|
314
|
+
chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
315
|
+
/*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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
316
|
+
chartsLinePage.steps.checkAnswer();
|
317
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'correct');
|
318
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
319
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
320
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
321
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
322
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
323
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();*/
|
324
|
+
});
|
325
|
+
|
326
|
+
it('When the user attempts the question with more answers from the alternate accordion than the correct accordion, then the user should be awarded 0 points 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, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
327
|
+
chartsLinePage.steps.resetQuestionPreview();
|
328
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 4, range: 10 });
|
329
|
+
chartsLinePage.steps.verifyPreviewScore(0, 20);
|
330
|
+
chartsLinePage.steps.switchToGradingView();
|
331
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
332
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
333
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
334
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
335
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
|
336
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
337
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
|
338
|
+
chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
|
339
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
|
340
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
|
341
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
|
342
|
+
chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
343
|
+
/*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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
344
|
+
chartsLinePage.steps.checkAnswer();
|
345
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
346
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
347
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
348
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
349
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'correct');
|
350
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
351
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();*/
|
352
|
+
});
|
353
|
+
|
354
|
+
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 0 points 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, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
355
|
+
chartsLinePage.steps.resetQuestionPreview();
|
356
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 1, range: 10 });
|
357
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 5, range: 10 });
|
358
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 6, range: 10 });
|
359
|
+
chartsLinePage.steps.verifyPreviewScore(0, 20);
|
360
|
+
chartsLinePage.steps.switchToGradingView();
|
361
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
362
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
363
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
364
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
365
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
366
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
367
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
|
368
|
+
chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
|
369
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
|
370
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
|
371
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
|
372
|
+
chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
373
|
+
/*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 a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
374
|
+
chartsLinePage.steps.checkAnswer();
|
375
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
376
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
377
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'correct');
|
378
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'incorrect');
|
379
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
380
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
381
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();*/
|
382
|
+
});
|
383
|
+
|
384
|
+
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 0 points and on switching to \'Grading\' view, correct icon should be besides the common response, incorrect icons should be displayed on the incorrect bars, \'Your answer is incorrect\' and correct answer section should be displayed with the correct answers from the correct accordion', () => {
|
385
|
+
chartsLinePage.steps.resetQuestionPreview();
|
386
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 1, range: 10 });
|
387
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
|
388
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 3, value: 4, range: 10 });
|
389
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 4, value: 1, range: 10 });
|
390
|
+
chartsLinePage.steps.verifyPreviewScore(0, 20);
|
391
|
+
chartsLinePage.steps.switchToGradingView();
|
392
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
393
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
394
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
395
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'correct');
|
396
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
397
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
398
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 0, value: 3, range: 10 });
|
399
|
+
chartsLinePage.steps.verifyLockedPointInCorrectAnswerSection({ pointIndex: 1, value: 2, range: 10 });
|
400
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
|
401
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 3, value: 4, range: 10 });
|
402
|
+
chartsLinePage.steps.verifyPointInCorrectAnswerSection({ pointIndex: 4, value: 0, range: 10 });
|
403
|
+
chartsLinePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
404
|
+
/*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 a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
405
|
+
chartsLinePage.steps.checkAnswer();
|
406
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(0, 'incorrect');
|
407
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconNotExistsInPreviewTab(1);
|
408
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(2, 'incorrect');
|
409
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(3, 'correct');
|
410
|
+
chartsLinePage.steps.verifyPointCorrectIncorrectIconInPreviewTab(4, 'incorrect');
|
411
|
+
chartsLinePage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
412
|
+
chartsLinePage.steps.verifyCorrectAnswerSectionNotExist();*/
|
413
|
+
});
|
414
|
+
});
|
415
|
+
});
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { chartsLinePage} from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create item page - Charts - Line: All or nothing penalty scoring', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Question preview: Auto scored - All or nothing: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
chartsLinePage.steps.navigateToCreateQuestion('charts');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
chartsLinePage.steps.addTextInQuestionInstructionsInputField('Set the points on the chart for the profits of the years');
|
15
|
+
chartsLinePage.steps.selectLineButton();
|
16
|
+
chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 0, value: 1, range: 10 });
|
17
|
+
chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 1, value: 2, range: 10 });
|
18
|
+
chartsLinePage.steps.setPointValueInSelectChartTypeSection({ pointIndex: 2, value: 3, range: 10 });
|
19
|
+
chartsLinePage.steps.allotPoints(20);
|
20
|
+
chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 0, value: 4, range: 10 });
|
21
|
+
chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 2, value: 5, range: 10 });
|
22
|
+
chartsLinePage.steps.setPointValueInSpecifyCorrectAnswerSection({ pointIndex: 2, value: 6, range: 10 });
|
23
|
+
});
|
24
|
+
|
25
|
+
//Penalty points for the entire question
|
26
|
+
it('When the user sets penalty scoring to \'Penalty points for the entire question\', allots penalty points and attempts the question incorrectly, then the user should be awarded with negative points', () => {
|
27
|
+
chartsLinePage.steps.expandPenaltyScoringDropdown();
|
28
|
+
chartsLinePage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
29
|
+
chartsLinePage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
30
|
+
chartsLinePage.steps.allotPenaltyPoints(2);
|
31
|
+
chartsLinePage.steps.switchToPreviewTab();
|
32
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 2, range: 10 });
|
33
|
+
chartsLinePage.steps.verifyPreviewScore(-2, 20);
|
34
|
+
});
|
35
|
+
|
36
|
+
it('When the user attempts the question partially correct, then penalty points should get deducted from the awarded points', () => {
|
37
|
+
chartsLinePage.steps.resetQuestionPreview();
|
38
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 4, range: 10 });
|
39
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 1, value: 5, range: 10 });
|
40
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 2, value: 1, range: 10 });
|
41
|
+
chartsLinePage.steps.verifyPreviewScore(-2, 20);
|
42
|
+
});
|
43
|
+
|
44
|
+
it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
|
45
|
+
chartsLinePage.steps.switchToEditTab();
|
46
|
+
chartsLinePage.steps.expandMinimumScoringDropdown();
|
47
|
+
chartsLinePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
48
|
+
chartsLinePage.steps.allotMinimumPoints(3);
|
49
|
+
chartsLinePage.steps.switchToPreviewTab();
|
50
|
+
chartsLinePage.steps.setPointValueInPreviewTab({ pointIndex: 0, value: 2, range: 10 });
|
51
|
+
chartsLinePage.steps.verifyPreviewScore(3, 20);
|
52
|
+
});
|
53
|
+
});
|
54
|
+
});
|