itemengine-cypress-automation 1.0.193-packageUpdated-7f1e306.0 → 1.0.193-packageUpdated-0af2e49.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +3 -3
- package/cypress/e2e/ILC/AudioPlayerNew/audioOverviewAndTranscript.js +568 -0
- package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +4 -4
- package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +5 -5
- package/cypress/e2e/ILC/AudioPlayerNew/customizePlayerLayoutSettings.js +2 -2
- package/cypress/e2e/ILC/AudioPlayerNew/headerSection.js +125 -0
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +5 -5
- package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +4 -4
- package/cypress/e2e/ILC/AudioPlayerNew/studentViewSettings.js +3 -3
- package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +19 -17
- package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +7 -4
- package/cypress/e2e/ILC/ChartsLine/allOrNothingScoringForAllViews.smoke.js +366 -0
- package/cypress/e2e/ILC/ChartsLine/checkAnswerFunctionalityForAllViews.smoke.js +183 -0
- package/cypress/e2e/ILC/ChartsLine/gradingViewAndCorrectAnswerView.smoke.js +281 -0
- package/cypress/e2e/ILC/ChartsLine/previewContentsForAllViews.smoke.js +595 -0
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +8 -8
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +241 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +241 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternatePoints.js +285 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/manuallyAndNonScored.js +164 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +281 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsScoring.js +467 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +250 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialDifferentWeigtsCorrectPointsGreaterThanAlternativePoints.js +281 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +260 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsScoring.js +184 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +229 -0
- package/cypress/e2e/ILC/ImageHighlight/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +261 -0
- package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +409 -0
- package/cypress/e2e/ILC/chartsDotsPlot/checkAnswerFunctionalityForAllViews.smoke.js +199 -0
- package/cypress/e2e/ILC/chartsDotsPlot/gradingViewAndCorrectAnswerView.smoke.js +223 -0
- package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +402 -0
- package/cypress/pages/audioPlayerPage.js +229 -9
- package/cypress/pages/chartsBarPage.js +2 -70
- package/cypress/pages/chartsDotPlotPage.js +986 -3
- package/cypress/pages/chartsLinePage.js +368 -9
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +0 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/barAndLineChartComponent.js +27 -1
- package/cypress/pages/components/chartsCommonComponent.js +31 -2
- package/cypress/pages/components/createQuestionBasePage.js +1 -0
- package/cypress/pages/components/layoutSectionComponent.js +2 -2
- package/cypress/pages/components/singleMultipleSelectionModeComponent.js +5 -0
- package/cypress/pages/components/toolSettingsComponent.js +2 -2
- package/cypress/pages/feedbackScalePage.js +1 -1
- package/cypress/pages/gridFillPage.js +13 -6
- package/cypress/pages/imageHighlightPage.js +308 -2
- package/cypress/pages/numberLinePage.js +40 -16
- package/cypress/pages/textEntryMathPage.js +1 -1
- package/cypress/pages/videoResponsePage.js +350 -6
- package/package.json +1 -1
- package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +0 -366
@@ -0,0 +1,260 @@
|
|
1
|
+
import { imageHighlightPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const flowerHighlightRegion = [[40, 6], [40, 20], [55, 20], [55, 6]];
|
7
|
+
const branchesHighlightRegion = [[50, 30], [50, 42], [65, 42], [65, 30]];
|
8
|
+
const leafHighlightRegion = [[26, 26], [26, 36], [48, 36], [48, 26]];
|
9
|
+
const rootsHighlightRegion = [[45, 45], [45, 55], [57, 55], [57, 45]];
|
10
|
+
|
11
|
+
describe('Create Item page - Image highlight: Partial equal weights with alternative answers', () => {
|
12
|
+
before(() => {
|
13
|
+
cy.loginAs('admin');
|
14
|
+
});
|
15
|
+
|
16
|
+
describe('Question Preview: AutoScored - Partial equal weights with alternate answer: When alternative answer points are more than correct answer points', () => {
|
17
|
+
abortEarlySetup();
|
18
|
+
before(() => {
|
19
|
+
cy.log('Navigating to highlight image question type');
|
20
|
+
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
21
|
+
cy.barsPreLoaderWait();
|
22
|
+
imageHighlightPage.steps.addQuestionInstructions();
|
23
|
+
imageHighlightPage.steps.uploadFile('highlightImage.jpg');
|
24
|
+
imageHighlightPage.steps.verifyImageUploadedInSpecifyPossibleOptionsSection();
|
25
|
+
imageHighlightPage.steps.verifyImageUploadedSpecifyCorrectAnswer();
|
26
|
+
imageHighlightPage.steps.highlightRegionInImage(flowerHighlightRegion);
|
27
|
+
imageHighlightPage.steps.highlightRegionInImage(branchesHighlightRegion);
|
28
|
+
imageHighlightPage.steps.highlightRegionInImage(leafHighlightRegion);
|
29
|
+
imageHighlightPage.steps.highlightRegionInImage(rootsHighlightRegion);
|
30
|
+
imageHighlightPage.steps.selectMultipleSelectionToggle();
|
31
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(0);
|
32
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(3);
|
33
|
+
imageHighlightPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
34
|
+
imageHighlightPage.steps.allotPoints(12);
|
35
|
+
imageHighlightPage.steps.clickOnAddAlternativeAnswerButton();
|
36
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(0);
|
37
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(1);
|
38
|
+
imageHighlightPage.steps.allotPoints(20);
|
39
|
+
imageHighlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
40
|
+
imageHighlightPage.steps.switchToPreviewTab();
|
41
|
+
});
|
42
|
+
|
43
|
+
it('When the user switches to \'Grading view\' without attempting the question then the no regions should be highlighted, \'Your answer is incorrect\' label should be displayed and the correct answer section with the answers of the correct accordion should be displayed', () => {
|
44
|
+
cy.log('Total points displayed besides Show correct answer checkbox should be of alternate answer points')
|
45
|
+
imageHighlightPage.steps.verifyPreviewScore(0, 20);
|
46
|
+
imageHighlightPage.steps.switchToGradingView();
|
47
|
+
imageHighlightPage.steps.verifyHighlightRegionNumerationPreviewTab()
|
48
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(0);
|
49
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
|
50
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
51
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(3);
|
52
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2'], [1, 2]);
|
53
|
+
});
|
54
|
+
|
55
|
+
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points specified for the correct accordion(less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, correct answer section should not be displayed', () => {
|
56
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
57
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
58
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(3);
|
59
|
+
imageHighlightPage.steps.verifyPreviewScore(12, 20);
|
60
|
+
imageHighlightPage.steps.switchToGradingView();
|
61
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
62
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
|
63
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
64
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(3);
|
65
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
66
|
+
utilities.verifyElementVisibilityState(imageHighlightPage.correctIncorrectAnswerTextWrapper(), 'notExist');
|
67
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
68
|
+
|
69
|
+
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, correct answer section should not be displayed')
|
70
|
+
imageHighlightPage.steps.checkAnswer();
|
71
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
72
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(1);
|
73
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
74
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(3);
|
75
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
76
|
+
});
|
77
|
+
|
78
|
+
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, correct answer section should not be displayed', () => {
|
79
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
80
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
81
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
82
|
+
imageHighlightPage.steps.verifyPreviewScore(20, 20);
|
83
|
+
imageHighlightPage.steps.switchToGradingView();
|
84
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
85
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
86
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
87
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(3);
|
88
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
89
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
90
|
+
|
91
|
+
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, correct answer section should not be displayed')
|
92
|
+
imageHighlightPage.steps.checkAnswer();
|
93
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
94
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
95
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
96
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(3);
|
97
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
98
|
+
});
|
99
|
+
|
100
|
+
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 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 correct answer section with all correct answers from the alternative accordion should be displayed', () => {
|
101
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
102
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(3);
|
103
|
+
imageHighlightPage.steps.verifyPreviewScore(6, 20);
|
104
|
+
imageHighlightPage.steps.switchToGradingView();
|
105
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(0);
|
106
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
|
107
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
108
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(3);
|
109
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2'], [1, 2]);
|
110
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
111
|
+
|
112
|
+
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, correct answer section should not be displayed')
|
113
|
+
imageHighlightPage.steps.checkAnswer();
|
114
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(0);
|
115
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(1);
|
116
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
117
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(3);
|
118
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
119
|
+
});
|
120
|
+
|
121
|
+
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 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 correct answer section with all correct answers from the alternative accordion should be displayed', () => {
|
122
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
123
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
124
|
+
imageHighlightPage.steps.verifyPreviewScore(10, 20);
|
125
|
+
imageHighlightPage.steps.switchToGradingView();
|
126
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(0);
|
127
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
128
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
129
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(3);
|
130
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2'], [1, 2]);
|
131
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
132
|
+
|
133
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response correct answer section should not be displayed')
|
134
|
+
imageHighlightPage.steps.checkAnswer();
|
135
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(0);
|
136
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
137
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
138
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(3);
|
139
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
140
|
+
});
|
141
|
+
|
142
|
+
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 attempted response 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 tab, correct answer section with all correct answers from the alternative accordion should be displayed', () => {
|
143
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
144
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
145
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(3);
|
146
|
+
imageHighlightPage.steps.verifyPreviewScore(10, 20);
|
147
|
+
imageHighlightPage.steps.switchToGradingView();
|
148
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(0);
|
149
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
150
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
151
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(3);
|
152
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2'], [1, 2]);
|
153
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
154
|
+
|
155
|
+
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 correct answer section should not be displayed')
|
156
|
+
imageHighlightPage.steps.checkAnswer();
|
157
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(0);
|
158
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
159
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
160
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(3);
|
161
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
162
|
+
});
|
163
|
+
|
164
|
+
it('Race condition 1: 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 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, correct answer section with all correct answers from the alternative accordion should be displayed', () => {
|
165
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
166
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
167
|
+
imageHighlightPage.steps.verifyPreviewScore(10, 20);
|
168
|
+
imageHighlightPage.steps.switchToGradingView();
|
169
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
170
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
|
171
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
172
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(3);
|
173
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2'], [1, 2]);
|
174
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
175
|
+
|
176
|
+
cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response correct answer section should not be displayed')
|
177
|
+
imageHighlightPage.steps.checkAnswer();
|
178
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
179
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(1);
|
180
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
181
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(3);
|
182
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
183
|
+
});
|
184
|
+
|
185
|
+
it('Race condition 2: When the user attempts the question partially correct with all the responses then the user should be awarded points of the attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the response from the alternative accordion, incorrect icon should be displayed besides the responses from the correct accordion and no icon should be displayed beside unattempted response, correct answer section with all correct answers from the alternative accordion should be displayed', () => {
|
186
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
187
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
188
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
189
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(3);
|
190
|
+
imageHighlightPage.steps.verifyPreviewScore(20, 20);
|
191
|
+
imageHighlightPage.steps.switchToGradingView();
|
192
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
193
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
194
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
195
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(3);
|
196
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2'], [1, 2]);
|
197
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
198
|
+
|
199
|
+
cy.log('When the user has attempted the question with partially correct with all the response and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, correct answer section should not be displayed')
|
200
|
+
imageHighlightPage.steps.checkAnswer();
|
201
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
202
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
203
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
204
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(3);
|
205
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
206
|
+
});
|
207
|
+
|
208
|
+
it('When the user attempts the question incorrectly, then the user should be awarded points of the attempted response and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, no icon should be displayed beside unattempted response correct answer section with all correct answers from the alternative accordion should be displayed', () => {
|
209
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
210
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(2);
|
211
|
+
imageHighlightPage.steps.verifyPreviewScore(0, 20);
|
212
|
+
imageHighlightPage.steps.switchToGradingView();
|
213
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(0);
|
214
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
|
215
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(2);
|
216
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(3);
|
217
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2'], [1, 2]);
|
218
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
219
|
+
|
220
|
+
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, no icon should be displayed beside unattempted response correct answer section should not be displayed')
|
221
|
+
imageHighlightPage.steps.checkAnswer();
|
222
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(0);
|
223
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(1);
|
224
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(2);
|
225
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(3);
|
226
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
227
|
+
});
|
228
|
+
|
229
|
+
it('Overachiever case: When the user attempts the question with more number of correct options from the correct tab than the alternate tab but the score of the individual response selected from the alternate tab overpowers the combined score of the correct tab answers then green check-mark icons and green background should be displayed should be displayed for the correct tab highlight regions, red cross-mark icon and red background should be displayed for the selected correct tab highlight regions and points awarded should be of the alternate tab, the correct answers container should have answers of the alternate tab for the incorrectly selected highlight regions and correct/incorrect answer label and its border should not be displayed', () => {
|
230
|
+
cy.log('(Overachiever case) Pre-step: Switching to Edit tab and allotting points to correct and alternate tab such that the difference between the points is substantial and the points per response are in decimal')
|
231
|
+
imageHighlightPage.steps.switchToEditTab();
|
232
|
+
imageHighlightPage.steps.deleteAlternativeAnswerAccordion(0);
|
233
|
+
imageHighlightPage.steps.addAlternativeAnswerAccordion(1);
|
234
|
+
imageHighlightPage.steps.allotPoints(50);
|
235
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(1);
|
236
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(2);
|
237
|
+
imageHighlightPage.steps.expandCorrectAnswerAccordion();
|
238
|
+
imageHighlightPage.steps.allotPoints(10);
|
239
|
+
imageHighlightPage.steps.switchToPreviewTab();
|
240
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
241
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(2);
|
242
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(3);
|
243
|
+
imageHighlightPage.steps.verifyPreviewScore(25, 50);
|
244
|
+
imageHighlightPage.steps.switchToGradingView();
|
245
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(0);
|
246
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
|
247
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(2);
|
248
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(3);
|
249
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 2', 'Option 3'], [1, 2]);
|
250
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
251
|
+
|
252
|
+
cy.log('Overachiever case: When the user clicks on \'Check answer\' button, green check-mark icons should be displayed for the correct tab option, red cross-mark icon should be displayed for the alternate tab options, correct answers container should not be displayed and correct/incorrect answer label and its border should not be displayed')
|
253
|
+
imageHighlightPage.steps.checkAnswer();
|
254
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(0);
|
255
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(1);
|
256
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(2);
|
257
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(3);
|
258
|
+
});
|
259
|
+
});
|
260
|
+
});
|
@@ -0,0 +1,184 @@
|
|
1
|
+
import { imageHighlightPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
|
5
|
+
const flowerHighlightRegion = [[40, 6], [40, 20], [55, 20], [55, 6]];
|
6
|
+
const branchesHighlightRegion = [[50, 30], [50, 42], [65, 42], [65, 30]];
|
7
|
+
const leafHighlightRegion = [[26, 26], [26, 36], [48, 36], [48, 26]];
|
8
|
+
const rootsHighlightRegion = [[45, 45], [45, 55], [57, 55], [57, 45]];
|
9
|
+
|
10
|
+
describe('Create item page - Image highlight: Partial equal weights', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
describe('Auto scored - Partial equal weights', () => {
|
16
|
+
abortEarlySetup();
|
17
|
+
before(() => {
|
18
|
+
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
19
|
+
imageHighlightPage.steps.addTextInQuestionInstructionsInputField('Select the appropriate highlight in the image below');
|
20
|
+
imageHighlightPage.steps.uploadFile('highlightImage.jpg');
|
21
|
+
imageHighlightPage.steps.verifyImageUploadedInSpecifyPossibleOptionsSection();
|
22
|
+
imageHighlightPage.steps.verifyImageUploadedSpecifyCorrectAnswer();
|
23
|
+
imageHighlightPage.steps.highlightRegionInImage(flowerHighlightRegion);
|
24
|
+
imageHighlightPage.steps.highlightRegionInImage(branchesHighlightRegion);
|
25
|
+
imageHighlightPage.steps.highlightRegionInImage(leafHighlightRegion);
|
26
|
+
imageHighlightPage.steps.highlightRegionInImage(rootsHighlightRegion);
|
27
|
+
imageHighlightPage.steps.selectMultipleSelectionToggle();
|
28
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(0);
|
29
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(1);
|
30
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(2);
|
31
|
+
imageHighlightPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
32
|
+
imageHighlightPage.steps.allotPoints(15);
|
33
|
+
imageHighlightPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
34
|
+
imageHighlightPage.steps.switchToPreviewTab();
|
35
|
+
});
|
36
|
+
|
37
|
+
it('When the user selects \'Grading\' view without attempting the question, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
|
38
|
+
imageHighlightPage.steps.verifyPreviewScore(0, 15);
|
39
|
+
imageHighlightPage.steps.switchToGradingView();
|
40
|
+
imageHighlightPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
41
|
+
utilities.verifyInnerText(imageHighlightPage.correctAnswersLabel(), 'Correct answers');
|
42
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2', 'Option 3'], [1, 2, 3]);
|
43
|
+
});
|
44
|
+
|
45
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message should not be displayed and correct answer section with all correct answers along with numeration should be displayed', () => {
|
46
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(3);
|
47
|
+
imageHighlightPage.steps.verifyPreviewScore(0, 15);
|
48
|
+
imageHighlightPage.steps.switchToGradingView();
|
49
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(0);
|
50
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
|
51
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
52
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(3);
|
53
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2', 'Option 3'], [1, 2, 3]);
|
54
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
55
|
+
cy.log('When user clicks on Check answer button after he attempts the question incorrectly incorrect icons should be displayed besides all incorrect responses, status message and correct answer section should not be displayed')
|
56
|
+
imageHighlightPage.steps.checkAnswer();
|
57
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(0);
|
58
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(1);
|
59
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
60
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(3);
|
61
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
62
|
+
});
|
63
|
+
|
64
|
+
it('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options, 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, incorrect icon should be displayed besides incorrect answer response, a status message should not be displayed and correct answer section with all correct answers along with numeration should be displayed', () => {
|
65
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
66
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(3);
|
67
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
68
|
+
imageHighlightPage.steps.verifyPreviewScore(5, 15);
|
69
|
+
imageHighlightPage.steps.switchToGradingView();
|
70
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
71
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
|
72
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
73
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(3);
|
74
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2', 'Option 3'], [1, 2, 3]);
|
75
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
76
|
+
cy.log('When user clicks on Check answer button after he attempts the question partially correct with some correct, some incomplete, some incorrect options, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, status message and correct answer section should not be displayed')
|
77
|
+
imageHighlightPage.steps.checkAnswer();
|
78
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
79
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(1);
|
80
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
81
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(3);
|
82
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
83
|
+
});
|
84
|
+
|
85
|
+
it('When the user attempts the question partially correct with all the responses correctly attempted 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 correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message should not be displayed and correct answer section with all correct answers along with numeration should be displayed', () => {
|
86
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
87
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
88
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
89
|
+
imageHighlightPage.steps.verifyPreviewScore(10, 15);
|
90
|
+
imageHighlightPage.steps.switchToGradingView();
|
91
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
92
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
93
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
94
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(3);
|
95
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 2', 'Option 3'], [1, 2, 3]);
|
96
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
97
|
+
cy.log('When user clicks on Check answer button after he attempts the question partially correct with all the response correctly attempted but one response incomplete then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, status message and correct answer section should not be displayed')
|
98
|
+
imageHighlightPage.steps.checkAnswer();
|
99
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
100
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
101
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
102
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(3);
|
103
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
104
|
+
});
|
105
|
+
|
106
|
+
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message and correct answer section should not be displayed', () => {
|
107
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
108
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
109
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
110
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(2);
|
111
|
+
imageHighlightPage.steps.verifyPreviewScore(15, 15);
|
112
|
+
imageHighlightPage.steps.switchToGradingView();
|
113
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
114
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
115
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(2);
|
116
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(3);
|
117
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
118
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
119
|
+
cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed besides the correct answer responses, status message and correct answer section should not be displayed')
|
120
|
+
imageHighlightPage.steps.checkAnswer();
|
121
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
122
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
123
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(2);
|
124
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(3);
|
125
|
+
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
126
|
+
});
|
127
|
+
});
|
128
|
+
|
129
|
+
describe('Question preview: Auto scored - Partial equal weights: Minimum scoring', () => {
|
130
|
+
abortEarlySetup();
|
131
|
+
before(() => {
|
132
|
+
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
133
|
+
imageHighlightPage.steps.addTextInQuestionInstructionsInputField('Select the appropriate highlight in the image below');
|
134
|
+
imageHighlightPage.steps.uploadFile('highlightImage.jpg');
|
135
|
+
imageHighlightPage.steps.verifyImageUploadedInSpecifyPossibleOptionsSection();
|
136
|
+
imageHighlightPage.steps.verifyImageUploadedSpecifyCorrectAnswer();
|
137
|
+
imageHighlightPage.steps.highlightRegionInImage(flowerHighlightRegion);
|
138
|
+
imageHighlightPage.steps.highlightRegionInImage(branchesHighlightRegion);
|
139
|
+
imageHighlightPage.steps.highlightRegionInImage(leafHighlightRegion);
|
140
|
+
imageHighlightPage.steps.highlightRegionInImage(rootsHighlightRegion);
|
141
|
+
imageHighlightPage.steps.selectMultipleSelectionToggle();
|
142
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(0);
|
143
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(1);
|
144
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(2);
|
145
|
+
imageHighlightPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
146
|
+
imageHighlightPage.steps.allotPoints(15);
|
147
|
+
imageHighlightPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
148
|
+
});
|
149
|
+
|
150
|
+
it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
|
151
|
+
imageHighlightPage.steps.expandMinimumScoringDropdown();
|
152
|
+
imageHighlightPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
|
153
|
+
imageHighlightPage.steps.allotMinimumPoints(2);
|
154
|
+
imageHighlightPage.steps.switchToPreviewTab();
|
155
|
+
imageHighlightPage.steps.switchToGradingView();
|
156
|
+
imageHighlightPage.steps.verifyPreviewScore(2, 15);
|
157
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
158
|
+
});
|
159
|
+
|
160
|
+
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
161
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
162
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(3);
|
163
|
+
imageHighlightPage.steps.verifyPreviewScore(2, 15);
|
164
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
165
|
+
});
|
166
|
+
|
167
|
+
it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with 0 points', () => {
|
168
|
+
imageHighlightPage.steps.switchToEditTab();
|
169
|
+
imageHighlightPage.steps.expandMinimumScoringDropdown();
|
170
|
+
imageHighlightPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
171
|
+
imageHighlightPage.steps.allotMinimumPoints(2);
|
172
|
+
imageHighlightPage.steps.switchToPreviewTab();
|
173
|
+
imageHighlightPage.steps.switchToGradingView();
|
174
|
+
imageHighlightPage.steps.verifyPreviewScore(0, 15);
|
175
|
+
imageHighlightPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
176
|
+
});
|
177
|
+
|
178
|
+
it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
|
179
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
180
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(3);
|
181
|
+
imageHighlightPage.steps.verifyPreviewScore(2, 15);
|
182
|
+
});
|
183
|
+
});
|
184
|
+
});
|