itemengine-cypress-automation 1.0.238-deletedCypressRepeat-09cad14.0 → 1.0.238
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +3 -3
- package/cypress/e2e/ILC/ChartsBar/labelOptionsSection.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +14 -13
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +5 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +4 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +1 -1
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +2 -1
- package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +6 -3
- package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +2 -1
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +6 -6
- package/cypress/e2e/ILC/Matching/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -4
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +144 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +144 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +112 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +397 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +179 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +158 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +179 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +143 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +167 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +145 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +166 -0
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +12 -10
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +3 -5
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +3 -3
- package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/NumberLineLabel/editTabScoring.js +2 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +2 -1
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +6 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +10 -2
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +13 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +10 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +4 -2
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +37 -5
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +6 -0
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +4 -5
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +6 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +4 -1
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +2 -0
- package/cypress/e2e/ILC/UploadResponse/uploadedFileProperties.js +1 -1
- package/cypress/pages/audioResponsePage.js +1 -0
- package/cypress/pages/components/createQuestionBasePage.js +49 -4
- package/cypress/pages/components/draggableOptionsStyleAndLayoutComponent.js +1 -1
- package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +1 -1
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +22 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +5 -2
- package/cypress/pages/components/imageCanvasComponent.js +6 -9
- package/cypress/pages/components/numberLineCommonComponent.js +6 -6
- package/cypress/pages/components/questionInstructionsComponent.js +3 -2
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +2 -2
- package/cypress/pages/feedbackScalePage.js +1 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +0 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +2 -0
- package/cypress/pages/geoGebraActivityPage.js +13 -1
- package/cypress/pages/imageHighlightPage.js +1 -0
- package/cypress/pages/listOrderingPage.js +1 -1
- package/cypress/pages/matchingPage.js +21 -0
- package/cypress/pages/multipleSelectionGridPage.js +16 -0
- package/cypress/pages/numberLineLabelPage.js +16 -3
- package/cypress/pages/shortTextResponsePage.js +1 -0
- package/package.json +1 -1
- /package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/{checkAnswerFunctionalityForAllViews.js → checkAnswerFunctionalityForAllViews.smoke.js} +0 -0
@@ -0,0 +1,167 @@
|
|
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.selectOptionLayoutToggleButton('Dropdown menu');
|
20
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
21
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
22
|
+
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
23
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
24
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
25
|
+
matchingPage.steps.allotPoints(9);
|
26
|
+
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
27
|
+
matchingPage.steps.allotPoints(15);
|
28
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
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 dropdown numeration', () => {
|
33
|
+
matchingPage.steps.switchToGradingView();
|
34
|
+
matchingPage.steps.verifyDropdownNumeration(0);
|
35
|
+
matchingPage.steps.verifyDropdownNumeration(1);
|
36
|
+
matchingPage.steps.verifyDropdownNumeration(2);
|
37
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
38
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
39
|
+
});
|
40
|
+
|
41
|
+
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', () => {
|
42
|
+
matchingPage.steps.resetQuestionPreview();
|
43
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
44
|
+
matchingPage.steps.verifyPreviewScore(9, 15);
|
45
|
+
matchingPage.steps.switchToGradingView();
|
46
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
47
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
48
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
49
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
50
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
51
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
52
|
+
});
|
53
|
+
|
54
|
+
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', () => {
|
55
|
+
matchingPage.steps.resetQuestionPreview();
|
56
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
57
|
+
matchingPage.steps.verifyPreviewScore(15, 15);
|
58
|
+
matchingPage.steps.switchToGradingView();
|
59
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
60
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
61
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
62
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
63
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
64
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
65
|
+
});
|
66
|
+
|
67
|
+
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 dropdown numeration should be displayed', () => {
|
68
|
+
matchingPage.steps.resetQuestionPreview();
|
69
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }]);
|
70
|
+
matchingPage.steps.verifyPreviewScore(6, 15);
|
71
|
+
matchingPage.steps.switchToGradingView();
|
72
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
73
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
74
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
75
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
76
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
77
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
78
|
+
});
|
79
|
+
|
80
|
+
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 dropdown cell numeration should be displayed', () => {
|
81
|
+
matchingPage.steps.resetQuestionPreview();
|
82
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }]);
|
83
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
84
|
+
matchingPage.steps.switchToGradingView();
|
85
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
86
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
87
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
88
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
89
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
90
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
91
|
+
});
|
92
|
+
|
93
|
+
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 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 dropdown cell numeration should be displayed', () => {
|
94
|
+
matchingPage.steps.resetQuestionPreview();
|
95
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
96
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
97
|
+
matchingPage.steps.switchToGradingView();
|
98
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
99
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
100
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
101
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
102
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
103
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
104
|
+
});
|
105
|
+
|
106
|
+
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 dropdown cell numeration should be displayed', () => {
|
107
|
+
matchingPage.steps.resetQuestionPreview();
|
108
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
109
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
110
|
+
matchingPage.steps.switchToGradingView();
|
111
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(0);
|
112
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
113
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
114
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
115
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
116
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
117
|
+
});
|
118
|
+
|
119
|
+
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 dropdown cell numeration should be displayed', () => {
|
120
|
+
matchingPage.steps.resetQuestionPreview();
|
121
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
122
|
+
matchingPage.steps.verifyPreviewScore(5, 15);
|
123
|
+
matchingPage.steps.switchToGradingView();
|
124
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(0);
|
125
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
126
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
127
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
128
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
129
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
130
|
+
});
|
131
|
+
|
132
|
+
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 dropdown cell numeration should be displayed', () => {
|
133
|
+
matchingPage.steps.resetQuestionPreview();
|
134
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[4] }]);
|
135
|
+
matchingPage.steps.verifyPreviewScore(0, 15);
|
136
|
+
matchingPage.steps.switchToGradingView();
|
137
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(0);
|
138
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
139
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
140
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
141
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Cat']]);
|
142
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
143
|
+
});
|
144
|
+
|
145
|
+
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', () => {
|
146
|
+
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')
|
147
|
+
matchingPage.steps.switchToEditTab();
|
148
|
+
matchingPage.steps.deleteAlternativeAnswerAccordion(0);
|
149
|
+
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
150
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[4] }]);
|
151
|
+
matchingPage.steps.allotPoints(23);
|
152
|
+
matchingPage.steps.expandCorrectAnswerAccordion();
|
153
|
+
matchingPage.steps.allotPoints(5);
|
154
|
+
matchingPage.steps.expandAdditionalSettings();
|
155
|
+
matchingPage.steps.switchToPreviewTab();
|
156
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
157
|
+
matchingPage.steps.verifyPreviewScore(7.67, 23);
|
158
|
+
matchingPage.steps.switchToGradingView();
|
159
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
160
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
|
161
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(2);
|
162
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
163
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bear'], ['Penguin'], ['Eagle']]);
|
164
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
165
|
+
});
|
166
|
+
});
|
167
|
+
});
|
@@ -0,0 +1,145 @@
|
|
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.selectOptionLayoutToggleButton('Dropdown menu');
|
20
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
21
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
22
|
+
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
23
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
24
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
25
|
+
matchingPage.steps.allotPoints(15);
|
26
|
+
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
27
|
+
matchingPage.steps.allotPoints(15);
|
28
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
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 dropdown numeration', () => {
|
33
|
+
matchingPage.steps.switchToGradingView();
|
34
|
+
matchingPage.steps.verifyDropdownNumeration(0);
|
35
|
+
matchingPage.steps.verifyDropdownNumeration(1);
|
36
|
+
matchingPage.steps.verifyDropdownNumeration(2);
|
37
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
38
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
39
|
+
});
|
40
|
+
|
41
|
+
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', () => {
|
42
|
+
matchingPage.steps.resetQuestionPreview();
|
43
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
44
|
+
matchingPage.steps.verifyPreviewScore(15, 15);
|
45
|
+
matchingPage.steps.switchToGradingView();
|
46
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
47
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
48
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
49
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
50
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
51
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
52
|
+
});
|
53
|
+
|
54
|
+
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', () => {
|
55
|
+
matchingPage.steps.resetQuestionPreview();
|
56
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
57
|
+
matchingPage.steps.verifyPreviewScore(15, 15);
|
58
|
+
matchingPage.steps.switchToGradingView();
|
59
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
60
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
61
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
62
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
63
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
64
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
65
|
+
});
|
66
|
+
|
67
|
+
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 dropdown numeration should be displayed', () => {
|
68
|
+
matchingPage.steps.resetQuestionPreview();
|
69
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }]);
|
70
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
71
|
+
matchingPage.steps.switchToGradingView();
|
72
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
73
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
74
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
75
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
76
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
77
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
78
|
+
});
|
79
|
+
|
80
|
+
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 dropdown numeration should be displayed', () => {
|
81
|
+
matchingPage.steps.resetQuestionPreview();
|
82
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }]);
|
83
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
84
|
+
matchingPage.steps.switchToGradingView();
|
85
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
86
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
87
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
88
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
89
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
90
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
91
|
+
});
|
92
|
+
|
93
|
+
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 and 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 dropdown numeration should be displayed', () => {
|
94
|
+
matchingPage.steps.resetQuestionPreview();
|
95
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
96
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
97
|
+
matchingPage.steps.switchToGradingView();
|
98
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
99
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
100
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
101
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
102
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
103
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
104
|
+
});
|
105
|
+
|
106
|
+
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 dropdown numeration should be displayed', () => {
|
107
|
+
matchingPage.steps.resetQuestionPreview();
|
108
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
109
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
110
|
+
matchingPage.steps.switchToGradingView();
|
111
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
112
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
|
113
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
114
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
115
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
116
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
117
|
+
});
|
118
|
+
|
119
|
+
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 dropdown numeration should be displayed', () => {
|
120
|
+
matchingPage.steps.resetQuestionPreview();
|
121
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
122
|
+
matchingPage.steps.verifyPreviewScore(5, 15);
|
123
|
+
matchingPage.steps.switchToGradingView();
|
124
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(0);
|
125
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
126
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
127
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
128
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
129
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
130
|
+
});
|
131
|
+
|
132
|
+
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 dropdown numeration should be displayed', () => {
|
133
|
+
matchingPage.steps.resetQuestionPreview();
|
134
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[4] }]);
|
135
|
+
matchingPage.steps.verifyPreviewScore(0, 15);
|
136
|
+
matchingPage.steps.switchToGradingView();
|
137
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(0);
|
138
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
139
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
140
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
141
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
142
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
143
|
+
});
|
144
|
+
});
|
145
|
+
});
|
@@ -0,0 +1,166 @@
|
|
1
|
+
import { matchingPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
6
|
+
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
7
|
+
|
8
|
+
describe('Create item page - Matching: Partial equal weights with alternative answers', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
19
|
+
matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
|
20
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
21
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
22
|
+
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
23
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
24
|
+
matchingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
25
|
+
matchingPage.steps.allotPoints(15);
|
26
|
+
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
27
|
+
matchingPage.steps.allotPoints(9);
|
28
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
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 dropdown numeration', () => {
|
33
|
+
matchingPage.steps.switchToGradingView();
|
34
|
+
matchingPage.steps.verifyDropdownNumeration(0);
|
35
|
+
matchingPage.steps.verifyDropdownNumeration(1);
|
36
|
+
matchingPage.steps.verifyDropdownNumeration(2);
|
37
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
38
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
39
|
+
});
|
40
|
+
|
41
|
+
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', () => {
|
42
|
+
matchingPage.steps.resetQuestionPreview();
|
43
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
44
|
+
matchingPage.steps.verifyPreviewScore(15, 15);
|
45
|
+
matchingPage.steps.switchToGradingView();
|
46
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
47
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
48
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
49
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
50
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
51
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
52
|
+
});
|
53
|
+
|
54
|
+
it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message and correct answer section should not be displayed', () => {
|
55
|
+
matchingPage.steps.resetQuestionPreview();
|
56
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
57
|
+
matchingPage.steps.verifyPreviewScore(9, 15);
|
58
|
+
matchingPage.steps.switchToGradingView();
|
59
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
60
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
61
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
62
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
63
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
64
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
65
|
+
});
|
66
|
+
|
67
|
+
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 dropdown numeration should be displayed', () => {
|
68
|
+
matchingPage.steps.resetQuestionPreview();
|
69
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }]);
|
70
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
71
|
+
matchingPage.steps.switchToGradingView();
|
72
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
73
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
74
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
75
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
76
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
77
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
78
|
+
});
|
79
|
+
|
80
|
+
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 dropdown numeration should be displayed', () => {
|
81
|
+
matchingPage.steps.resetQuestionPreview();
|
82
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }]);
|
83
|
+
matchingPage.steps.verifyPreviewScore(6, 15);
|
84
|
+
matchingPage.steps.switchToGradingView();
|
85
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
86
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
87
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
88
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
89
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
90
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
91
|
+
});
|
92
|
+
|
93
|
+
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 and 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 dropdown numeration should be displayed', () => {
|
94
|
+
matchingPage.steps.resetQuestionPreview();
|
95
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
96
|
+
matchingPage.steps.verifyPreviewScore(6, 15);
|
97
|
+
matchingPage.steps.switchToGradingView();
|
98
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
99
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
100
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
101
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
102
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
103
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
104
|
+
});
|
105
|
+
|
106
|
+
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 dropdown numeration should be displayed', () => {
|
107
|
+
matchingPage.steps.resetQuestionPreview();
|
108
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
109
|
+
matchingPage.steps.verifyPreviewScore(10, 15);
|
110
|
+
matchingPage.steps.switchToGradingView();
|
111
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
112
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
|
113
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
114
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
115
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
116
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
117
|
+
});
|
118
|
+
|
119
|
+
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 dropdown numeration should be displayed', () => {
|
120
|
+
matchingPage.steps.resetQuestionPreview();
|
121
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
122
|
+
matchingPage.steps.verifyPreviewScore(5, 15);
|
123
|
+
matchingPage.steps.switchToGradingView();
|
124
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(0);
|
125
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
126
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
127
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
128
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
129
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
130
|
+
});
|
131
|
+
|
132
|
+
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 dropdown numeration should be displayed', () => {
|
133
|
+
matchingPage.steps.resetQuestionPreview();
|
134
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[4] }]);
|
135
|
+
matchingPage.steps.verifyPreviewScore(0, 15);
|
136
|
+
matchingPage.steps.switchToGradingView();
|
137
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(0);
|
138
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
139
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
140
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
141
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
142
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
143
|
+
});
|
144
|
+
|
145
|
+
it('Overachiever case: When the user attempts the question with more number of correct responses from the alternate tab than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternate tab answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, green check-mark icons should be displayed for the correct accordion response, red cross-mark icon should be displayed for the alternate tab responses, correct/incorrect answer label and its border should not be displayed and correct answer container should be displayed with correct accordion answers for the responses marked incorrect', () => {
|
146
|
+
cy.log('Pre-step: Switching to Edit tab and allotting points to alternate tab such that the difference between the points is substantial and the points per response are in decimal')
|
147
|
+
matchingPage.steps.switchToEditTab();
|
148
|
+
matchingPage.steps.expandCorrectAnswerAccordion();
|
149
|
+
matchingPage.steps.allotPoints(23);
|
150
|
+
matchingPage.steps.deleteAlternativeAnswerAccordion(0);
|
151
|
+
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
152
|
+
matchingPage.steps.allotPoints(5);
|
153
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[4] }]);
|
154
|
+
matchingPage.steps.switchToPreviewTab();
|
155
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[4] }]);
|
156
|
+
matchingPage.steps.verifyPreviewScore(7.6667, 23);
|
157
|
+
matchingPage.steps.switchToGradingView();
|
158
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
159
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
|
160
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(2);
|
161
|
+
matchingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
162
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
163
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
164
|
+
});
|
165
|
+
});
|
166
|
+
});
|
@@ -4,6 +4,7 @@ import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const range = 22.18;
|
5
5
|
|
6
6
|
const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
|
7
|
+
const tickLabelFontSizes = { 'Tiny': '8px', 'Small': '10px', 'Default': '12px', 'Normal': '14px', 'Big': '18px', 'Huge': '22px' };
|
7
8
|
|
8
9
|
describe('Create Item page -numberLine : Additional settings', () => {
|
9
10
|
before(() => {
|
@@ -52,10 +53,10 @@ describe('Create Item page -numberLine : Additional settings', () => {
|
|
52
53
|
'font-size': fontSizes[option]
|
53
54
|
});
|
54
55
|
utilities.verifyCSS(numberLinePage.numberLineNumberLineSection().parents('.ngie-jxgbox').find('.number-line-tick-font'), {
|
55
|
-
'font-size':
|
56
|
+
'font-size': tickLabelFontSizes[option]
|
56
57
|
});
|
57
58
|
utilities.verifyCSS(numberLinePage.numberLineSpecifyCorrectAnswer().parents('.ngie-jxgbox').find('.number-line-tick-font'), {
|
58
|
-
'font-size':
|
59
|
+
'font-size': tickLabelFontSizes[option]
|
59
60
|
});
|
60
61
|
});
|
61
62
|
});
|
@@ -99,17 +100,18 @@ describe('Create Item page -numberLine : Additional settings', () => {
|
|
99
100
|
'font-size': fontSizes[option]
|
100
101
|
});
|
101
102
|
utilities.verifyCSS(numberLinePage.numberLinePreviewTab().parents('.ngie-jxgbox').find('.number-line-tick-font'), {
|
102
|
-
'font-size':
|
103
|
+
'font-size': tickLabelFontSizes[option]
|
103
104
|
});
|
104
105
|
utilities.verifyCSS(numberLinePage.numberLineCorrectAnswerSection().parents('.ngie-jxgbox').find('.number-line-tick-font'), {
|
105
|
-
'font-size':
|
106
|
-
});
|
107
|
-
utilities.verifyCSS(numberLinePage.correctIncorrectAnswerTextWrapper(), {
|
108
|
-
'font-size': fontSizes[option]
|
109
|
-
});
|
110
|
-
utilities.verifyCSS(numberLinePage.incorrectIcon(), {
|
111
|
-
'font-size': fontSizes[option]
|
106
|
+
'font-size': tickLabelFontSizes[option]
|
112
107
|
});
|
108
|
+
//Remove this comment once https://redmine.zeuslearning.com/issues/578279 is resolved
|
109
|
+
// utilities.verifyCSS(numberLinePage.correctIncorrectAnswerTextWrapper(), {
|
110
|
+
// 'font-size': fontSizes[option]
|
111
|
+
// });
|
112
|
+
// utilities.verifyCSS(numberLinePage.incorrectIcon(), {
|
113
|
+
// 'font-size': fontSizes[option]
|
114
|
+
// });
|
113
115
|
numberLinePage.steps.switchToStudentView();
|
114
116
|
numberLinePage.steps.switchToEditTab();
|
115
117
|
});
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import { numberLinePage } from "../../../pages";
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
-
import utilities from "../../../support/helpers/utilities";
|
4
|
-
const css = Cypress.env('css');
|
5
3
|
|
6
4
|
describe('Create item - Number line : Line settings and Display specific annotation (use semicolons to separate) section', () => {
|
7
5
|
|
@@ -18,8 +16,8 @@ describe('Create item - Number line : Line settings and Display specific annotat
|
|
18
16
|
});
|
19
17
|
|
20
18
|
it(`When user selects whole numbers in line settings section, then number displayed on number line should be whole numbers in number line section and specify correct answer section`, () => {
|
21
|
-
numberLinePage.steps.verifyLabelOnNumberLineNumberLineSection([{ value: -9, index:
|
22
|
-
numberLinePage.steps.verifyLabelOnNumberLineSpecifyCorrectAnswerSection([{ value: -9, index:
|
19
|
+
numberLinePage.steps.verifyLabelOnNumberLineNumberLineSection([{ value: -9, index: 2 }]);
|
20
|
+
numberLinePage.steps.verifyLabelOnNumberLineSpecifyCorrectAnswerSection([{ value: -9, index: 2 }]);
|
23
21
|
});
|
24
22
|
|
25
23
|
numberLinePage.tests.verifyDisplaySpecificAnnotationAndLineSettingsEditTabFunctionality();
|
@@ -35,7 +33,7 @@ describe('Create item - Number line : Line settings and Display specific annotat
|
|
35
33
|
|
36
34
|
it(`When user selects whole numbers in line settings section, then number displayed on number line should be whole numbers in preview tab`, () => {
|
37
35
|
numberLinePage.steps.switchToPreviewTab();
|
38
|
-
numberLinePage.steps.verifyLabelOnNumberLinePreviewTab([{ value: -9, index:
|
36
|
+
numberLinePage.steps.verifyLabelOnNumberLinePreviewTab([{ value: -9, index: 2 }]);
|
39
37
|
});
|
40
38
|
|
41
39
|
numberLinePage.tests.verifyDisplaySpecificAnnotationAndLineSettingsPreviewTabFunctionality();
|
@@ -58,8 +58,8 @@ describe('Create item - Number line : Number line section', () => {
|
|
58
58
|
});
|
59
59
|
|
60
60
|
it(`When user selects whole numbers in line settings section, then number displayed on number line should be whole numbers in number line section and specify correct answer section`, () => {
|
61
|
-
numberLinePage.steps.verifyLabelOnNumberLineNumberLineSection([{ value: -9, index:
|
62
|
-
numberLinePage.steps.verifyLabelOnNumberLineSpecifyCorrectAnswerSection([{ value: -9, index:
|
61
|
+
numberLinePage.steps.verifyLabelOnNumberLineNumberLineSection([{ value: -9, index: 2 }]);
|
62
|
+
numberLinePage.steps.verifyLabelOnNumberLineSpecifyCorrectAnswerSection([{ value: -9, index: 2 }]);
|
63
63
|
});
|
64
64
|
|
65
65
|
numberLinePage.tests.verifyDisplaySpecificAnnotationAndLineSettingsEditTabFunctionality();
|
@@ -76,7 +76,7 @@ describe('Create item - Number line : Number line section', () => {
|
|
76
76
|
|
77
77
|
it(`When user selects whole numbers in line settings section, then number displayed on number line should be whole numbers in preview tab`, () => {
|
78
78
|
numberLinePage.steps.switchToPreviewTab();
|
79
|
-
numberLinePage.steps.verifyLabelOnNumberLinePreviewTab([{ value: -9, index:
|
79
|
+
numberLinePage.steps.verifyLabelOnNumberLinePreviewTab([{ value: -9, index: 2 }]);
|
80
80
|
});
|
81
81
|
|
82
82
|
numberLinePage.tests.verifyDisplaySpecificAnnotationAndLineSettingsPreviewTabFunctionality();
|
@@ -185,7 +185,7 @@ describe('Create Item page - Number line label : Question instructions and label
|
|
185
185
|
|
186
186
|
it('When user focus in and out of any of the \'Labels\' input field without typing anything, an error message should be thrown', () => {
|
187
187
|
numberLineLabelPage.steps.focusInAndOutOfLabelsInputField(1)
|
188
|
-
utilities.
|
188
|
+
utilities.verifyElementVisibilityState(numberLineLabelPage.errorMessage(), 'notExist');
|
189
189
|
});
|
190
190
|
|
191
191
|
it('User should be able to enter text in labels input field and \'Error: Option is required.\' error message should disappear', () => {
|
@@ -325,8 +325,8 @@ describe('Create Item page - Number line label : Question instructions and label
|
|
325
325
|
it('User should be able to delete an label input field and the deleted label should not be displayed in the \'Preview\' tab', () => {
|
326
326
|
numberLineLabelPage.steps.deleteLabel(2);
|
327
327
|
utilities.verifyElementCount(numberLineLabelPage.labelInputField(), 2);
|
328
|
-
numberLineLabelPage.steps.switchToPreviewTab();
|
329
328
|
utilities.verifyElementCount(numberLineLabelPage.labelWrapper(), 2);
|
329
|
+
numberLineLabelPage.steps.switchToPreviewTab();
|
330
330
|
utilities.verifyTextContent(utilities.getNthElement(numberLineLabelPage.draggableLabelsPreviewTab(), 0), 'Label 1');
|
331
331
|
utilities.verifyTextContent(utilities.getNthElement(numberLineLabelPage.draggableLabelsPreviewTab(), 1), 'Label 2');
|
332
332
|
});
|