itemengine-cypress-automation 1.0.193-packageUpdated-b3f3d0b.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/videoResponsePage.js +350 -6
- package/package.json +1 -1
@@ -0,0 +1,229 @@
|
|
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 correct answer points are equal to alternate 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(20);
|
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 4'], [1, 2]);
|
53
|
+
});
|
54
|
+
|
55
|
+
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, 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(20, 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 correct accordion should be displayed', () => {
|
101
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
102
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(3);
|
103
|
+
imageHighlightPage.steps.verifyPreviewScore(10, 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 4'], [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 correct 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 4'], [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 correct answer responses, red cross-mark icon should be displayed beside responses from the alternative tab, correct answer section with all correct answers from the correct 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.verifyIncorrectHighlightRegion(1);
|
150
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
151
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(3);
|
152
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 4'], [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.verifyIncorrectHighlightRegion(1);
|
159
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
160
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(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 correct 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 4'], [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 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 with all correct answers from the correct 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.verifyIncorrectHighlightRegion(1);
|
194
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
195
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(3);
|
196
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 4'], [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.verifyIncorrectHighlightRegion(1);
|
203
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
204
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(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 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 4'], [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
|
+
});
|
@@ -0,0 +1,261 @@
|
|
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 correct answer points are greater than alternate 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(20);
|
35
|
+
imageHighlightPage.steps.clickOnAddAlternativeAnswerButton();
|
36
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(0);
|
37
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(1);
|
38
|
+
imageHighlightPage.steps.allotPoints(12);
|
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 4'], [1, 2]);
|
53
|
+
});
|
54
|
+
|
55
|
+
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, 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(20, 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 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, 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(12, 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 correct accordion should be displayed', () => {
|
101
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
102
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(3);
|
103
|
+
imageHighlightPage.steps.verifyPreviewScore(10, 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 4'], [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 correct accordion should be displayed', () => {
|
122
|
+
imageHighlightPage.steps.resetQuestionPreview();
|
123
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
124
|
+
imageHighlightPage.steps.verifyPreviewScore(6, 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 4'], [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 correct answer responses, red cross-mark icon should be displayed beside responses from the alternative tab, correct answer section with all correct answers from the correct 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.verifyIncorrectHighlightRegion(1);
|
150
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
151
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(3);
|
152
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 4'], [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.verifyIncorrectHighlightRegion(1);
|
159
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
160
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(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 correct 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 4'], [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 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 with all correct answers from the correct 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.verifyIncorrectHighlightRegion(1);
|
194
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
195
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(3);
|
196
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 4'], [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.verifyIncorrectHighlightRegion(1);
|
203
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
204
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(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 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 4'], [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 alternate tab than the correct tab but the score of the individual response selected from the correct tab overpowers the combined score of the alternate tab answers then green check-mark icons amd 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 alternate tab highlight regions and points awarded should be of the correct tab, the correct answers container should have answers of the correct 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(10);
|
235
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(1);
|
236
|
+
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(2);
|
237
|
+
imageHighlightPage.steps.expandCorrectAnswerAccordion();
|
238
|
+
imageHighlightPage.steps.allotPoints(50);
|
239
|
+
imageHighlightPage.steps.switchToPreviewTab();
|
240
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
241
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
242
|
+
imageHighlightPage.steps.highlightARegionInPreviewTab(2);
|
243
|
+
imageHighlightPage.steps.verifyPreviewScore(25, 50);
|
244
|
+
imageHighlightPage.steps.switchToGradingView();
|
245
|
+
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
246
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(1);
|
247
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(2);
|
248
|
+
imageHighlightPage.steps.verifyDefaultHighlightRegion(3);
|
249
|
+
imageHighlightPage.steps.verifyCorrectAnswerContainerContents(['Option 1', 'Option 4'], [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 crossmark 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.verifyCorrectHighlightRegion(0);
|
255
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(1);
|
256
|
+
imageHighlightPage.steps.verifyIncorrectHighlightRegion(2);
|
257
|
+
imageHighlightPage.steps.verifyHiddenHighlightRegion(3);
|
258
|
+
imageHighlightPage.steps.verifyCorrectIncorrectBorderNotExists();
|
259
|
+
});
|
260
|
+
});
|
261
|
+
});
|