itemengine-cypress-automation 1.0.150-migrationScripts-5e451b6.0 → 1.0.150
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +4 -4
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +3 -3
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +2 -1
- package/cypress/e2e/ILC/ContentBlocks/additionalSection.js +2 -2
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +6 -6
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +3 -3
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +2 -2
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +1 -1
- package/cypress/e2e/ILC/GridFill/additionalSettings.js +52 -0
- package/cypress/e2e/ILC/GridFill/headerSection.js +74 -0
- package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +199 -0
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -15
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +3 -18
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +4 -25
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingPenaltyScoring.js +4 -7
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +1 -14
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +1 -1
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +4 -4
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +256 -0
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +213 -0
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +258 -0
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +206 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +198 -0
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +4 -6
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +10 -22
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +421 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +247 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +219 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +247 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +168 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +227 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +199 -0
- package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +227 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +345 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +340 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +421 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabScoringSection.js +292 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +10 -2
- package/cypress/e2e/ILC/MultipleSelectionGridNew/specifyCorrectAnswerSection.js +86 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +189 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingPenaltyScoring.js +55 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsBasic.js +116 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +309 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +163 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabScoringSection.js +292 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +10 -2
- package/cypress/e2e/ILC/SingleSelectionGridNew/specifyCorrectAnswerSection.js +86 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +189 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +1 -1
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
- package/cypress/fixtures/uploads/sampleVirus.zip +0 -0
- package/cypress/pages/audioResponsePage.js +2 -2
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/commonComponents.js +2 -1
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +5 -5
- package/cypress/pages/components/desmosToolComponent.js +1 -1
- package/cypress/pages/components/gridQuestionCommonComponent.js +388 -35
- package/cypress/pages/components/maximumRecorderLengthComponent.js +4 -4
- package/cypress/pages/components/playbackControlsBaseComponent.js +8 -2
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/contentBlocksPage.js +1 -1
- package/cypress/pages/drawingResponsePage.js +9 -10
- package/cypress/pages/geoGebraActivityPage.js +2 -1
- package/cypress/pages/geoGebraToolsPage.js +1 -1
- package/cypress/pages/gridFillPage.js +108 -13
- package/cypress/pages/matchingPage.js +154 -2
- package/cypress/pages/multipleSelectionGridPage.js +10 -2
- package/cypress/pages/rulerPage.js +2 -5
- package/cypress/pages/singleSelectionGridPage.js +18 -2
- package/package.json +2 -2
@@ -0,0 +1,227 @@
|
|
1
|
+
import { matchingPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
6
|
+
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
7
|
+
|
8
|
+
describe('Create item page - Matching: Partial equal weights with alternative answers', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
19
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
20
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
21
|
+
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
22
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
23
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
24
|
+
matchingPage.steps.allotPoints(15);
|
25
|
+
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
26
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
27
|
+
matchingPage.steps.allotPoints(9);
|
28
|
+
matchingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
29
|
+
matchingPage.steps.switchToPreviewTab();
|
30
|
+
});
|
31
|
+
|
32
|
+
it('When the user selects \'Grading\' view without attempting the question, cell numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion and respective dropzone numeration', () => {
|
33
|
+
matchingPage.steps.switchToGradingView();
|
34
|
+
matchingPage.steps.verifyDropzoneNumeration();
|
35
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
36
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
37
|
+
});
|
38
|
+
|
39
|
+
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 and correct answer section should not be displayed', () => {
|
40
|
+
matchingPage.steps.resetQuestionPreview();
|
41
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
42
|
+
matchingPage.steps.verifyPreviewScore(15, 15);
|
43
|
+
matchingPage.steps.switchToGradingView();
|
44
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
45
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
46
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
47
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
48
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
49
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
50
|
+
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 and correct answer section should not be displayed')
|
51
|
+
matchingPage.steps.checkAnswer();
|
52
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
53
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
54
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
55
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
56
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
57
|
+
});
|
58
|
+
|
59
|
+
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 and correct answer section should not be displayed', () => {
|
60
|
+
matchingPage.steps.resetQuestionPreview();
|
61
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
62
|
+
matchingPage.steps.verifyPreviewScore(9, 15);
|
63
|
+
matchingPage.steps.switchToGradingView();
|
64
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
65
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
66
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
67
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
68
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
69
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
70
|
+
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 and correct answer section should not be displayed')
|
71
|
+
matchingPage.steps.checkAnswer();
|
72
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
73
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
74
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
75
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
76
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
77
|
+
});
|
78
|
+
|
79
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropzone numeration should be displayed', () => {
|
80
|
+
matchingPage.steps.resetQuestionPreview();
|
81
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }]);
|
82
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
83
|
+
matchingPage.steps.switchToGradingView();
|
84
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
85
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
86
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
87
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
88
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
89
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
90
|
+
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 should not be displayed and correct answer section should not be displayed')
|
91
|
+
matchingPage.steps.checkAnswer();
|
92
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
93
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
94
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
95
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
96
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
97
|
+
});
|
98
|
+
|
99
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropzone numeration should be displayed', () => {
|
100
|
+
matchingPage.steps.resetQuestionPreview();
|
101
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }]);
|
102
|
+
matchingPage.steps.verifyPreviewScore(6, 15);
|
103
|
+
matchingPage.steps.switchToGradingView();
|
104
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
105
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
106
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
107
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
108
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
109
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
110
|
+
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, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
|
111
|
+
matchingPage.steps.checkAnswer();
|
112
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
113
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
114
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
115
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
116
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
117
|
+
});
|
118
|
+
|
119
|
+
it('When the user attempts the question partially correct with all the responses correct as per the alternative accordion but one response incomplete, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropzone numeration should be displayed', () => {
|
120
|
+
matchingPage.steps.resetQuestionPreview();
|
121
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
122
|
+
matchingPage.steps.verifyPreviewScore(6, 15);
|
123
|
+
matchingPage.steps.switchToGradingView();
|
124
|
+
matchingPage.steps.verifyIncorrectOptionIcon(0);
|
125
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
126
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
127
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
128
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
129
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
130
|
+
cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message should not be displayed and correct answer section should not be displayed')
|
131
|
+
matchingPage.steps.checkAnswer();
|
132
|
+
matchingPage.steps.verifyIncorrectOptionIcon(0);
|
133
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
134
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
135
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
136
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
137
|
+
});
|
138
|
+
|
139
|
+
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 of the correctly attempted response and on switching to \'Grading\' view, green check-mark icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative accordion, a status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropzone numeration should be displayed', () => {
|
140
|
+
matchingPage.steps.resetQuestionPreview();
|
141
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
142
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
143
|
+
matchingPage.steps.switchToGradingView();
|
144
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
145
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
146
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
147
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
148
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
149
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
150
|
+
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 should not be displayed and correct answer section should not be displayed')
|
151
|
+
matchingPage.steps.checkAnswer();
|
152
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
153
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
154
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
155
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
156
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
157
|
+
});
|
158
|
+
|
159
|
+
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 of the correctly attempted response and on switching to \'Grading\' view, green check-mark icon should be besides the common response, no icon should be displayed beside unattempted response, \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone numeration should be displayed', () => {
|
160
|
+
matchingPage.steps.resetQuestionPreview();
|
161
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Cat', dropzoneIndex: 2 }]);
|
162
|
+
matchingPage.steps.verifyPreviewScore(5, 15);
|
163
|
+
matchingPage.steps.switchToGradingView();
|
164
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
165
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
166
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
167
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
168
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
169
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
170
|
+
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, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
|
171
|
+
matchingPage.steps.checkAnswer();
|
172
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
173
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
174
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
175
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
176
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
177
|
+
});
|
178
|
+
|
179
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section with all correct answers along with dropzone numeration should be displayed', () => {
|
180
|
+
matchingPage.steps.resetQuestionPreview();
|
181
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Eagle', dropzoneIndex: 0 }]);
|
182
|
+
matchingPage.steps.verifyPreviewScore(0, 15);
|
183
|
+
matchingPage.steps.switchToGradingView();
|
184
|
+
matchingPage.steps.verifyIncorrectOptionIcon(0);
|
185
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
186
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
187
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
188
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
189
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
190
|
+
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, no icon should be displayed beside unattempted response a status message should not be displayed and correct answer section should not be displayed')
|
191
|
+
matchingPage.steps.checkAnswer();
|
192
|
+
matchingPage.steps.verifyIncorrectOptionIcon(0);
|
193
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
194
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
195
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
196
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
197
|
+
});
|
198
|
+
|
199
|
+
it('Overachiever case: When the user attempts the question with more number of correct responses from the alternate tab than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternate tab answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, green check-mark icons should be displayed for the correct accordion response, red cross-mark icon should be displayed for the alternate tab responses, correct/incorrect answer label and its border should not be displayed and correct answer container should be displayed with correct accordion answers for the responses marked incorrect', () => {
|
200
|
+
cy.log('Pre-step: Switching to Edit tab and allotting points to alternate tab such that the difference between the points is substantial and the points per response are in decimal')
|
201
|
+
matchingPage.steps.switchToEditTab();
|
202
|
+
matchingPage.steps.deleteAlternativeAnswerAccordion(0);
|
203
|
+
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
204
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }, { optionText: 'Eagle', dropzoneIndex: 2 }]);
|
205
|
+
matchingPage.steps.allotPoints(5);
|
206
|
+
matchingPage.steps.expandCorrectAnswerAccordion();
|
207
|
+
matchingPage.steps.allotPoints(23);
|
208
|
+
matchingPage.steps.switchToPreviewTab();
|
209
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }, { optionText: 'Eagle', dropzoneIndex: 2 }]);
|
210
|
+
matchingPage.steps.verifyPreviewScore(7.67, 23);
|
211
|
+
matchingPage.steps.switchToGradingView();
|
212
|
+
matchingPage.steps.verifyIncorrectOptionIcon(0);
|
213
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
214
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
215
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
216
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
217
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
218
|
+
cy.log('When user attempts the question correctly and clicks on the \'Check answer\' button, green check-mark icons should be displayed beside the correct responses from the correct accordion, red cross-mark icons should be displayed beside the incorrectly answered responses, correct/incorrect answer label and its border, correct answer container should not be displayed')
|
219
|
+
matchingPage.steps.checkAnswer();
|
220
|
+
matchingPage.steps.verifyIncorrectOptionIcon(0);
|
221
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
222
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
223
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
224
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
225
|
+
});
|
226
|
+
});
|
227
|
+
});
|
@@ -0,0 +1,345 @@
|
|
1
|
+
import { multipleSelectionGridPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create item page - Multiple selection grid: All or nothing with alternative answers', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
|
15
|
+
multipleSelectionGridPage.steps.addInputToColumnInputStepper(4);
|
16
|
+
multipleSelectionGridPage.steps.setQuestionGridLayoutForScoringFunctionalityTest();
|
17
|
+
multipleSelectionGridPage.steps.allotPoints(10);
|
18
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 1 }, { row: 4, column: 2 }]);
|
19
|
+
multipleSelectionGridPage.steps.addAlternativeAnswerAccordion(1);
|
20
|
+
multipleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
21
|
+
multipleSelectionGridPage.steps.allotPoints(20);
|
22
|
+
multipleSelectionGridPage.steps.verifyPointsLabelAndPointsOnAnswerAccordion(1, '20');
|
23
|
+
multipleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
24
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
25
|
+
});
|
26
|
+
|
27
|
+
it('When the user selects \'Grading\' view without attempting the question, correct answers section should be displayed with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
28
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
29
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
30
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
31
|
+
});
|
32
|
+
|
33
|
+
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded with points specified for correct 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\' and correct answer section should not be displayed', () => {
|
34
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
35
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 1 }, { row: 4, column: 2 }]);
|
36
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(10, 20);
|
37
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
38
|
+
multipleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
39
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
40
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
41
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
42
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
43
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
44
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
45
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
46
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
47
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
48
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
49
|
+
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\' and correct answer section should not be displayed')
|
50
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
51
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
52
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
53
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
54
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
55
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
56
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
57
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
58
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
59
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
60
|
+
});
|
61
|
+
|
62
|
+
it('When the user attempts the question with alternative accordion responses, then the user should be awarded with 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\' and correct answer section should not be displayed', () => {
|
63
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
64
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
65
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(20, 20);
|
66
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
67
|
+
multipleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
68
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
69
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
70
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
71
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
72
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
73
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
74
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
75
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
76
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
77
|
+
cy.log('When the user has attempted the question with alternative accordion responses 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\' and correct answer section should not be displayed')
|
78
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
79
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
80
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
81
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
82
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
83
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
84
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
85
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
86
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
87
|
+
});
|
88
|
+
|
89
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
90
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
91
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }]);
|
92
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
93
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
94
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
95
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
96
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
97
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
98
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
|
99
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
|
100
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
101
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
102
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
103
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion, and clicks on \'Check answer\' button, correct icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
104
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
105
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
106
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
107
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
108
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
109
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
|
110
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
|
111
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
112
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
113
|
+
});
|
114
|
+
|
115
|
+
it('When the user attempts the question with partially correct options 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, no icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
116
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
117
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }]);
|
118
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
119
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
120
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
121
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
122
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
123
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
124
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
|
125
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
|
126
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
127
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
128
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
129
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion, and clicks on \'Check answer\' button, correct icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
130
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
131
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
132
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
133
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
134
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
135
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
|
136
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
|
137
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
138
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
139
|
+
});
|
140
|
+
|
141
|
+
it('When the user attempts the question partially correct with all the questions as per the correct accordion but one question incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icons should be displayed besides correct responses from the alternative accordion, incorrect icons should be displayed besides correct accordion response, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
142
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
143
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 1 }, { row: 4, column: 2 }]);
|
144
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
145
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
146
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
147
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
148
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
149
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
150
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
151
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
152
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
153
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
154
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
155
|
+
cy.log('When the user has attempted the question with alternative accordion responses but one question incomplete 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\' and correct answer section should not be displayed')
|
156
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
157
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
158
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
159
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
160
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
161
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
162
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
163
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
164
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
165
|
+
});
|
166
|
+
|
167
|
+
it('When the user attempts the question partially correct with more number of questions exclusively from the correct accordion but with one question response common across both accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the response common across both accordions, incorrect icon should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
168
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
169
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }]);
|
170
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
171
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
172
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
173
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
174
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
175
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
176
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
177
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
178
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
179
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
180
|
+
cy.log('When the user has attempted the question partially correct with more number of questions exclusively from the correct accordion but with one question response common across both accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the response common across both accordions, incorrect icon should be displayed besides correct accordion responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
181
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
182
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
183
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
184
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
185
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
186
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
187
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
188
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
189
|
+
});
|
190
|
+
|
191
|
+
it('When the user attempts the question partially correct with all the questions correctly attempted as per the correct accordion but with an extra incorrect option, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the response common across both accordions, incorrect icon should be displayed besides the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
192
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
193
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 0 }, { row: 4, column: 1 }, { row: 4, column: 2 }]);
|
194
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
195
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
196
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
197
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
198
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
199
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
200
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
201
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
202
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
203
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
204
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
205
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
206
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
207
|
+
cy.log('When the user has attempted the question partially correct with all the questions correctly attempted as per the correct accordion but with an extra incorrect option and clicks on \'Check answer\' button, then correct icon should be displayed besides the response common across both accordions, incorrect icon should be displayed besides the correct accordion responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
208
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
209
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
210
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
211
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
212
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
213
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
214
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
215
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
216
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
217
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
218
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
219
|
+
});
|
220
|
+
|
221
|
+
it('When the user attempts the question partially correct such that more number of correct options are exclusively from the correct accordion but with one option exclusively from the alternative accordion in the same question, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the alternative accordion responses, incorrect icon should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
222
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
223
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 0 }, { row: 2, column: 1 }, { row: 2, column: 2 }]);
|
224
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
225
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
226
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
227
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
228
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
229
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
230
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
231
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
232
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
233
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
234
|
+
cy.log('When the user has attempted the question partially correct such that more number of correct options are exclusively from the correct accordion but with one option exclusively from the alternative accordion in the same question and clicks on \'Check answer\' button, correct icon should be displayed besides the alternative accordion responses, incorrect icon should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
235
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
236
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
237
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
238
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
239
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
240
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
241
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
242
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
243
|
+
});
|
244
|
+
|
245
|
+
it('When the user attempts the question such that equal number of options are correct from the both accordions, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the alternative accordion responses, incorrect icon should be displayed besides the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
246
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
247
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }]);
|
248
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
249
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
250
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
251
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
252
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
253
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
254
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
255
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
256
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
257
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
258
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
259
|
+
cy.log('When the user has attempted the question such that equal number of options are correct from the both accordions and clicks on \'Check answer\' button, correct icon should be displayed besides the alternative accordion responses, incorrect icon should be displayed besides the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
260
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
261
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
262
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
263
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
264
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
265
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
266
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
267
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
268
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
269
|
+
});
|
270
|
+
|
271
|
+
it('Race condition 1: When the user attempts the question partially with correct options of both correct and alternative accordions (same options set correct in both the accordions), then the user should be awarded 0 points and on switching to \'Grading\' view, correct icons should be displayed besides the alternative accordion response, incorrect icon should be displayed beside correct accordion response, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
272
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
273
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 0 }, { row: 2, column: 1 }]);
|
274
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
275
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
276
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
277
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
278
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
279
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
280
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
281
|
+
cy.log('When the user has attempted the question partially with correct options of both correct and alternative accordions (same options set correct in both the accordions) and clicks on \'Check answer\' button, then correct icons should be displayed besides the alternative accordion response, incorrect icon should be displayed beside correct accordion response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
282
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
283
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
284
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
285
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
286
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
287
|
+
});
|
288
|
+
|
289
|
+
it('Race condition 2: When the user attempts a question with correct options of both correct and alternative accordion (one common option set correct in both the correct and alternative accordions), then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct accordion response, incorrect icon should be displayed besides the alternative accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
290
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
291
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 3, column: 0 }, { row: 3, column: 1 }]);
|
292
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
293
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
294
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
295
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
296
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
297
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
298
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
299
|
+
cy.log('When the user has attempted the question partially with correct options of both correct and alternative accordions (same options set correct in both the accordions) and clicks on \'Check answer\' button, correct icon should be displayed besides the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
300
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
301
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
302
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
303
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
304
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
305
|
+
});
|
306
|
+
|
307
|
+
it('Race condition 3: When the user attempts a question with correct options of both correct and alternative accordion (both the correct and alternative accordions have exclusive options set correct), then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the alternative accordion response, incorrect icon should be displayed besides the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
308
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
309
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 1 }, { row: 1, column: 2 }]);
|
310
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
311
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
312
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
313
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
314
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
315
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
316
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
317
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
318
|
+
cy.log('When the user has attempted the question partially with correct options of both correct and alternative accordion (both the correct and alternative accordions have exclusive options set correct) and clicks on \'Check answer\' button, correct icon should be displayed besides the alternative accordion response, incorrect icon should be displayed besides the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
319
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
320
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
321
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
322
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
323
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
324
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
325
|
+
});
|
326
|
+
|
327
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
328
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
329
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 3, column: 2 }, { row: 4, column: 0 }]);
|
330
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
331
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
332
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
333
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
334
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
335
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
336
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
337
|
+
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
338
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
339
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
340
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
341
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
342
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
343
|
+
});
|
344
|
+
});
|
345
|
+
});
|