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 - When \'Alternative\' points are more than \'Correct\' 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(9);
|
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(15);
|
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 alternative accordion and respective dropzone numeration', () => {
|
33
|
+
matchingPage.steps.switchToGradingView();
|
34
|
+
matchingPage.steps.verifyDropzoneNumeration();
|
35
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
36
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
37
|
+
});
|
38
|
+
|
39
|
+
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points of the 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 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(9, 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 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(15, 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 responses 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 alternative 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(6, 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([['Bear'], ['Penguin'], ['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 responses and on switching to \'Grading\' view, correct icon should be displayed besides the alternative 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 alternative accordion along with dropzone cell numeration should be displayed', () => {
|
100
|
+
matchingPage.steps.resetQuestionPreview();
|
101
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }]);
|
102
|
+
matchingPage.steps.verifyPreviewScore(10, 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([['Bear'], ['Penguin'], ['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.skip('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 responses and on switching to \'Grading\' view, correct icon should be displayed besides the response from the correct 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 alternative accordion along with dropzone cell numeration should be displayed', () => {
|
120
|
+
matchingPage.steps.resetQuestionPreview();
|
121
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Cat', dropzoneIndex: 2 }])
|
122
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
123
|
+
matchingPage.steps.switchToGradingView();
|
124
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
125
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
126
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
127
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
128
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['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, 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.verifyCorrectOptionIcon(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 responses 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 tab, a status message should not be displayed and correct answer section with all correct answers from the alternative accordion along with dropzone cell 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([['Bear'], ['Penguin'], ['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 responses 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 alternative accordion along with dropzone cell 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([['Bear'], ['Penguin'], ['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 cell 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([['Bear'], ['Penguin'], ['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 alternative accordion than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternative accordion answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, green check-mark icons should be displayed for the correct accordion response, red cross-mark icon should be displayed for the alternative accordion 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 alternative accordion 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(23);
|
206
|
+
matchingPage.steps.expandCorrectAnswerAccordion();
|
207
|
+
matchingPage.steps.allotPoints(5);
|
208
|
+
matchingPage.steps.switchToPreviewTab();
|
209
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
210
|
+
matchingPage.steps.verifyPreviewScore(7.67, 23);
|
211
|
+
matchingPage.steps.switchToGradingView();
|
212
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
213
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
214
|
+
matchingPage.steps.verifyIncorrectOptionIcon(2);
|
215
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
216
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Roots'], ['Stem'], ['Seed']]);
|
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.verifyCorrectOptionIcon(0);
|
221
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
222
|
+
matchingPage.steps.verifyIncorrectOptionIcon(2);
|
223
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
224
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
225
|
+
});
|
226
|
+
});
|
227
|
+
});
|
@@ -0,0 +1,199 @@
|
|
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 equal to \'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(15);
|
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 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(15, 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(10, 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(10, 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
|
+
});
|