itemengine-cypress-automation 1.0.150-migrationScripts-4f6bd6a.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,421 @@
|
|
1
|
+
import { multipleSelectionGridPage } 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 - Multiple selection grid: All or nothing with alternative answers', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
|
17
|
+
multipleSelectionGridPage.steps.addInputToColumnInputStepper(4);
|
18
|
+
multipleSelectionGridPage.steps.setQuestionGridLayoutForScoringFunctionalityTest();
|
19
|
+
multipleSelectionGridPage.steps.allotPoints(20);
|
20
|
+
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 }]);
|
21
|
+
multipleSelectionGridPage.steps.addAlternativeAnswerAccordion(1);
|
22
|
+
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 }]);
|
23
|
+
multipleSelectionGridPage.steps.allotPoints(10);
|
24
|
+
multipleSelectionGridPage.steps.verifyPointsLabelAndPointsOnAnswerAccordion(1, '10');
|
25
|
+
multipleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
26
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
27
|
+
});
|
28
|
+
|
29
|
+
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 correct accordion should be displayed', () => {
|
30
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
31
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
32
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
33
|
+
});
|
34
|
+
|
35
|
+
it('CSS of correct answer section', { tags: 'css' }, () => {
|
36
|
+
multipleSelectionGridPage.correctAnswerGrid()
|
37
|
+
.within(() => {
|
38
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell().parent(), 1), {
|
39
|
+
'background-color': css.color.matrixHeadingCellBg,
|
40
|
+
'border-color': `${css.color.matrixCellBorder}`
|
41
|
+
});
|
42
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell().parent(), 4), {
|
43
|
+
'background-color': css.color.defaultBackground,
|
44
|
+
'border-color': `${css.color.matrixCellBorder}`
|
45
|
+
});
|
46
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell().parent(), 9), {
|
47
|
+
'background-color': css.color.defaultBackground,
|
48
|
+
'border-color': `${css.color.matrixCellBorder}`
|
49
|
+
});
|
50
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell(), 1).find('.question-text-wrapper'), {
|
51
|
+
'color': css.color.text,
|
52
|
+
'font-size': css.fontSize.heading,
|
53
|
+
'font-weight': css.fontWeight.bold
|
54
|
+
});
|
55
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.tableCell(), 4).find('.question-text-wrapper'), {
|
56
|
+
'color': css.color.text,
|
57
|
+
'font-size': css.fontSize.default,
|
58
|
+
'font-weight': css.fontWeight.regular
|
59
|
+
});
|
60
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.optionsButton(), 0), {
|
61
|
+
'background-color': css.color.correctAnswerLabelBg,
|
62
|
+
'border': `1px solid ${css.color.correctAnswer}`
|
63
|
+
});
|
64
|
+
utilities.verifyCSS(utilities.getNthElement(multipleSelectionGridPage.optionsButton(), 0).find('svg').eq(1).find('g g').eq(1), {
|
65
|
+
'color': css.color.activeButtons,
|
66
|
+
});
|
67
|
+
});
|
68
|
+
});
|
69
|
+
|
70
|
+
it('Accessibility of correct answer section', { tags: 'a11y' }, () => {
|
71
|
+
cy.checkAccessibility(multipleSelectionGridPage.gridPreviewTab().parents('[class*="question-preview-wrapper"]'));
|
72
|
+
});
|
73
|
+
|
74
|
+
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\' and correct answer section should not be displayed', () => {
|
75
|
+
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 }]);
|
76
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(20, 20);
|
77
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
78
|
+
multipleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
79
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
80
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
81
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
82
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
83
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
84
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
85
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
86
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
87
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
88
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
89
|
+
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')
|
90
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
91
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
92
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
93
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
94
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
95
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
96
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
97
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
98
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
99
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
100
|
+
});
|
101
|
+
|
102
|
+
it('CSS of correct answer state', { tags: 'css' }, () => {
|
103
|
+
utilities.verifyCSS(multipleSelectionGridPage.previewScoreText(), {
|
104
|
+
'color': css.color.whiteText,
|
105
|
+
'background-color': css.color.correctAnswer
|
106
|
+
});
|
107
|
+
multipleSelectionGridPage.correctIcon()
|
108
|
+
.verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
|
109
|
+
utilities.verifyCSS(multipleSelectionGridPage.correctIncorrectAnswerBlock(), {
|
110
|
+
'background-color': css.color.correctAnswerLabelBg,
|
111
|
+
'border': `1px solid ${css.color.correctAnswer}`
|
112
|
+
});
|
113
|
+
utilities.verifyCSS(multipleSelectionGridPage.correctIncorrectStatusMessageText(), {
|
114
|
+
'color': css.color.text,
|
115
|
+
'font-size': css.fontSize.default,
|
116
|
+
'font-weight': css.fontWeight.regular
|
117
|
+
});
|
118
|
+
});
|
119
|
+
|
120
|
+
it('Accessibility of correct answer state', { tags: 'a11y' }, () => {
|
121
|
+
cy.checkAccessibility(multipleSelectionGridPage.gridPreviewTab().parents('[class*="question-preview-wrapper"]'));
|
122
|
+
});
|
123
|
+
|
124
|
+
it('When the user attempts the question with alternative accordion responses, 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\' and correct answer section should not be displayed', () => {
|
125
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
126
|
+
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 }]);
|
127
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(10, 20);
|
128
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
129
|
+
multipleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
130
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
131
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
132
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
133
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
134
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
135
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
136
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
137
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
138
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
139
|
+
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')
|
140
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
141
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
142
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
143
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
144
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
145
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
146
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
147
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
148
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
149
|
+
});
|
150
|
+
|
151
|
+
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 correct accordion should be displayed', () => {
|
152
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
153
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 2 }, { row: 2, column: 1 }]);
|
154
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
155
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
156
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
157
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
158
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
159
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
160
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
|
161
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
162
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
|
163
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
164
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
165
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
166
|
+
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')
|
167
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
168
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
169
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
170
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
171
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
172
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
|
173
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
174
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
|
175
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
176
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
177
|
+
});
|
178
|
+
|
179
|
+
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 correct accordion should be displayed', () => {
|
180
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
181
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }]);
|
182
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
183
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
184
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
185
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
186
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
187
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
188
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
|
189
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
|
190
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
191
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
192
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
193
|
+
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')
|
194
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
195
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
196
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
197
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
198
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
199
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 1 });
|
200
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 2 });
|
201
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
202
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
203
|
+
});
|
204
|
+
|
205
|
+
it('When the user attempts the question partially correct with all the questions as per the alternative 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 correct accordion, incorrect icons should be displayed besides alternative 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 correct accordion should be displayed', () => {
|
206
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
207
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 3, column: 0 }, { row: 3, column: 1 }, { row: 4, column: 2 }]);
|
208
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
209
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
210
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
211
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
212
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
213
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
214
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
215
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
216
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
217
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
218
|
+
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')
|
219
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
220
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
221
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
222
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
223
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
224
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
225
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
226
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
227
|
+
});
|
228
|
+
|
229
|
+
it('When the user attempts the question partially correct with more number of questions exclusively from the alternative 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 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 correct accordion should be displayed', () => {
|
230
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
231
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 3, column: 1 }]);
|
232
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
233
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
234
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
235
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
236
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
237
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
238
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
239
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
240
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
241
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
242
|
+
cy.log('When the user has attempted the question partially correct with more number of questions exclusively from the alternative 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 alternative accordion responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
243
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
244
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
245
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
246
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
247
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
248
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
249
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
250
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
251
|
+
});
|
252
|
+
|
253
|
+
it('When the user attempts the question partially correct with all the questions correctly attempted as per the alternative 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 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 correct accordion should be displayed', () => {
|
254
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
255
|
+
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: 0 }, { row: 4, column: 2 }]);
|
256
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
257
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
258
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
259
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
260
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
261
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
262
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
263
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
264
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
265
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
266
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
267
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
268
|
+
cy.log('When the user has attempted the question partially correct with all the questions correctly attempted as per the alternative 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 alternative accordion responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
269
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
270
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
271
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
272
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
273
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
274
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
275
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
276
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
277
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
278
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
279
|
+
});
|
280
|
+
|
281
|
+
it('When the user attempts the question partially correct such that more number of correct options are exclusively from the alternative accordion but with one option exclusively from the correct 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 correct accordion responses, incorrect icon should be displayed besides 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 correct accordion should be displayed', () => {
|
282
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
283
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }, { row: 2, column: 1 }, { row: 2, column: 2 }]);
|
284
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
285
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
286
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
287
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
288
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
289
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
290
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
291
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
292
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
293
|
+
cy.log('When the user has attempted the question partially correct such that more number of correct options are exclusively from the alternative accordion but with one option exclusively from the correct accordion in the same question and clicks on \'Check answer\' button, correct icon should be displayed besides the correct accordion responses, incorrect icon should be displayed besides alternative accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
294
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
295
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
296
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
297
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
298
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
299
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
300
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
301
|
+
});
|
302
|
+
|
303
|
+
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 correct accordion responses, 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 correct accordion should be displayed', () => {
|
304
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
305
|
+
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 }]);
|
306
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
307
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
308
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
309
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
310
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
311
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
312
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
313
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
314
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
315
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
316
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
317
|
+
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 correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
318
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
319
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
320
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
321
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
322
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
323
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
324
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
325
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
326
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
327
|
+
});
|
328
|
+
|
329
|
+
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 correct accordion response, incorrect icon should be displayed beside alternative 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 correct accordion should be displayed', () => {
|
330
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
331
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 0 }, { row: 2, column: 1 }]);
|
332
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
333
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
334
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
335
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
336
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
337
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
338
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
339
|
+
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 icons should be displayed besides the correct accordion response, incorrect icon should be displayed beside alternative accordion response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
340
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
341
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
342
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
343
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
344
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
345
|
+
});
|
346
|
+
|
347
|
+
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 correct accordion should be displayed', () => {
|
348
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
349
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 3, column: 0 }, { row: 3, column: 1 }]);
|
350
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
351
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
352
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
353
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
354
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
355
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
356
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
357
|
+
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')
|
358
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
359
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
360
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
361
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
362
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
363
|
+
});
|
364
|
+
|
365
|
+
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 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 correct accordion should be displayed', () => {
|
366
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
367
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 1, column: 1 }, { row: 1, column: 2 }]);
|
368
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
369
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
370
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
371
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
372
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
373
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
374
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
375
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
376
|
+
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 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 should not be displayed')
|
377
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
378
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
379
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
380
|
+
multipleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
381
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
382
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
383
|
+
});
|
384
|
+
|
385
|
+
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 correct accordion should be displayed', () => {
|
386
|
+
multipleSelectionGridPage.steps.resetQuestionPreview();
|
387
|
+
multipleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 3, column: 2 }, { row: 4, column: 0 }]);
|
388
|
+
multipleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
389
|
+
multipleSelectionGridPage.steps.switchToGradingView();
|
390
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
391
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
392
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
393
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ 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 }]);
|
394
|
+
multipleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
395
|
+
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')
|
396
|
+
multipleSelectionGridPage.steps.checkAnswer();
|
397
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
398
|
+
multipleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
399
|
+
multipleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
400
|
+
multipleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
401
|
+
});
|
402
|
+
|
403
|
+
it('CSS of incorrect answer state', { tags: 'css' }, () => {
|
404
|
+
multipleSelectionGridPage.incorrectIcon()
|
405
|
+
.verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
|
406
|
+
utilities.verifyCSS(multipleSelectionGridPage.correctIncorrectAnswerBlock(), {
|
407
|
+
'background-color': css.color.incorrectAnswerLabelBg,
|
408
|
+
'border': `1px solid ${css.color.incorrectAnswer}`
|
409
|
+
});
|
410
|
+
utilities.verifyCSS(multipleSelectionGridPage.correctIncorrectStatusMessageText(), {
|
411
|
+
'color': css.color.text,
|
412
|
+
'font-size': css.fontSize.default,
|
413
|
+
'font-weight': css.fontWeight.regular
|
414
|
+
});
|
415
|
+
});
|
416
|
+
|
417
|
+
it('Accessibility of incorrect answer state', { tags: 'a11y' }, () => {
|
418
|
+
cy.checkAccessibility(multipleSelectionGridPage.gridPreviewTab().parents('[class*="question-preview-wrapper"]'));
|
419
|
+
});
|
420
|
+
});
|
421
|
+
});
|