itemengine-cypress-automation 1.0.119 → 1.0.121
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +13 -1
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -0
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +2 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +273 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAnswerFunctionalityForAllViews.smoke.js +116 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +136 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +120 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViews.smoke.js +158 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +246 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +332 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +409 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +80 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +68 -68
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +3 -289
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -23
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +191 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +190 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +284 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +113 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +234 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsBasic.js +136 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +197 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +169 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +197 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +219 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAnswerFunctionalityForAllViews.smoke.js +115 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +142 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViews.smoke.js +152 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +39 -0
- package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +2 -12
- package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +497 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +503 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +233 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +291 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +332 -0
- package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +2 -12
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +9 -8
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -2
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +5 -2
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +334 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +419 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +166 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +166 -0
- package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +51 -0
- package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +99 -0
- package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +71 -0
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +155 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +66 -0
- package/cypress/e2e/migration/migration.js +6 -5
- package/cypress/e2e/migration/migration2.js +4 -3
- package/cypress/e2e/migration/migration3.js +4 -3
- package/cypress/e2e/migration/migration4.js +4 -3
- package/cypress/e2e/migration/migration5.js +4 -3
- package/cypress/fixtures/theme/ilc.json +3 -1
- package/cypress/pages/audioResponsePage.js +2 -1
- package/cypress/pages/components/additionalSettingsPanel.js +27 -0
- package/cypress/pages/components/autoScoredPreviewBase.js +1 -1
- package/cypress/pages/components/autoScoredScoringSection.js +1 -1
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +1 -1
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +2 -2
- package/cypress/pages/components/autoScoredStudentViewSettings.js +8 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +5 -5
- package/cypress/pages/components/createQuestionBasePage.js +8 -2
- package/cypress/pages/components/essayResponseCommonComponents.js +6 -0
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +13 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +40 -0
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +422 -314
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +438 -710
- package/cypress/pages/components/{figOverImageCanvasComponent.js → imageCanvasComponent.js} +274 -272
- package/cypress/pages/components/index.js +3 -3
- package/cypress/pages/components/maximumRecorderLengthComponent.js +55 -11
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +1 -1
- package/cypress/pages/components/questionInputFieldComponent.js +49 -23
- package/cypress/pages/components/scoringSectionBase.js +1 -1
- package/cypress/pages/createItemPage.js +67 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +172 -711
- package/cypress/pages/fillInTheGapsDropdownPage.js +75 -72
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +4 -4
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +109 -273
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +49 -291
- package/cypress/pages/fillInTheGapsTextPage.js +52 -199
- package/cypress/pages/index.js +5 -5
- package/cypress/pages/multipleSelectionPage.js +1 -0
- package/cypress/pages/shortTextResponsePage.js +575 -33
- package/cypress/pages/singleSelectionGridPage.js +1 -2
- package/cypress/pages/singleSelectionPage.js +5 -6
- package/cypress/pages/textEntryMathPage.js +46 -22
- package/cypress/pages/textEntryMathWithImagePage.js +212 -0
- package/cypress/pages/uploadResponsePage.js +74 -21
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +73 -2
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +49 -2
- package/package.json +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +0 -482
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +0 -412
- package/cypress/pages/components/figOverImageCommonComponent.js +0 -1113
- package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +0 -1155
- package/cypress/pages/dragAndDropIntoCategoriesCellsScoring.js +0 -1561
- package/cypress/pages/dragAndDropIntoCategoriesResponseScoring.js +0 -1396
- package/cypress/pages/fillInTheGapsScoring.js +0 -5872
- package/cypress/pages/fillInTheGapsSetCorrectAnswerSection.js +0 -260
@@ -1,260 +0,0 @@
|
|
1
|
-
import { fillInTheGapsTextPage } from "./fillInTheGapsTextPage";
|
2
|
-
import { fillInTheGapsDropdownPage } from "./fillInTheGapsDropdownPage";
|
3
|
-
import { autoScoredScoringSectionMultipleResponsesType, fillInTheGapsCommonComponents, scoringSectionBase } from "./components";
|
4
|
-
import { autoScoredSetCorrectAnswerSection } from "./components";
|
5
|
-
|
6
|
-
const tests = {
|
7
|
-
verifyPointsInEditTabForAutoScoredAllOrNothingWhenMatchFromAllResponsesIsTrue: (questionType) => {
|
8
|
-
it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
|
9
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerButton()
|
10
|
-
.click();
|
11
|
-
switch (questionType) {
|
12
|
-
case 'fill in the gaps - text':
|
13
|
-
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 3', 'Response 4']);
|
14
|
-
break;
|
15
|
-
case 'fill in the gaps - dropdown':
|
16
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'healthy');
|
17
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'decreasingly');
|
18
|
-
break;
|
19
|
-
default:
|
20
|
-
throw new Error('Invalid question type');
|
21
|
-
};
|
22
|
-
scoringSectionBase.steps.allotPoints(3);
|
23
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
24
|
-
.click()
|
25
|
-
.should('be.checked');
|
26
|
-
scoringSectionBase.pointsInputField()
|
27
|
-
.should('have.value', '7')
|
28
|
-
.and('be.disabled');
|
29
|
-
});
|
30
|
-
|
31
|
-
it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
|
32
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerButton()
|
33
|
-
.click();
|
34
|
-
scoringSectionBase.pointsInputField()
|
35
|
-
.should('have.value', '7')
|
36
|
-
.and('be.disabled');
|
37
|
-
});
|
38
|
-
|
39
|
-
it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
|
40
|
-
cy.log('Pre:step - unchecking the \'Match from all responses\' checkbox and updating the points')
|
41
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
42
|
-
.click()
|
43
|
-
.should('not.be.checked');
|
44
|
-
switch (questionType) {
|
45
|
-
case 'fill in the gaps - text':
|
46
|
-
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 5', 'Response 6']);
|
47
|
-
break;
|
48
|
-
case 'fill in the gaps - dropdown':
|
49
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'progressively');
|
50
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'decreasingly');
|
51
|
-
break;
|
52
|
-
default:
|
53
|
-
throw new Error('Invalid question type');
|
54
|
-
};
|
55
|
-
scoringSectionBase.pointsInputField()
|
56
|
-
.type('10');
|
57
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
58
|
-
.click()
|
59
|
-
.should('be.checked');
|
60
|
-
scoringSectionBase.pointsInputField()
|
61
|
-
.should('have.value', '7')
|
62
|
-
.and('be.disabled');
|
63
|
-
});
|
64
|
-
|
65
|
-
it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
|
66
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
67
|
-
.click()
|
68
|
-
.should('not.be.checked');
|
69
|
-
scoringSectionBase.pointsInputField()
|
70
|
-
.should('have.value', '10');
|
71
|
-
autoScoredSetCorrectAnswerSection.correctTab()
|
72
|
-
.click();
|
73
|
-
scoringSectionBase.pointsInputField()
|
74
|
-
.should('have.value', '7');
|
75
|
-
});
|
76
|
-
},
|
77
|
-
|
78
|
-
verifyPointsInEditTabForAutoScoredPartialEqualWeightsWhenMatchFromAllResponsesIsTrue: (questionType) => {
|
79
|
-
it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
|
80
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerButton()
|
81
|
-
.click();
|
82
|
-
switch (questionType) {
|
83
|
-
case 'fill in the gaps - text':
|
84
|
-
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 3', 'Response 4']);
|
85
|
-
break;
|
86
|
-
case 'fill in the gaps - dropdown':
|
87
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'healthy');
|
88
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'decreasingly');
|
89
|
-
break;
|
90
|
-
default:
|
91
|
-
throw new Error('Invalid question type');
|
92
|
-
};
|
93
|
-
scoringSectionBase.steps.allotPoints(3);
|
94
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
95
|
-
.click()
|
96
|
-
.should('be.checked');
|
97
|
-
scoringSectionBase.pointsInputField()
|
98
|
-
.should('have.value', '7')
|
99
|
-
.and('be.disabled');
|
100
|
-
fillInTheGapsCommonComponents.partialEqualWeightsPointsPerResponseScore()
|
101
|
-
.each(($element) => {
|
102
|
-
cy.wrap($element)
|
103
|
-
.verifyInnerText('3.5');
|
104
|
-
});
|
105
|
-
});
|
106
|
-
|
107
|
-
it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
|
108
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerButton()
|
109
|
-
.click();
|
110
|
-
scoringSectionBase.pointsInputField()
|
111
|
-
.should('have.value', '7')
|
112
|
-
.and('be.disabled');
|
113
|
-
fillInTheGapsCommonComponents.partialEqualWeightsPointsPerResponseScore()
|
114
|
-
.each(($element) => {
|
115
|
-
cy.wrap($element)
|
116
|
-
.verifyInnerText('3.5');
|
117
|
-
});
|
118
|
-
});
|
119
|
-
|
120
|
-
it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
|
121
|
-
switch (questionType) {
|
122
|
-
case 'fill in the gaps - text':
|
123
|
-
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 5', 'Response 6']);
|
124
|
-
break;
|
125
|
-
case 'fill in the gaps - dropdown':
|
126
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'progressively');
|
127
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'decreasingly');
|
128
|
-
break;
|
129
|
-
default:
|
130
|
-
throw new Error('Invalid question type');
|
131
|
-
};
|
132
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
133
|
-
.click()
|
134
|
-
.should('not.be.checked');
|
135
|
-
scoringSectionBase.pointsInputField()
|
136
|
-
.type(10);
|
137
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
138
|
-
.click()
|
139
|
-
.should('be.checked');
|
140
|
-
scoringSectionBase.pointsInputField()
|
141
|
-
.should('have.value', '7')
|
142
|
-
.and('be.disabled');
|
143
|
-
fillInTheGapsCommonComponents.partialEqualWeightsPointsPerResponseScore()
|
144
|
-
.each(($element) => {
|
145
|
-
cy.wrap($element)
|
146
|
-
.verifyInnerText('3.5');
|
147
|
-
});
|
148
|
-
});
|
149
|
-
|
150
|
-
it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
|
151
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
152
|
-
.click()
|
153
|
-
.should('not.be.checked');
|
154
|
-
scoringSectionBase.pointsInputField()
|
155
|
-
.should('have.value', '10');
|
156
|
-
fillInTheGapsCommonComponents.partialEqualWeightsPointsPerResponseScore()
|
157
|
-
.each(($element) => {
|
158
|
-
cy.wrap($element)
|
159
|
-
.verifyInnerText('5');
|
160
|
-
});
|
161
|
-
autoScoredSetCorrectAnswerSection.correctTab()
|
162
|
-
.click();
|
163
|
-
scoringSectionBase.pointsInputField()
|
164
|
-
.should('have.value', '7');
|
165
|
-
});
|
166
|
-
},
|
167
|
-
|
168
|
-
verifyPointsInEditTabForAutoScoredPartialDifferentWeightsWhenMatchFromAllResponsesIsTrue: (questionType) => {
|
169
|
-
let partialDifferentWeightPoints = [1, 7];
|
170
|
-
it('When the user adds alternate answer and enables the \'Match from all responses\' functionality, the points field should be in disabled state and should have the value of points same as set in the \'Correct\' tab', () => {
|
171
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerButton()
|
172
|
-
.click();
|
173
|
-
switch (questionType) {
|
174
|
-
case 'fill in the gaps - text':
|
175
|
-
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 3', 'Response 4']);
|
176
|
-
break;
|
177
|
-
case 'fill in the gaps - dropdown':
|
178
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'healthy');
|
179
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'decreasingly');
|
180
|
-
break;
|
181
|
-
default:
|
182
|
-
throw new Error('Invalid question type');
|
183
|
-
};
|
184
|
-
autoScoredScoringSectionMultipleResponsesType.steps.addPartialDifferentWeightsPoints([2, 8]);
|
185
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
186
|
-
.click()
|
187
|
-
.should('be.checked');
|
188
|
-
partialDifferentWeightPoints.forEach((points, count) => {
|
189
|
-
scoringSectionBase.pointsInputField()
|
190
|
-
.eq(count)
|
191
|
-
.should('have.value', points)
|
192
|
-
.and('be.disabled');
|
193
|
-
});
|
194
|
-
});
|
195
|
-
|
196
|
-
it('When the user adds another tab, the new alternate answer tab should also have the same point value as the \'Correct\' tab', () => {
|
197
|
-
autoScoredSetCorrectAnswerSection.alternateAnswerButton()
|
198
|
-
.click();
|
199
|
-
partialDifferentWeightPoints.forEach((points, count) => {
|
200
|
-
scoringSectionBase.pointsInputField()
|
201
|
-
.eq(count)
|
202
|
-
.should('have.value', points)
|
203
|
-
.and('be.disabled');
|
204
|
-
});
|
205
|
-
});
|
206
|
-
|
207
|
-
//https://redmine.zeuslearning.com/issues/528115
|
208
|
-
it('When the user has already set different points in the alternate answer tab and then enables the \'Match from all responses\' functionality, the points field in the \'Alternate\' tab should get disabled and should have the value of points same as set in the \'Correct\' tab', () => {
|
209
|
-
cy.log('Pre:step - unchecking the \'Match from all responses\' checkbox and updating the points')
|
210
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
211
|
-
.click()
|
212
|
-
.should('not.be.checked');
|
213
|
-
switch (questionType) {
|
214
|
-
case 'fill in the gaps - text':
|
215
|
-
fillInTheGapsTextPage.steps.setCorrectAnswerResponses(['Response 5', 'Response 6']);
|
216
|
-
break;
|
217
|
-
case 'fill in the gaps - dropdown':
|
218
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(0, 'progressively');
|
219
|
-
fillInTheGapsDropdownPage.steps.selectResponseFromSetCorrectAnswerSectionResponseDropdown(1, 'decreasingly');
|
220
|
-
break;
|
221
|
-
default:
|
222
|
-
throw new Error('Invalid question type');
|
223
|
-
};
|
224
|
-
autoScoredScoringSectionMultipleResponsesType.steps.addPartialDifferentWeightsPoints([3, 9]);
|
225
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
226
|
-
.click()
|
227
|
-
.should('be.checked');
|
228
|
-
partialDifferentWeightPoints.forEach((points, count) => {
|
229
|
-
scoringSectionBase.pointsInputField()
|
230
|
-
.eq(count)
|
231
|
-
.should('have.value', points)
|
232
|
-
.and('be.disabled');
|
233
|
-
});
|
234
|
-
});
|
235
|
-
|
236
|
-
it('When the user disables the \'Match from all responses\' functionality, the score should go back to their previously set values', () => {
|
237
|
-
let pointsSetInAlternateTab = [3, 9];
|
238
|
-
let pointsSetInCorrectTab = [1, 7];
|
239
|
-
fillInTheGapsCommonComponents.matchFromAllResponsesCheckbox()
|
240
|
-
.click()
|
241
|
-
.should('not.be.checked');
|
242
|
-
pointsSetInAlternateTab.forEach((points, count) => {
|
243
|
-
scoringSectionBase.pointsInputField()
|
244
|
-
.eq(count)
|
245
|
-
.should('have.value', points);
|
246
|
-
});
|
247
|
-
autoScoredSetCorrectAnswerSection.correctTab()
|
248
|
-
.click();
|
249
|
-
pointsSetInCorrectTab.forEach((points, count) => {
|
250
|
-
scoringSectionBase.pointsInputField()
|
251
|
-
.eq(count)
|
252
|
-
.should('have.value', points);
|
253
|
-
});
|
254
|
-
});
|
255
|
-
}
|
256
|
-
}
|
257
|
-
|
258
|
-
export const fillInTheGapsSetCorrectAnswerSection = {
|
259
|
-
tests
|
260
|
-
}
|