itemengine-cypress-automation 1.0.166-migrationScripts-b8c79a0.0 → 1.0.166
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +83 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +200 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +56 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +95 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +71 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +72 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +71 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +22 -11
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +161 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +308 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +216 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +336 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +570 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +356 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +299 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +18 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +11 -6
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +355 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +2 -36
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +22 -34
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +8 -24
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +5 -25
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +68 -114
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +67 -111
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +71 -123
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +41 -63
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +21 -25
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +50 -85
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +68 -115
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +54 -98
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +72 -120
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +309 -0
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/Matching/toolSettings.js +72 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1033 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +28 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +236 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +239 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +178 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +407 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +273 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +228 -0
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +120 -0
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +659 -0
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +149 -0
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +151 -0
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +171 -0
- package/cypress/e2e/ILC/NumberLine/headerSection.js +76 -0
- package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +54 -0
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +200 -0
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +67 -0
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +135 -0
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +73 -0
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +372 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1014 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +457 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +155 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +275 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +290 -0
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +137 -0
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
- package/cypress/fixtures/theme/ilc.json +14 -26
- package/cypress/pages/brainingCampManipulativePage.js +122 -0
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +2 -2
- package/cypress/pages/components/defaultToolDropdown.js +77 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +629 -2
- package/cypress/pages/components/index.js +3 -0
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/measuringToolComponent.js +2 -2
- package/cypress/pages/components/resetPopupComponent.js +74 -0
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -4
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +60 -3
- package/cypress/pages/components/toolSettingsComponent.js +80 -12
- package/cypress/pages/components/toolsAndControlsComponent.js +69 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -8
- package/cypress/pages/feedbackScalePage copy.js +716 -0
- package/cypress/pages/feedbackScalePage.js +591 -449
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
- package/cypress/pages/graphingPage.js +9 -145
- package/cypress/pages/gridFillPage.js +135 -120
- package/cypress/pages/highlightPage.js +0 -394
- package/cypress/pages/index.js +5 -2
- package/cypress/pages/matchingPage.js +78 -20
- package/cypress/pages/multipleSelectionGridPage.js +88 -1
- package/cypress/pages/numberLinePage.js +723 -0
- package/cypress/pages/singleSelectionGridPage.js +86 -0
- package/cypress/pages/textSelectionPage.js +582 -0
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +3 -12
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +0 -1
- package/cypress/support/migrationHelpers/migrationScript.js +0 -10
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +0 -8
- package/package.json +2 -2
@@ -0,0 +1,582 @@
|
|
1
|
+
import constants from "../fixtures/constants";
|
2
|
+
import utilities from "../support/helpers/utilities";
|
3
|
+
import { createQuestionBasePage, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInputFieldComponent, questionInstructionsComponent, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType } from "./components";
|
4
|
+
import { dialogBoxBase } from "./dialogBoxBase";
|
5
|
+
import { setPointsPopupBase } from "./components/setPointsPopupBase";
|
6
|
+
const css = Cypress.env('css');
|
7
|
+
const colorLibrary = css.textSelectionColorLibrary;
|
8
|
+
|
9
|
+
const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.', 'Birds are creatures with feathers, beaks, and the ability to lay eggs.', 'Many animal species are undocumented even today.', 'Research is going on to discover new species in the far corners of the earth']
|
10
|
+
|
11
|
+
const selectors = {
|
12
|
+
...questionInstructionsComponent,
|
13
|
+
...autoScoredScoringSectionMultiResponseType,
|
14
|
+
questionInputField: () => cy.get('[class*="Highlightstyles__QuestionComponentWrapper"] [title="Question"]'),
|
15
|
+
highlightOptionsTextFieldWrapper: () => cy.get('[class*="Highlightstyles__HighLightWrapper"]'),
|
16
|
+
textSelectionMode: (ariaLabel = null) => {
|
17
|
+
if (ariaLabel) {
|
18
|
+
return cy.get(`.text-selection-mode [type="button"][aria-label*="${ariaLabel}"]`)
|
19
|
+
} else {
|
20
|
+
return cy.get('.text-selection-mode [type="button"]')
|
21
|
+
}
|
22
|
+
},
|
23
|
+
highlightOptionsSpans: () => cy.get('[class*="Highlightstyles__HighLightWrapper"] span'),
|
24
|
+
|
25
|
+
//Specify correct answer section
|
26
|
+
optionSpecifyCorrectAnswer: () => cy.get('[class*="Highlightstyles__Wrapper"] .highlighted'),
|
27
|
+
setPointsButton: () => cy.get('[class*="Highlightstyles__SetPointsPopupWrapper"] button'),
|
28
|
+
|
29
|
+
//Preview tab
|
30
|
+
questionTextPreviewTab: () => cy.get('[class*="Highlightstyles__HighlightPreviewWrapper"] [class*="QuestionTextstyle__QuestionTextWrapper"] p'),
|
31
|
+
optionPreviewTab: () => cy.get('[class*="Highlightstyles__HighlightPreviewWrapper"] .highlighted'),
|
32
|
+
optionCorrectAnswerSection: () => cy.get('[class*="Highlightstyles__Wrapper"]').eq(1).find('.highlighted'),
|
33
|
+
correctAnswerSection: () => cy.get('[class*="Highlightstyles__Wrapper"]').eq(1),
|
34
|
+
correctIncorrectAnswerLabelWrapper: () => cy.get('[class*="AnswerStatusWrapper"]'),
|
35
|
+
correctIncorrectAnswerLabel: () => cy.get('[class*="AnswerStatusText"]'),
|
36
|
+
correctAnswersLabel: () => cy.get('[class*="Highlightstyles__CorrectAnswerHeader-"]'),
|
37
|
+
}
|
38
|
+
|
39
|
+
const steps = {
|
40
|
+
...createQuestionBasePage.steps,
|
41
|
+
...scoringSectionBaseEditTab.steps,
|
42
|
+
...autoScoredScoringPreviewTab.steps,
|
43
|
+
...questionInstructionsComponent.steps,
|
44
|
+
...autoScoredStudentViewSettings.steps,
|
45
|
+
...correctIncorrectAnswerLabelComponent.steps,
|
46
|
+
...autoScoredSpecifyCorrectAnswerSection.steps,
|
47
|
+
...autoScoredScoringSectionMultiResponseType.steps,
|
48
|
+
addInputToQuestionInputField: (text) => {
|
49
|
+
textSelectionPage.questionInputField()
|
50
|
+
.type(text);
|
51
|
+
},
|
52
|
+
|
53
|
+
clearQuestionInputField: () => {
|
54
|
+
textSelectionPage.questionInputField()
|
55
|
+
.clear();
|
56
|
+
},
|
57
|
+
|
58
|
+
focusInQuestionInputField: () => {
|
59
|
+
textSelectionPage.questionInputField()
|
60
|
+
.focus();
|
61
|
+
},
|
62
|
+
|
63
|
+
focusOutOfQuestionInputField: () => {
|
64
|
+
textSelectionPage.questionInputField()
|
65
|
+
.blur();
|
66
|
+
},
|
67
|
+
|
68
|
+
verifyErroredStateOfQuestionInputField: () => {
|
69
|
+
utilities.verifyCSS(textSelectionPage.questionInputField(), {
|
70
|
+
'border-color': css.color.errorFieldBorder,
|
71
|
+
'background-color': css.color.errorFieldBg
|
72
|
+
});
|
73
|
+
},
|
74
|
+
|
75
|
+
verifyErroredStateOfHighlightOptionsSection: () => {
|
76
|
+
utilities.verifyCSS(textSelectionPage.highlightOptionsTextFieldWrapper(), {
|
77
|
+
'border-color': css.color.errorFieldBorder,
|
78
|
+
'background-color': css.color.errorFieldBg
|
79
|
+
});
|
80
|
+
},
|
81
|
+
|
82
|
+
verifyImageAndAltTextInQuestionInputField: () => {
|
83
|
+
textSelectionPage.questionInputField()
|
84
|
+
.find('img')
|
85
|
+
.should('have.attr', 'src', constants.foxImageLink)
|
86
|
+
.and('have.attr', 'alt', constants.foxImageAltText);
|
87
|
+
},
|
88
|
+
|
89
|
+
verifyEquationInQuestionInputField: () => {
|
90
|
+
textSelectionPage.questionInputField()
|
91
|
+
.find('[data-widget="ngie_equation"]')
|
92
|
+
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
93
|
+
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
94
|
+
},
|
95
|
+
|
96
|
+
verifyLinkInQuestionInputField: () => {
|
97
|
+
textSelectionPage.questionInputField()
|
98
|
+
.find('a')
|
99
|
+
.should('have.text', 'lorem')
|
100
|
+
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
101
|
+
},
|
102
|
+
|
103
|
+
verifyBoldTextInQuestionInputField: () => {
|
104
|
+
textSelectionPage.questionInputField()
|
105
|
+
.find('strong')
|
106
|
+
.should('exist')
|
107
|
+
.should('have.text', 'This is Bold text input.');
|
108
|
+
},
|
109
|
+
|
110
|
+
verifyImageAndAltTextInHighlightOptionsSection: () => {
|
111
|
+
textSelectionPage.highlightOptionsTextFieldWrapper()
|
112
|
+
.find('img')
|
113
|
+
.should('have.attr', 'src', constants.foxImageLink)
|
114
|
+
.and('have.attr', 'alt', constants.foxImageAltText);
|
115
|
+
},
|
116
|
+
|
117
|
+
verifyEquationInHighlightOptionsSection: () => {
|
118
|
+
textSelectionPage.highlightOptionsTextFieldWrapper()
|
119
|
+
.find('span[role="math"]')
|
120
|
+
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
121
|
+
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
122
|
+
},
|
123
|
+
|
124
|
+
verifyLinkInHighlightOptionsSection: () => {
|
125
|
+
textSelectionPage.highlightOptionsTextFieldWrapper()
|
126
|
+
.find('a')
|
127
|
+
.should('have.text', 'lorem')
|
128
|
+
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
129
|
+
},
|
130
|
+
|
131
|
+
verifyBoldTextInHighlightOptionsSection: () => {
|
132
|
+
textSelectionPage.highlightOptionsTextFieldWrapper()
|
133
|
+
.find('strong')
|
134
|
+
.should('exist')
|
135
|
+
.should('have.text', 'This is Bold text input.lorem');
|
136
|
+
},
|
137
|
+
|
138
|
+
verifyHighlightOptionsFieldErrorMessage: () => {
|
139
|
+
textSelectionPage.highlightOptionsTextFieldWrapper()
|
140
|
+
.next()
|
141
|
+
.should('have.text', 'Error: Minimum one highlight option is required.');
|
142
|
+
},
|
143
|
+
|
144
|
+
/**
|
145
|
+
* @param {string} textSelectionType Type of text selection
|
146
|
+
* @description Switch text selection type in text selection dropdown
|
147
|
+
*/
|
148
|
+
switchTextSelectionMode: (textSelectionType) => {
|
149
|
+
textSelectionPage.textSelectionMode(textSelectionType)
|
150
|
+
.click();
|
151
|
+
},
|
152
|
+
|
153
|
+
/**
|
154
|
+
* @param {string} optionText Text of the option in highlight options section
|
155
|
+
* @description Click on option in highlight options section
|
156
|
+
*/
|
157
|
+
clickOnOptionInHighlightOptionsSection: (optionText) => {
|
158
|
+
textSelectionPage.highlightOptionsSpans()
|
159
|
+
.contains(optionText)
|
160
|
+
.click();
|
161
|
+
},
|
162
|
+
|
163
|
+
/**
|
164
|
+
* @param {string} optionText Text of the option in set correct answer section
|
165
|
+
* @description Click on option in set correct answer section
|
166
|
+
*/
|
167
|
+
clickOnOptionInSpecifyCorrectAnswerSection: (optionText) => {
|
168
|
+
textSelectionPage.optionSpecifyCorrectAnswer()
|
169
|
+
.contains(optionText)
|
170
|
+
.click();
|
171
|
+
},
|
172
|
+
|
173
|
+
/**
|
174
|
+
* @param {string} optionText Text of the option in preview tab
|
175
|
+
* @description Click on option in preview tab
|
176
|
+
*/
|
177
|
+
clickOnOptionInPreviewTab: (optionText) => {
|
178
|
+
textSelectionPage.optionPreviewTab()
|
179
|
+
.contains(optionText)
|
180
|
+
.click();
|
181
|
+
},
|
182
|
+
|
183
|
+
/**
|
184
|
+
* @param {*} optionText Text of the option in set correct answer section
|
185
|
+
* @description Select an option in set correct answer section
|
186
|
+
*/
|
187
|
+
selectOptionInSpecifyCorrectAnswerSection: (optionText) => {
|
188
|
+
textSelectionPage.steps.clickOnOptionInSpecifyCorrectAnswerSection(optionText);
|
189
|
+
textSelectionPage.steps.verifyOptionIsSelectedInSpecifyCorrectAnswerSection(optionText);
|
190
|
+
},
|
191
|
+
|
192
|
+
/**
|
193
|
+
* @param {*} optionText Text of the option in set correct answer section
|
194
|
+
* @description Deselect an option in set correct answer section
|
195
|
+
*/
|
196
|
+
deselectOptionInSpecifyCorrectAnswerSection: (optionText) => {
|
197
|
+
textSelectionPage.steps.clickOnOptionInSpecifyCorrectAnswerSection(optionText);
|
198
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInSpecifyCorrectAnswerSection(optionText);
|
199
|
+
},
|
200
|
+
|
201
|
+
/**
|
202
|
+
* @param {*} optionText Text of the option in preview tab
|
203
|
+
* @description Select an option in preview tab
|
204
|
+
*/
|
205
|
+
selectOptionInPreviewTab: (optionText) => {
|
206
|
+
textSelectionPage.steps.clickOnOptionInPreviewTab(optionText);
|
207
|
+
textSelectionPage.steps.verifyOptionIsSelectedInPreviewTab(optionText);
|
208
|
+
},
|
209
|
+
|
210
|
+
/**
|
211
|
+
* @param {*} optionText Text of the option in preview tab
|
212
|
+
* @description Deselect an option in preview tab
|
213
|
+
*/
|
214
|
+
deselectOptionInPreviewTab: (optionText) => {
|
215
|
+
textSelectionPage.steps.clickOnOptionInPreviewTab(optionText);
|
216
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(optionText);
|
217
|
+
},
|
218
|
+
|
219
|
+
/**
|
220
|
+
* @param {string} optionText Text of the option in highlight options section
|
221
|
+
* @description Verify that option is in selected state in highlight options section
|
222
|
+
*/
|
223
|
+
verifyOptionIsSelectedInHighlightOptionsSection: (optionText) => {
|
224
|
+
textSelectionPage.highlightOptionsSpans()
|
225
|
+
.contains(optionText)
|
226
|
+
.should('have.class', 'highlighted')
|
227
|
+
.and('have.attr', 'aria-checked', 'true');
|
228
|
+
},
|
229
|
+
|
230
|
+
/**
|
231
|
+
* @param {string} optionText Text of the option in highlight options section
|
232
|
+
* @description Verify that option does not exist in highlight options section
|
233
|
+
*/
|
234
|
+
verifyOptionDoesNotExistInHighlightOptionsSection: (optionText) => {
|
235
|
+
utilities.verifyElementVisibilityState(textSelectionPage.highlightOptionsSpans().contains(optionText), 'notExist');
|
236
|
+
},
|
237
|
+
|
238
|
+
verifyCorrectAnswerSectionNotExists: () => {
|
239
|
+
utilities.verifyElementVisibilityState(textSelectionPage.correctAnswerSection(), 'notExist');
|
240
|
+
},
|
241
|
+
|
242
|
+
/**
|
243
|
+
* @param {string} optionText Text of the option in highlight options section
|
244
|
+
* @description Verify hover state of the deselected option in highlight options section
|
245
|
+
*/
|
246
|
+
verifyHoverStateOfDeselectedOptionInHighlightOptionsSection: (optionText) => {
|
247
|
+
textSelectionPage.steps.hoverOnDeselectedOptionInHighlightOptionsSection(optionText);
|
248
|
+
utilities.verifyCSS(textSelectionPage.highlightOptionsSpans()
|
249
|
+
.contains(optionText), {
|
250
|
+
'color': css.color.text,
|
251
|
+
'font-size': css.fontSize.default,
|
252
|
+
'font-weight': css.fontWeight.regular,
|
253
|
+
'background-color': colorLibrary.selectionColor.hoverBackground,
|
254
|
+
'border': `1px solid ${colorLibrary.selectionColor.hoverBorder}`
|
255
|
+
});
|
256
|
+
},
|
257
|
+
|
258
|
+
/**
|
259
|
+
* @param {string} optionText Text of the option in highlight options section
|
260
|
+
* @description Hover on deselected option in highlight options section
|
261
|
+
*/
|
262
|
+
hoverOnDeselectedOptionInHighlightOptionsSection: (optionText) => {
|
263
|
+
textSelectionPage.highlightOptionsSpans()
|
264
|
+
.contains(optionText)
|
265
|
+
.realHover();
|
266
|
+
},
|
267
|
+
|
268
|
+
/**
|
269
|
+
* @param {string[]} optionArray Array of text of options in highlight options section
|
270
|
+
* @description Verify the options displayed in highlight options section
|
271
|
+
*/
|
272
|
+
verifyOptionsInHighlightOptionsSection: (optionArray) => {
|
273
|
+
optionArray.forEach((optionText, optionIndex) => {
|
274
|
+
utilities.verifyInnerText(textSelectionPage.highlightOptionsSpans().eq(optionIndex), optionText)
|
275
|
+
});
|
276
|
+
utilities.verifyElementCount(textSelectionPage.highlightOptionsSpans(), optionArray.length);
|
277
|
+
},
|
278
|
+
|
279
|
+
/**
|
280
|
+
* @param {string} optionText Text of the option in set correct answer section
|
281
|
+
* @description Verify that option is not in selected state in set correct answer section
|
282
|
+
*/
|
283
|
+
verifyOptionIsNotSelectedInSpecifyCorrectAnswerSection: (optionText) => {
|
284
|
+
textSelectionPage.optionSpecifyCorrectAnswer()
|
285
|
+
.contains(optionText)
|
286
|
+
.should('not.have.class', 'correct_answer')
|
287
|
+
.and('have.attr', 'aria-checked', 'false');
|
288
|
+
},
|
289
|
+
|
290
|
+
/**
|
291
|
+
* @param {string[]} optionArray Array of text of options in highlight options section
|
292
|
+
* @description Verify the options displayed in highlight options section
|
293
|
+
*/
|
294
|
+
verifyOptionsInSpecifyCorrectAnswerSection: (optionArray) => {
|
295
|
+
optionArray.forEach((optionText, optionIndex) => {
|
296
|
+
utilities.verifyInnerText(textSelectionPage.optionSpecifyCorrectAnswer().eq(optionIndex), optionText)
|
297
|
+
});
|
298
|
+
utilities.verifyElementCount(textSelectionPage.optionSpecifyCorrectAnswer(), optionArray.length);
|
299
|
+
},
|
300
|
+
|
301
|
+
/**
|
302
|
+
* @param {string} optionText Text of the option in set correct answer section
|
303
|
+
* @description Hover on deselected option in set correct answer section
|
304
|
+
*/
|
305
|
+
hoverOnDeselectedOptionInSpecifyCorrectAnswerSection: (optionText) => {
|
306
|
+
textSelectionPage.optionSpecifyCorrectAnswer()
|
307
|
+
.contains(optionText)
|
308
|
+
.realHover();
|
309
|
+
},
|
310
|
+
|
311
|
+
/**
|
312
|
+
* @param {string[]} optionArray Array of text of options in preview tab
|
313
|
+
* @description Verify the options displayed in preview tab
|
314
|
+
*/
|
315
|
+
verifyOptionInPreviewTab: (optionArray) => {
|
316
|
+
optionArray.forEach((optionText, optionIndex) => {
|
317
|
+
utilities.verifyInnerText(textSelectionPage.optionPreviewTab().eq(optionIndex), optionText)
|
318
|
+
});
|
319
|
+
utilities.verifyElementCount(textSelectionPage.optionPreviewTab(), optionArray.length);
|
320
|
+
},
|
321
|
+
|
322
|
+
/**
|
323
|
+
* @param {string} optionText Text of the option in preview tab
|
324
|
+
* @description Hover on deselected option in preview tab
|
325
|
+
*/
|
326
|
+
hoverOnDeselectedOptionInPreviewTab: (optionText) => {
|
327
|
+
textSelectionPage.optionPreviewTab()
|
328
|
+
.contains(optionText)
|
329
|
+
.realHover();
|
330
|
+
},
|
331
|
+
|
332
|
+
/**
|
333
|
+
* @param {string} optionText Text of the option in set correct answer section
|
334
|
+
* @description Verify hover state of the deselected option in set correct answer section
|
335
|
+
*/
|
336
|
+
verifyHoverStateOfDeselectedOptionInSpecifyCorrectAnswerSection: (optionText) => {
|
337
|
+
textSelectionPage.steps.hoverOnDeselectedOptionInSpecifyCorrectAnswerSection(optionText);
|
338
|
+
utilities.verifyCSS(textSelectionPage.optionSpecifyCorrectAnswer().contains(optionText), {
|
339
|
+
'color': css.color.text,
|
340
|
+
'font-size': css.fontSize.default,
|
341
|
+
'font-weight': css.fontWeight.regular,
|
342
|
+
'background-color': colorLibrary.selectionColor.hoverBackground,
|
343
|
+
'border': `1px solid ${colorLibrary.selectionColor.hoverBorder}`
|
344
|
+
});
|
345
|
+
},
|
346
|
+
|
347
|
+
/**
|
348
|
+
* @param {string} optionText Text of the option in preview tab
|
349
|
+
* @param {string} selectionColor type of color used for selection of option
|
350
|
+
* @description Verify hover state of the deselected option in preview tab
|
351
|
+
* @example verifyHoverStateOfOptionInPreviewTab('Sample text', "blue")
|
352
|
+
*/
|
353
|
+
verifyHoverStateOfOptionInPreviewTab: (optionText, selectionColor) => {
|
354
|
+
utilities.hoverOverElement(textSelectionPage.optionPreviewTab().contains(optionText));
|
355
|
+
utilities.verifyCSS(textSelectionPage.optionPreviewTab().contains(optionText), {
|
356
|
+
'color': css.color.text,
|
357
|
+
'font-size': css.fontSize.default,
|
358
|
+
'font-weight': css.fontWeight.regular,
|
359
|
+
'background-color': colorLibrary[selectionColor].hoverBackground,
|
360
|
+
'border': `2px solid ${colorLibrary[selectionColor].hoverBorder}`
|
361
|
+
});
|
362
|
+
utilities.hoverAwayFromElement(textSelectionPage.optionPreviewTab().contains(optionText));
|
363
|
+
},
|
364
|
+
|
365
|
+
/**
|
366
|
+
* @param {string} optionText Text of the option in preview tab
|
367
|
+
* @param {string} selectionColor type of color used for selection of option
|
368
|
+
* @example verifySelectedStateOptionInPreviewTab('Sample text', "blue")
|
369
|
+
*/
|
370
|
+
verifySelectedStateOptionInPreviewTab: (optionText, selectionColor) => {
|
371
|
+
utilities.verifyCSS(textSelectionPage.optionPreviewTab().contains(optionText), {
|
372
|
+
'color': css.color.whiteText,
|
373
|
+
'font-size': css.fontSize.default,
|
374
|
+
'font-weight': css.fontWeight.regular,
|
375
|
+
'background-color': colorLibrary[selectionColor].background
|
376
|
+
});
|
377
|
+
},
|
378
|
+
|
379
|
+
/**
|
380
|
+
* @param {string} optionText Text of the option in preview tab
|
381
|
+
* @example verifyDeselectedStateOptionInPreviewTab('Sample text')
|
382
|
+
*/
|
383
|
+
verifyDeselectedStateOptionInPreviewTab: (optionText) => {
|
384
|
+
utilities.verifyCSS(textSelectionPage.optionPreviewTab().contains(optionText), {
|
385
|
+
'color': css.color.text,
|
386
|
+
'font-size': css.fontSize.default,
|
387
|
+
'font-weight': css.fontWeight.regular,
|
388
|
+
'background-color': css.color.transparent
|
389
|
+
});
|
390
|
+
},
|
391
|
+
|
392
|
+
/**
|
393
|
+
* @param {string} optionText Text of the option in preview tab
|
394
|
+
* @description Verify check-mark icon is displayed for option
|
395
|
+
*/
|
396
|
+
verifyCorrectIconForOption: (optionText) => {
|
397
|
+
textSelectionPage.optionPreviewTab()
|
398
|
+
.contains(optionText)
|
399
|
+
.should('have.class', 'correct_answer')
|
400
|
+
.within(() => {
|
401
|
+
autoScoredScoringPreviewTab.correctIcon()
|
402
|
+
.should('be.visible');
|
403
|
+
});
|
404
|
+
},
|
405
|
+
|
406
|
+
/**
|
407
|
+
* @param {string} optionText Text of the option in preview tab
|
408
|
+
* @description Verify cross-mark icon is displayed for option
|
409
|
+
*/
|
410
|
+
verifyIncorrectIconForOption: (optionText) => {
|
411
|
+
textSelectionPage.optionPreviewTab()
|
412
|
+
.contains(optionText)
|
413
|
+
.should('have.class', 'correct_answer')
|
414
|
+
.within(() => {
|
415
|
+
autoScoredScoringPreviewTab.incorrectIcon()
|
416
|
+
.should('be.visible');
|
417
|
+
});
|
418
|
+
},
|
419
|
+
|
420
|
+
/**
|
421
|
+
* @param {string} optionText Text of the option in preview tab
|
422
|
+
* @description Verify check-mark icon is displayed for option
|
423
|
+
*/
|
424
|
+
verifyCorrectIncorrectIconForOptionNotExist: (optionText) => {
|
425
|
+
textSelectionPage.optionPreviewTab()
|
426
|
+
.contains(optionText)
|
427
|
+
.within(() => {
|
428
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'notExist');
|
429
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'notExist');
|
430
|
+
});
|
431
|
+
},
|
432
|
+
|
433
|
+
/**
|
434
|
+
* @param {string} optionText Text of the option in preview tab
|
435
|
+
* @description Verify check-mark icon is displayed for option
|
436
|
+
*/
|
437
|
+
verifyCorrectIncorrectIconForCorrectAnswerOptionNotExist: (optionText) => {
|
438
|
+
textSelectionPage.optionPreviewTab()
|
439
|
+
.contains(optionText)
|
440
|
+
.within(() => {
|
441
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'notExist');
|
442
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'notExist');
|
443
|
+
});
|
444
|
+
},
|
445
|
+
|
446
|
+
/**
|
447
|
+
* @param {string} optionText Text of the option in correct answer section preview tab
|
448
|
+
* @description Verify check-mark icon is displayed for option
|
449
|
+
*/
|
450
|
+
verifyCorrectIconForOptionCorrectAnswerSection: (optionText) => {
|
451
|
+
textSelectionPage.optionCorrectAnswerSection()
|
452
|
+
.contains(optionText)
|
453
|
+
.should('have.class', 'correct_answer')
|
454
|
+
.within(() => {
|
455
|
+
autoScoredScoringPreviewTab.correctIcon()
|
456
|
+
.should('be.visible');
|
457
|
+
});
|
458
|
+
},
|
459
|
+
|
460
|
+
/**
|
461
|
+
* @param {string} optionText Text of the option in set correct answer section
|
462
|
+
* @description Verify that option is in selected state in set correct answer section
|
463
|
+
*/
|
464
|
+
verifyOptionIsSelectedInSpecifyCorrectAnswerSection: (optionText) => {
|
465
|
+
textSelectionPage.optionSpecifyCorrectAnswer()
|
466
|
+
.contains(optionText)
|
467
|
+
.should('have.class', 'correct_answer')
|
468
|
+
.and('have.attr', 'aria-checked', 'true');
|
469
|
+
},
|
470
|
+
|
471
|
+
/**
|
472
|
+
* @param {string} optionText Text of the option in highlight options section
|
473
|
+
* @description Verify that option is not in selected state in highlight options section
|
474
|
+
*/
|
475
|
+
verifyOptionIsNotSelectedInHighlightOptionsSection: (optionText) => {
|
476
|
+
textSelectionPage.highlightOptionsSpans()
|
477
|
+
.contains(optionText)
|
478
|
+
.should('not.have.class', 'highlighted')
|
479
|
+
.and('have.attr', 'aria-checked', 'false');
|
480
|
+
},
|
481
|
+
|
482
|
+
/**
|
483
|
+
* @param {string} optionText Text of the option in preview tab
|
484
|
+
* @description Verify that option is in selected state in preview tab
|
485
|
+
*/
|
486
|
+
verifyOptionIsSelectedInPreviewTab: (optionText) => {
|
487
|
+
textSelectionPage.optionPreviewTab()
|
488
|
+
.contains(optionText)
|
489
|
+
.should('have.class', 'correct_answer')
|
490
|
+
.and('have.attr', 'aria-checked', 'true');
|
491
|
+
},
|
492
|
+
|
493
|
+
/**
|
494
|
+
* @param {string} optionText Text of the option in preview tab
|
495
|
+
* @description Verify that option is not in selected state in preview tab
|
496
|
+
*/
|
497
|
+
verifyOptionIsNotSelectedInPreviewTab: (optionText) => {
|
498
|
+
textSelectionPage.optionPreviewTab()
|
499
|
+
.contains(optionText)
|
500
|
+
.should('not.have.class', 'correct_answer')
|
501
|
+
.and('have.attr', 'aria-checked', 'false');
|
502
|
+
},
|
503
|
+
|
504
|
+
verifyNoOptionIsSelectedInPreviewTab: () => {
|
505
|
+
textSelectionPage.optionPreviewTab()
|
506
|
+
.should('not.have.class', 'correct_answer')
|
507
|
+
.and('have.attr', 'aria-checked', 'false');
|
508
|
+
},
|
509
|
+
|
510
|
+
/**
|
511
|
+
* @param {("correct" | "incorrect")} answerStatus - The status of the answer.
|
512
|
+
* @description Verifies the visibility and content of the correct/incorrect answer label block.
|
513
|
+
* If the answer is correct, it also verifies the visibility of the correct icon; otherwise, it verifies the visibility of the incorrect icon.
|
514
|
+
*/
|
515
|
+
verifyCorrectIncorrectAnswerLabel: (answerStatus) => {
|
516
|
+
utilities.verifyElementVisibilityState(textSelectionPage.correctIncorrectAnswerLabel(), 'exist');
|
517
|
+
utilities.verifyInnerText(textSelectionPage.correctIncorrectAnswerLabel(), `Your answer is\n${answerStatus}`)
|
518
|
+
textSelectionPage.correctIncorrectAnswerLabelWrapper()
|
519
|
+
.within(() => {
|
520
|
+
if (answerStatus === 'correct') {
|
521
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
522
|
+
} else {
|
523
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'visible');
|
524
|
+
}
|
525
|
+
});
|
526
|
+
},
|
527
|
+
|
528
|
+
setQuestionAndOptionsInEditTab: () => {
|
529
|
+
textSelectionPage.steps.clearQuestionInputField();
|
530
|
+
paragraphTextArray.forEach((paragraphText) => {
|
531
|
+
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
532
|
+
});
|
533
|
+
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
534
|
+
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
535
|
+
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[0]);
|
536
|
+
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[1]);
|
537
|
+
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[2]);
|
538
|
+
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[3]);
|
539
|
+
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[4]);
|
540
|
+
textSelectionPage.steps.clickOnOptionInHighlightOptionsSection(paragraphTextArray[5]);
|
541
|
+
},
|
542
|
+
|
543
|
+
/**
|
544
|
+
* @param {number[]} pointsArray Array of partial different points for options
|
545
|
+
* @description Add points to options in set points popup
|
546
|
+
*/
|
547
|
+
addPartialDifferentWeightsPointsInSetPointsPopup: (pointsArray) => {
|
548
|
+
textSelectionPage.setPointsButton()
|
549
|
+
.click();
|
550
|
+
setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField(pointsArray);
|
551
|
+
setPointsPopupBase.steps.saveSetPointsPopup();
|
552
|
+
},
|
553
|
+
|
554
|
+
/**
|
555
|
+
* Verify non-optional text is not interactive in preview tab
|
556
|
+
* @param {string} optionText Non-optional text in preview tab
|
557
|
+
*/
|
558
|
+
verifyNonOptionTextIsNotInteractiveInPreviewTab: (optionText) => {
|
559
|
+
utilities.hoverOverElement(textSelectionPage.questionTextPreviewTab().contains(optionText));
|
560
|
+
utilities.verifyCSS(textSelectionPage.questionTextPreviewTab().contains(optionText), {
|
561
|
+
'background-color': css.color.transparent
|
562
|
+
});
|
563
|
+
utilities.hoverAwayFromElement(textSelectionPage.questionTextPreviewTab().contains(optionText));
|
564
|
+
textSelectionPage.questionTextPreviewTab()
|
565
|
+
.contains(optionText)
|
566
|
+
.click();
|
567
|
+
textSelectionPage.questionTextPreviewTab()
|
568
|
+
.contains(optionText)
|
569
|
+
.should('not.have.class', 'correct_answer')
|
570
|
+
.and('have.attr', 'aria-checked', 'false');
|
571
|
+
}
|
572
|
+
}
|
573
|
+
|
574
|
+
const tests = {
|
575
|
+
...autoScoredScoringPreviewTab.tests,
|
576
|
+
}
|
577
|
+
|
578
|
+
export const textSelectionPage = {
|
579
|
+
...selectors,
|
580
|
+
steps,
|
581
|
+
tests
|
582
|
+
}
|
@@ -471,7 +471,7 @@ export const extractLrnQuestionData = {
|
|
471
471
|
|
472
472
|
figText: (lrnQuestionDataArr, index) => {
|
473
473
|
let obj = {};
|
474
|
-
cy.log(`Extracting the question instructions, question
|
474
|
+
cy.log(`Extracting the question instructions, question and response count from question ${index}`);
|
475
475
|
obj.questionIndex = index;
|
476
476
|
obj.questionType = 'figText';
|
477
477
|
lrnPage.steps.extractQuestionInstructions(obj, index);
|
@@ -496,7 +496,7 @@ export const extractLrnQuestionData = {
|
|
496
496
|
.parent()
|
497
497
|
.then(($responseField) => {
|
498
498
|
obj.isMultiline = $responseField[0].type === 'textarea' ? true : false;
|
499
|
-
if
|
499
|
+
if($responseField[0].innerHTML.includes('lrn_charactermapbutton')) {
|
500
500
|
obj.specialCharactersEnabled = true;
|
501
501
|
}
|
502
502
|
});
|
@@ -518,7 +518,7 @@ export const extractLrnQuestionData = {
|
|
518
518
|
|
519
519
|
figTextGrading: (lrnQuestionDataArr, index) => {
|
520
520
|
let obj = {};
|
521
|
-
cy.log(`Extracting the question instructions, question
|
521
|
+
cy.log(`Extracting the question instructions, question and response count from question ${index}`);
|
522
522
|
obj.questionIndex = index;
|
523
523
|
obj.questionType = 'figText';
|
524
524
|
lrnPage.steps.extractQuestionInstructions(obj, index);
|
@@ -550,15 +550,6 @@ export const extractLrnQuestionData = {
|
|
550
550
|
lrnQuestionDataArr.push(obj);
|
551
551
|
},
|
552
552
|
|
553
|
-
figDropdown: (lrnQuestionDataArr, index) => {
|
554
|
-
let obj = {};
|
555
|
-
cy.log(`Extracting the question instructions, question, response count, response field properties from question ${index}`);
|
556
|
-
obj.questionIndex = index;
|
557
|
-
obj.questionType = 'figDropdown';
|
558
|
-
lrnPage.steps.extractQuestionInstructions(obj, index);
|
559
|
-
lrnQuestionDataArr.push(obj);
|
560
|
-
},
|
561
|
-
|
562
553
|
/* singleSelection: (lrnQuestionDataArr, index) => {
|
563
554
|
let obj = {};
|
564
555
|
cy.log(`Extracting the question instructions and options from question ${index}`);
|
@@ -24,7 +24,6 @@ const extractLrnPreviewData = (currQuestionType, lrnQuestionDataArr, index) => {
|
|
24
24
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
25
25
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
26
26
|
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
27
|
-
case lrnQuestionTypesENUM.figDropdown: return extractLrnQuestionData.figDropdown(lrnQuestionDataArr, index);
|
28
27
|
default: throw new Error('Invalid lrn question type');
|
29
28
|
}
|
30
29
|
}
|
@@ -39,7 +38,6 @@ const verifyIePreviewData = (questionType, questionData, index) => {
|
|
39
38
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
40
39
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
41
40
|
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
42
|
-
case 'figDropdown': return verifyIeQuestionData.figDropdown(questionData, index);
|
43
41
|
default: throw new Error('Invalid ngie question type');
|
44
42
|
}
|
45
43
|
}
|
@@ -49,12 +47,8 @@ const extractLrnGradingData = (currQuestionType, lrnGradingDataArr, index) => {
|
|
49
47
|
case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
|
50
48
|
case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
51
49
|
case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
52
|
-
case lrnQuestionTypesENUM.essayResponse: return cy.log('Manually Graded Question Type');
|
53
|
-
case lrnQuestionTypesENUM.essayResponseBasic: return cy.log('Manually Graded Question Type');
|
54
|
-
case lrnQuestionTypesENUM.drawingResponse: return cy.log('Manually Graded Question Type');
|
55
50
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
56
51
|
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
57
|
-
case lrnQuestionTypesENUM.figDropdown: return;
|
58
52
|
default: throw new Error('Invalid lrn question type');
|
59
53
|
}
|
60
54
|
}
|
@@ -64,12 +58,8 @@ const verifyIeGradingData = (questionType, questionData, index) => {
|
|
64
58
|
case 'mcq': return verifyIeQuestionData.mcqGrading(questionData, index);
|
65
59
|
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
66
60
|
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
67
|
-
case 'essayResponse': return cy.log('Manually Graded Question Type');
|
68
|
-
case 'essayResponseBasic': return cy.log('Manually Graded Question Type');
|
69
|
-
case 'drawingResponse': return cy.log('Manually Graded Question Type');
|
70
61
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
71
62
|
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
72
|
-
case 'figDropdown': return;
|
73
63
|
default: throw new Error('Invalid ngie question type');
|
74
64
|
}
|
75
65
|
}
|