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,198 @@
|
|
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: All or nothing with alternative answers', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Alternative answer\' points are more than \'Correct 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.allotPoints(10);
|
20
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
21
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
22
|
+
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
23
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
24
|
+
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
25
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
26
|
+
matchingPage.steps.allotPoints(20);
|
27
|
+
matchingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
28
|
+
matchingPage.steps.switchToPreviewTab();
|
29
|
+
});
|
30
|
+
|
31
|
+
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', () => {
|
32
|
+
matchingPage.steps.switchToGradingView();
|
33
|
+
matchingPage.steps.verifyDropzoneNumeration();
|
34
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
35
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
36
|
+
});
|
37
|
+
|
38
|
+
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points of the correct tab 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', () => {
|
39
|
+
matchingPage.steps.resetQuestionPreview();
|
40
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
41
|
+
matchingPage.steps.verifyPreviewScore(10, 20);
|
42
|
+
matchingPage.steps.switchToGradingView();
|
43
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
44
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
45
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
46
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
47
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
48
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
49
|
+
cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
50
|
+
matchingPage.steps.checkAnswer();
|
51
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
52
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
53
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
54
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
55
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
56
|
+
});
|
57
|
+
|
58
|
+
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 with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
59
|
+
matchingPage.steps.resetQuestionPreview();
|
60
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
61
|
+
matchingPage.steps.verifyPreviewScore(20, 20);
|
62
|
+
matchingPage.steps.switchToGradingView();
|
63
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
64
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
65
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
66
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
67
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
68
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
69
|
+
cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
70
|
+
matchingPage.steps.checkAnswer();
|
71
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
72
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
73
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
74
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
75
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
76
|
+
});
|
77
|
+
|
78
|
+
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 icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone numeration should be displayed', () => {
|
79
|
+
matchingPage.steps.resetQuestionPreview();
|
80
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }]);
|
81
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
82
|
+
matchingPage.steps.switchToGradingView();
|
83
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
84
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
85
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
86
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
87
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
88
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
89
|
+
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, no icon should be displayed for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
90
|
+
matchingPage.steps.checkAnswer();
|
91
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
92
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
93
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
94
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
95
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
96
|
+
});
|
97
|
+
|
98
|
+
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 icon should be displayed for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
99
|
+
matchingPage.steps.resetQuestionPreview();
|
100
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }]);
|
101
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
102
|
+
matchingPage.steps.switchToGradingView();
|
103
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
104
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
105
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
106
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
107
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
108
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
109
|
+
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 for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
110
|
+
matchingPage.steps.checkAnswer();
|
111
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
112
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
113
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
114
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
115
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
116
|
+
});
|
117
|
+
|
118
|
+
it('When the user attempts the question partially correct with all the responses correct as per the correct accordion but one response incomplete, then the user should be awarded 0 points 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 for unattempted response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
119
|
+
matchingPage.steps.resetQuestionPreview();
|
120
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
121
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
122
|
+
matchingPage.steps.switchToGradingView();
|
123
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
124
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
125
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
126
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
127
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
128
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
129
|
+
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 for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
130
|
+
matchingPage.steps.checkAnswer();
|
131
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
132
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
133
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
134
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
135
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
136
|
+
});
|
137
|
+
|
138
|
+
it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, green check-mark icon should be displayed besides response field with alternative answer responses, red cross-mark icon should be displayed beside responses from the correct accordion, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
139
|
+
matchingPage.steps.resetQuestionPreview();
|
140
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
141
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
142
|
+
matchingPage.steps.switchToGradingView();
|
143
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
144
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
145
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
146
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
147
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
148
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
149
|
+
cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
150
|
+
matchingPage.steps.checkAnswer();
|
151
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
152
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
153
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
154
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
155
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
156
|
+
});
|
157
|
+
|
158
|
+
it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, green check-mark icon should be besides the common response, no icon should be displayed for unattempted response, \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
159
|
+
matchingPage.steps.resetQuestionPreview();
|
160
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Cat', dropzoneIndex: 2 }]);
|
161
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
162
|
+
matchingPage.steps.switchToGradingView();
|
163
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
164
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
165
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
166
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
167
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
168
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
169
|
+
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 for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
170
|
+
matchingPage.steps.checkAnswer();
|
171
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
172
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
173
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
174
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
175
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
176
|
+
});
|
177
|
+
|
178
|
+
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 for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with dropzone cell numeration should be displayed', () => {
|
179
|
+
matchingPage.steps.resetQuestionPreview();
|
180
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Eagle', dropzoneIndex: 0 }]);
|
181
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
182
|
+
matchingPage.steps.switchToGradingView();
|
183
|
+
matchingPage.steps.verifyIncorrectOptionIcon(0);
|
184
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
185
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
186
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
187
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
188
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
189
|
+
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 for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
190
|
+
matchingPage.steps.checkAnswer();
|
191
|
+
matchingPage.steps.verifyIncorrectOptionIcon(0);
|
192
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
193
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
194
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
195
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
196
|
+
});
|
197
|
+
});
|
198
|
+
});
|
package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js
CHANGED
@@ -20,8 +20,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
20
20
|
matchingPage.steps.addMultipleOptionFields(3);
|
21
21
|
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
22
22
|
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
23
|
-
matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
24
|
-
matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
|
25
23
|
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
26
24
|
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
27
25
|
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
@@ -30,7 +28,7 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
30
28
|
matchingPage.steps.switchToPreviewTab();
|
31
29
|
});
|
32
30
|
|
33
|
-
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
|
31
|
+
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', () => {
|
34
32
|
matchingPage.steps.switchToGradingView();
|
35
33
|
matchingPage.steps.verifyDropzoneNumeration();
|
36
34
|
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
@@ -57,10 +55,10 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
57
55
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
58
56
|
});
|
59
57
|
|
60
|
-
it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with
|
58
|
+
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 with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
61
59
|
matchingPage.steps.resetQuestionPreview();
|
62
60
|
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
63
|
-
matchingPage.steps.verifyPreviewScore(
|
61
|
+
matchingPage.steps.verifyPreviewScore(20, 20);
|
64
62
|
matchingPage.steps.switchToGradingView();
|
65
63
|
matchingPage.steps.verifyCorrectOptionIcon(0);
|
66
64
|
matchingPage.steps.verifyCorrectOptionIcon(1);
|
@@ -97,7 +95,7 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
97
95
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
98
96
|
});
|
99
97
|
|
100
|
-
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,
|
98
|
+
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 icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
101
99
|
matchingPage.steps.resetQuestionPreview();
|
102
100
|
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }]);
|
103
101
|
matchingPage.steps.verifyPreviewScore(0, 20);
|
@@ -20,8 +20,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
20
20
|
matchingPage.steps.addMultipleOptionFields(3);
|
21
21
|
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
22
22
|
matchingPage.steps.enterTextInOptionInputField(optionsArray);
|
23
|
-
matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
24
|
-
matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
|
25
23
|
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
26
24
|
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
27
25
|
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
@@ -30,14 +28,14 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
30
28
|
matchingPage.steps.switchToPreviewTab();
|
31
29
|
});
|
32
30
|
|
33
|
-
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
|
31
|
+
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', () => {
|
34
32
|
matchingPage.steps.switchToGradingView();
|
35
33
|
matchingPage.steps.verifyDropzoneNumeration();
|
36
34
|
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
37
35
|
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
38
36
|
});
|
39
37
|
|
40
|
-
it('CSS of correct answer section and dropzone
|
38
|
+
it('CSS of correct answer section and dropzone numeration', { tags: 'css' }, () => {
|
41
39
|
utilities.verifyCSS(matchingPage.correctAnswersLabel(), {
|
42
40
|
'color': css.color.sectionHeading,
|
43
41
|
'font-size': css.fontSize.default,
|
@@ -63,7 +61,7 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
63
61
|
});
|
64
62
|
});
|
65
63
|
|
66
|
-
it('Accessibility of correct answer section and dropzone
|
64
|
+
it('Accessibility of correct answer section and dropzone numeration', { tags: 'a11y' }, () => {
|
67
65
|
cy.checkAccessibility(matchingPage.previewTabQuestionWrapper());
|
68
66
|
});
|
69
67
|
|
@@ -114,17 +112,17 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
114
112
|
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Penguin', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
|
115
113
|
matchingPage.steps.verifyPreviewScore(10, 20);
|
116
114
|
matchingPage.steps.switchToGradingView();
|
117
|
-
|
118
|
-
|
119
|
-
|
115
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
116
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
117
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
120
118
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
121
119
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
122
120
|
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
123
121
|
cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
124
122
|
matchingPage.steps.checkAnswer();
|
125
|
-
|
126
|
-
|
127
|
-
|
123
|
+
matchingPage.steps.verifyCorrectOptionIcon(0);
|
124
|
+
matchingPage.steps.verifyCorrectOptionIcon(1);
|
125
|
+
matchingPage.steps.verifyCorrectOptionIcon(2);
|
128
126
|
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
129
127
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
130
128
|
});
|
@@ -209,7 +207,7 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
209
207
|
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
210
208
|
});
|
211
209
|
|
212
|
-
it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, green check-mark icon should be besides the common response,
|
210
|
+
it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, 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 cell numeration should be displayed', () => {
|
213
211
|
matchingPage.steps.resetQuestionPreview();
|
214
212
|
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Cat', dropzoneIndex: 2 }]);
|
215
213
|
matchingPage.steps.verifyPreviewScore(0, 20);
|
@@ -261,16 +259,6 @@ describe('Create item page - Matching: All or nothing with alternative answers',
|
|
261
259
|
'font-size': css.fontSize.default,
|
262
260
|
'font-weight': css.fontWeight.regular
|
263
261
|
});
|
264
|
-
utilities.verifyCSS(matchingPage.correctIncorrectAnswerLabel(), {
|
265
|
-
'color': css.color.text,
|
266
|
-
'font-size': css.fontSize.default,
|
267
|
-
'font-weight': css.fontWeight.bold
|
268
|
-
});
|
269
|
-
cy.log('Verifying css of an incorrect option')
|
270
|
-
utilities.verifyCSS(matchingPage.dropzonePreviewTab().parents('.cell'), {
|
271
|
-
'background-color': css.color.optionsBg,
|
272
|
-
'border': `2px dashed ${css.color.incorrectAnswer}`
|
273
|
-
});
|
274
262
|
});
|
275
263
|
|
276
264
|
it('Accessibility of incorrect answer state', { tags: 'a11y' }, () => {
|