itemengine-cypress-automation 1.0.128 → 1.0.130
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +210 -0
- package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +91 -0
- package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +392 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +152 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +195 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +288 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +141 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +413 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +218 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +163 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +83 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +653 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +180 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabScoringSection.js +229 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/switchingCasesBetweenOptionsLayout.js +50 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +298 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingPenaltyScoring.js +63 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +111 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsBasic.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +232 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsBasic.js +138 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +186 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +161 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +328 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +144 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabScoringSection.js +250 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +74 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +188 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +4 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -52
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +3 -211
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +39 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -50
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +325 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +1 -146
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +78 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +265 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/responseAnswersAndAcceptedStudentInput.js +56 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +40 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +249 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +64 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +128 -0
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +889 -0
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +168 -0
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +203 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +222 -0
- package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +349 -0
- package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +132 -0
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +35 -7
- package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +213 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +41 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +377 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +161 -0
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +250 -0
- package/cypress/e2e/migration/migration.js +4 -41
- package/cypress/e2e/migration/migration10.js +6 -43
- package/cypress/e2e/migration/migration2.js +6 -43
- package/cypress/e2e/migration/migration3.js +6 -43
- package/cypress/e2e/migration/migration4.js +6 -43
- package/cypress/e2e/migration/migration5.js +6 -43
- package/cypress/e2e/migration/migration6.js +6 -43
- package/cypress/e2e/migration/migration7.js +6 -43
- package/cypress/e2e/migration/migration8.js +6 -43
- package/cypress/e2e/migration/migration9.js +6 -43
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/fixtures/theme/ilc.json +6 -1
- package/cypress/fixtures/uploadResponseFileType.js +5 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -13
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +24 -6
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +42 -4
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +149 -5
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +954 -77
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +2 -1
- package/cypress/pages/contentBlocksPage.js +515 -0
- package/cypress/pages/drawingResponsePage.js +2 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +359 -3
- package/cypress/pages/fillInTheGapsDropdownPage.js +21 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +5 -57
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -24
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -435
- package/cypress/pages/fillInTheGapsTextPage.js +9 -2
- package/cypress/pages/graphingPage.js +484 -0
- package/cypress/pages/index.js +4 -1
- package/cypress/pages/simpleCalculatorPage.js +310 -0
- package/cypress/pages/uploadResponsePage.js +260 -92
- package/cypress/support/commands.js +33 -1
- package/package.json +1 -1
- package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +0 -242
- package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +0 -99
- package/cypress/e2e/ILC/Passage/passageEditTab.js +0 -241
- package/cypress/e2e/ILC/Passage/passageHeaderSection.js +0 -73
- package/cypress/e2e/ILC/Passage/passagePreviewTab.js +0 -246
@@ -23,39 +23,7 @@ const selectors = {
|
|
23
23
|
|
24
24
|
limitReachedWarningMessageContainer: () => cy.get('.disabled-wrapper-cls'),
|
25
25
|
correctAnswerResponseWrapper: () => cy.get('.label-image-with-text-correct-response-wrapper [class*="ClozeWithTextResponsestyles__AnswerCell"]'),
|
26
|
-
specialCharactersButtonPreviewTab: () => cy.get('.cloze-with-text-special-character-button'),
|
27
26
|
tickIconWrapper: () => cy.get('.tick-icon-wrapper [data-name*="Rectangle"]'),
|
28
|
-
|
29
|
-
//Special characters section
|
30
|
-
specialCharactersLabel: () => cy.get('[class*="LabelImageWithTextstyles__CustomizedSpecialCharacterWrapper"]'),
|
31
|
-
enableSpecialCharactersCheckbox: () => cy.get('[data-ngie-testid="enable-special-characters-checkbox"] input'),
|
32
|
-
enableSpecialCharactersLabel: () => cy.get('[data-ngie-testid="enable-special-characters-checkbox"] [class*="MuiFormControlLabel-label"]'),
|
33
|
-
|
34
|
-
//TODO: Shift all preview tab special characters popup related selectors/steps to a common component file once https://redmine.zeuslearning.com/issues/559296 is resolved
|
35
|
-
//preview tab special characters
|
36
|
-
specialCharactersPopupTitlePreviewTab: () => cy.get('[class*="Popupstyles__TitleWrapper"]'),
|
37
|
-
specialCharactersPopupCategoryAccordionLabelPreviewTab: () => cy.get('[class*="ResponseInputComponentstyles__AccordionLabel"]'),
|
38
|
-
specialCharactersPopupCategoryAccordionWrapperPreviewTab: () => cy.get('.special-character-accordion'),
|
39
|
-
specialCharactersPopupSymbolPreviewTab: () => cy.get('.ngie-accordion button'),
|
40
|
-
specialCharactersPopupCategoryAccordionChevronButtonPreviewTab: () => cy.get('[class*="MuiAccordionSummary-expandIconWrapper"]'),
|
41
|
-
specialCharactersPopupCategoryAccordionCloseButtonPreviewTab: () => cy.get('[data-at="close-button"]'),
|
42
|
-
specialCharactersCustomSymbolsPreviewTab: () => cy.get('[class*="ResponseInputComponentstyles__PopupContentWrapper"] button'),
|
43
|
-
|
44
|
-
spellCheckLabel: () => cy.get('[data-ngie-testid="spell-check-checkbox"] .MuiFormControlLabel-label'),
|
45
|
-
spellCheckCheckbox: () => cy.get('[data-ngie-testid="spell-check-checkbox"] input[type="checkbox"]'),
|
46
|
-
|
47
|
-
//TODO: Need to remove it from here when https://redmine.zeuslearning.com/issues/558979 is resolved
|
48
|
-
checkAnswerButton: () => cy.get('.check-answer-and-status-wrapper button').last(),
|
49
|
-
|
50
|
-
//Conditional checkboxes
|
51
|
-
caseSensitiveCheckboxLabel: () => cy.get('[data-ngie-testid="case-sensitive-checkbox"] [class*="label"]'),
|
52
|
-
caseSensitiveCheckbox: () => cy.get('[data-ngie-testid="case-sensitive-checkbox"] input'),
|
53
|
-
validateIfAnswerIsIncludedCheckboxLabel: () => cy.get('[data-ngie-testid="validate-if-answer-is-included-in-the-response-checkbox"] [class*="label"]'),
|
54
|
-
validateIfAnswerIsIncludedCheckbox: () => cy.get('[data-ngie-testid="validate-if-answer-is-included-in-the-response-checkbox"] input'),
|
55
|
-
ignoreExtraSpacesCheckboxLabel: () => cy.get('[data-ngie-testid="ignore-extra-spaces-checkbox"] [class*="label"]'),
|
56
|
-
ignoreExtraSpacesCheckbox: () => cy.get('[data-ngie-testid="ignore-extra-spaces-checkbox"] input'),
|
57
|
-
ignoreSingleLetterMistakeCheckboxLabel: () => cy.get('[data-ngie-testid="ignore-single-letter-mistake-checkbox"] [class*="label"]'),
|
58
|
-
ignoreSingleLetterMistakeCheckbox: () => cy.get('[data-ngie-testid="ignore-single-letter-mistake-checkbox"] input'),
|
59
27
|
}
|
60
28
|
|
61
29
|
const steps = {
|
@@ -113,151 +81,6 @@ const steps = {
|
|
113
81
|
});
|
114
82
|
},
|
115
83
|
|
116
|
-
/**
|
117
|
-
* Enter text in the answer input fields of the specify correct answer section.
|
118
|
-
* @param {Object[]} responses - An array of objects containing the responseIndex and responseText.
|
119
|
-
* @param {number} responses[].responseIndex - The index of the answer input field for each response.
|
120
|
-
* @param {string} responses[].responseText - The text to be entered in the respective answer input field.
|
121
|
-
* @example - enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([
|
122
|
-
* { responseIndex: 0, responseText: "Answer 1" },
|
123
|
-
* { responseIndex: 1, responseText: "Answer 2" },
|
124
|
-
* ]);
|
125
|
-
*/
|
126
|
-
enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection: (responses) => {
|
127
|
-
responses.forEach(({ responseIndex, responseText }) => {
|
128
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), responseIndex)
|
129
|
-
.clear()
|
130
|
-
.type(responseText)
|
131
|
-
.blur();
|
132
|
-
});
|
133
|
-
},
|
134
|
-
|
135
|
-
/**
|
136
|
-
* @description Verify response accordion is collapsed in specify correct answer section
|
137
|
-
* @param {number} responseIndex index of response accordion
|
138
|
-
*/
|
139
|
-
verifyResponseAccordionIsCollapsed: (responseIndex) => {
|
140
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordion(), responseIndex)
|
141
|
-
.find('.ngie-accordion-summary')
|
142
|
-
.should('have.attr', 'aria-expanded', 'false');
|
143
|
-
},
|
144
|
-
|
145
|
-
/**
|
146
|
-
* @description Verify response accordion is expanded in specify correct answer section
|
147
|
-
* @param {number} responseIndex index of response accordion
|
148
|
-
*/
|
149
|
-
verifyResponseAccordionIsExpanded: (responseIndex) => {
|
150
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordion(), responseIndex)
|
151
|
-
.find('.ngie-accordion-summary')
|
152
|
-
.should('have.attr', 'aria-expanded', 'true');
|
153
|
-
},
|
154
|
-
|
155
|
-
/**
|
156
|
-
* @description Expand response accordion in specify correct answer section
|
157
|
-
* @param {number} responseIndex index of response accordion
|
158
|
-
*/
|
159
|
-
expandResponseAccordionSpecifyCorrectAnswer: (responseIndex) => {
|
160
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordion(), responseIndex)
|
161
|
-
.click();
|
162
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionIsExpanded(responseIndex);
|
163
|
-
},
|
164
|
-
|
165
|
-
/**
|
166
|
-
* @description Collapse response accordion in specify correct answer section
|
167
|
-
* @param {number} responseIndex index of response accordion
|
168
|
-
*/
|
169
|
-
collapseResponseAccordionSpecifyCorrectAnswer: (responseIndex) => {
|
170
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionLabel(), responseIndex)
|
171
|
-
.click();
|
172
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionIsCollapsed(responseIndex);
|
173
|
-
},
|
174
|
-
|
175
|
-
/**
|
176
|
-
* Focus in and focus out of response accordion answer input field in specify correct answer section
|
177
|
-
* @param {number} answerFieldIndex answer input field index
|
178
|
-
*/
|
179
|
-
focusInAndFocusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer: (answerFieldIndex) => {
|
180
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection(), answerFieldIndex)
|
181
|
-
.click()
|
182
|
-
.blur();
|
183
|
-
},
|
184
|
-
|
185
|
-
/**
|
186
|
-
* Focus in response input field in preview tab
|
187
|
-
* @param {number} responseInputFieldIndex response input field index
|
188
|
-
*/
|
189
|
-
focusInResponseInputFieldPreviewTab: (responseInputFieldIndex) => {
|
190
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab(), responseInputFieldIndex)
|
191
|
-
.click();
|
192
|
-
},
|
193
|
-
|
194
|
-
verifyEnableSpecialCharactersCheckboxUnchecked: () => {
|
195
|
-
fillInTheGapsOverImageTextPage.enableSpecialCharactersCheckbox()
|
196
|
-
.should('not.be.checked');
|
197
|
-
},
|
198
|
-
|
199
|
-
checkEnableSpecialCharactersCheckbox: () => {
|
200
|
-
fillInTheGapsOverImageTextPage.enableSpecialCharactersCheckbox()
|
201
|
-
.click()
|
202
|
-
.should('be.checked');
|
203
|
-
},
|
204
|
-
|
205
|
-
uncheckEnableSpecialCharactersCheckbox: () => {
|
206
|
-
fillInTheGapsOverImageTextPage.enableSpecialCharactersCheckbox()
|
207
|
-
.click()
|
208
|
-
.should('not.be.checked');
|
209
|
-
},
|
210
|
-
|
211
|
-
openSpecialCharactersPopupPreviewTab: () => {
|
212
|
-
fillInTheGapsOverImageTextPage.specialCharactersButtonPreviewTab()
|
213
|
-
.click();
|
214
|
-
},
|
215
|
-
|
216
|
-
/**
|
217
|
-
* @description Verify symbols displayed in for a category in special characters popup
|
218
|
-
* @param {number} categoryIndex Index of the category
|
219
|
-
* @param {string[]} categorySymbolsArray Array of the symbols of the category
|
220
|
-
*/
|
221
|
-
verifySpecialCharactersPopupCategorySymbolsInPreviewTab: (categoryIndex, categorySymbolsArray) => {
|
222
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.specialCharactersPopupCategoryAccordionLabelPreviewTab(), categoryIndex)
|
223
|
-
.click();
|
224
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.specialCharactersPopupCategoryAccordionWrapperPreviewTab(), categoryIndex)
|
225
|
-
.within(() => {
|
226
|
-
categorySymbolsArray[index].forEach((symbolARIALabel, index) => {
|
227
|
-
fillInTheGapsOverImageTextPage.specialCharactersPopupSymbolPreviewTab()
|
228
|
-
.eq(index)
|
229
|
-
.find('svg')
|
230
|
-
.should('have.attr', 'aria-label', `${symbolARIALabel}`);
|
231
|
-
});
|
232
|
-
});
|
233
|
-
},
|
234
|
-
|
235
|
-
closeSpecialCharactersPopupPreviewTab: () => {
|
236
|
-
fillInTheGapsOverImageTextPage.specialCharactersPopupCategoryAccordionCloseButtonPreviewTab()
|
237
|
-
.click();
|
238
|
-
},
|
239
|
-
|
240
|
-
/**
|
241
|
-
* Verify the points score displayed on response accordions
|
242
|
-
* @param {number} responseAccordionIndex index of response accordion
|
243
|
-
* @param {number} pointsPerResponse Points to be displayed on response accordion
|
244
|
-
*/
|
245
|
-
verifyPointsDisplayedOnResponseAccordion: (responseAccordionIndex, pointsPerResponse) => {
|
246
|
-
utilities.verifyElementVisibilityState(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionPointsLabel(), responseAccordionIndex), 'visible');
|
247
|
-
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionPointsLabel(), responseAccordionIndex), 'Points:');
|
248
|
-
utilities.verifyElementVisibilityState(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionPointsScore(), responseAccordionIndex), 'visible');
|
249
|
-
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionPointsScore(), responseAccordionIndex), `${pointsPerResponse}`);
|
250
|
-
},
|
251
|
-
|
252
|
-
/**
|
253
|
-
* Click on response accordion add alternate button
|
254
|
-
* @param {number} responseAccordionIndex index of response accordion
|
255
|
-
*/
|
256
|
-
addAlternateAnswerInResponseAccordion: (responseAccordionIndex) => {
|
257
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionAddAlternateButton(), responseAccordionIndex)
|
258
|
-
.click();
|
259
|
-
},
|
260
|
-
|
261
84
|
/**
|
262
85
|
* Verify custom special characters displayed in special characters popup in preview tab
|
263
86
|
* @param {string[]} customSpecialCharacters Array of custom special characters
|
@@ -286,32 +109,6 @@ const steps = {
|
|
286
109
|
});
|
287
110
|
},
|
288
111
|
|
289
|
-
/**
|
290
|
-
* Verify the points input field and label displayed in response accordions
|
291
|
-
* @param {number} responseAccordionIndex index of response accordion
|
292
|
-
* @param {number} pointsInputFieldValue Points input field value
|
293
|
-
*/
|
294
|
-
verifyPointsLabelAndInputFieldInResponseAccordion: (responseAccordionIndex, pointsInputFieldValue) => {
|
295
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionPointsInputFieldWrapper(), responseAccordionIndex)
|
296
|
-
.within(() => {
|
297
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.pointsLabel(), 'visible');
|
298
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.pointsLabel(), 'Points');
|
299
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.pointsInputField(), 'visible');
|
300
|
-
scoringSectionBaseEditTab.steps.verifyPointsFieldValue(pointsInputFieldValue);
|
301
|
-
});
|
302
|
-
},
|
303
|
-
|
304
|
-
/**
|
305
|
-
* Allot points inside response accordion points input field
|
306
|
-
* @param {number} responseAccordionIndex index of response accordion
|
307
|
-
* @param {number} pointsInputFieldValue Points input field value to be allotted
|
308
|
-
*/
|
309
|
-
allotPointsInResponseAccordion: (responseAccordionIndex, pointsInputFieldValue) => {
|
310
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionPointsInputFieldWrapper(), responseAccordionIndex)
|
311
|
-
.within(() => {
|
312
|
-
scoringSectionBaseEditTab.steps.allotPoints(pointsInputFieldValue);
|
313
|
-
});
|
314
|
-
},
|
315
112
|
|
316
113
|
/**
|
317
114
|
*@description Verify text in the answer input fields of the specify correct answer section.
|
@@ -344,49 +141,6 @@ const steps = {
|
|
344
141
|
});
|
345
142
|
},
|
346
143
|
|
347
|
-
/**
|
348
|
-
*@description Verify delete button for the answer input fields of the specify correct answer section.
|
349
|
-
* @param responseAccordionIndex denotes response accordion index
|
350
|
-
*/
|
351
|
-
verifyResponseAccordionAnswerInputFieldDeleteButton: (responseAccordionIndex) => {
|
352
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordion(), responseAccordionIndex)
|
353
|
-
.within(() => {
|
354
|
-
fillInTheGapsOverImageTextPage.responseAccordionAnswerInputFieldWrapper()
|
355
|
-
.each(($el) => {
|
356
|
-
cy.wrap($el)
|
357
|
-
.within(() => {
|
358
|
-
fillInTheGapsOverImageTextPage.responseAccordionAnswerDeleteButton()
|
359
|
-
.should('be.visible');
|
360
|
-
});
|
361
|
-
});
|
362
|
-
});
|
363
|
-
},
|
364
|
-
|
365
|
-
/**
|
366
|
-
*@description Clicks delete button for the answer input fields of the specify correct answer section.
|
367
|
-
* @param responseAccordionIndex denotes response accordion index
|
368
|
-
*/
|
369
|
-
deleteResponseAccordionAnswerInputField: (responseAccordionIndex, responseAccordionAnswerInputFieldIndex) => {
|
370
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordion(), responseAccordionIndex)
|
371
|
-
.within(() => {
|
372
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionAnswerInputFieldWrapper(), responseAccordionAnswerInputFieldIndex)
|
373
|
-
.within(() => {
|
374
|
-
fillInTheGapsOverImageTextPage.responseAccordionAnswerDeleteButton()
|
375
|
-
.click();
|
376
|
-
});
|
377
|
-
});
|
378
|
-
},
|
379
|
-
|
380
|
-
verifySpellCheckCheckboxUnchecked: () => {
|
381
|
-
fillInTheGapsOverImageTextPage.spellCheckCheckbox()
|
382
|
-
.should('not.be.checked');
|
383
|
-
},
|
384
|
-
|
385
|
-
verifySpellCheckCheckboxChecked: () => {
|
386
|
-
fillInTheGapsOverImageTextPage.spellCheckCheckbox()
|
387
|
-
.should('be.checked');
|
388
|
-
},
|
389
|
-
|
390
144
|
verifyLimitReachedWarningMessageNotExist: () => {
|
391
145
|
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.limitReachedWarningMessage(), 'notExist');
|
392
146
|
},
|
@@ -405,38 +159,6 @@ const steps = {
|
|
405
159
|
.clear();
|
406
160
|
},
|
407
161
|
|
408
|
-
/**
|
409
|
-
* Verify that the spell check for a response field in the Preview Tab is disabled.
|
410
|
-
* @param {number} responseFieldIndex - The index of the response field to verify.
|
411
|
-
*/
|
412
|
-
verifySpellCheckOfResponseFieldPreviewTabDisabled: (responseFieldIndex) => {
|
413
|
-
fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab()
|
414
|
-
.eq(responseFieldIndex)
|
415
|
-
.should('have.attr', 'spellcheck', 'false');
|
416
|
-
},
|
417
|
-
|
418
|
-
/**
|
419
|
-
* Verify that the spell check for a response field in the Preview Tab is enabled.
|
420
|
-
* @param {number} responseFieldIndex - The index of the response field to verify.
|
421
|
-
*/
|
422
|
-
verifySpellCheckOfResponseFieldPreviewTabEnabled: (responseFieldIndex) => {
|
423
|
-
fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab()
|
424
|
-
.eq(responseFieldIndex)
|
425
|
-
.should('have.attr', 'spellcheck', 'true');
|
426
|
-
},
|
427
|
-
|
428
|
-
checkSpellCheckCheckbox: () => {
|
429
|
-
fillInTheGapsOverImageTextPage.spellCheckCheckbox()
|
430
|
-
.click()
|
431
|
-
steps.verifySpellCheckCheckboxChecked();
|
432
|
-
},
|
433
|
-
|
434
|
-
uncheckSpellCheckCheckbox: () => {
|
435
|
-
fillInTheGapsOverImageTextPage.spellCheckCheckbox()
|
436
|
-
.click();
|
437
|
-
steps.verifySpellCheckCheckboxUnchecked();
|
438
|
-
},
|
439
|
-
|
440
162
|
//TODO: Need to remove it from here when https://redmine.zeuslearning.com/issues/558979 is resolved
|
441
163
|
checkAnswer: () => {
|
442
164
|
fillInTheGapsOverImageTextPage.checkAnswerButton()
|
@@ -515,104 +237,6 @@ const steps = {
|
|
515
237
|
fillInTheGapsOverImageTextPage.canvasInPreviewTab()
|
516
238
|
.should('have.css', 'height', `${height}px`);
|
517
239
|
},
|
518
|
-
|
519
|
-
verifyDefaultUncheckedStateOfConditionalCheckboxes: () => {
|
520
|
-
fillInTheGapsOverImageTextPage.caseSensitiveCheckbox()
|
521
|
-
.should('not.be.checked');
|
522
|
-
fillInTheGapsOverImageTextPage.validateIfAnswerIsIncludedCheckbox()
|
523
|
-
.should('not.be.checked');
|
524
|
-
fillInTheGapsOverImageTextPage.ignoreExtraSpacesCheckbox()
|
525
|
-
.should('not.be.checked');
|
526
|
-
fillInTheGapsOverImageTextPage.ignoreSingleLetterMistakeCheckbox()
|
527
|
-
.should('not.be.checked');
|
528
|
-
},
|
529
|
-
|
530
|
-
/**
|
531
|
-
* Check the conditional checkbox in edit tab
|
532
|
-
* @param {string} conditionalCheckboxName Name of the conditional checkbox to be checked
|
533
|
-
*/
|
534
|
-
checkConditionalCheckbox: (conditionalCheckboxName) => {
|
535
|
-
switch (conditionalCheckboxName) {
|
536
|
-
case 'Case sensitive':
|
537
|
-
fillInTheGapsOverImageTextPage.caseSensitiveCheckbox()
|
538
|
-
.click()
|
539
|
-
.should('be.checked');
|
540
|
-
break;
|
541
|
-
case 'Validate if answer is included in the response':
|
542
|
-
fillInTheGapsOverImageTextPage.validateIfAnswerIsIncludedCheckbox()
|
543
|
-
.click()
|
544
|
-
.should('be.checked');
|
545
|
-
break;
|
546
|
-
case 'Ignore extra spaces':
|
547
|
-
fillInTheGapsOverImageTextPage.ignoreExtraSpacesCheckbox()
|
548
|
-
.click()
|
549
|
-
.should('be.checked');
|
550
|
-
break;
|
551
|
-
case 'Ignore single letter mistake':
|
552
|
-
fillInTheGapsOverImageTextPage.ignoreSingleLetterMistakeCheckbox()
|
553
|
-
.click()
|
554
|
-
.should('be.checked');
|
555
|
-
break;
|
556
|
-
default:
|
557
|
-
throw new Error('invalid state string');
|
558
|
-
}
|
559
|
-
},
|
560
|
-
|
561
|
-
/**
|
562
|
-
* Uncheck the conditional checkbox in edit tab
|
563
|
-
* @param {string} conditionalCheckboxName Name of the conditional checkbox to be unchecked
|
564
|
-
*/
|
565
|
-
uncheckConditionalCheckbox: (conditionalCheckboxName) => {
|
566
|
-
switch (conditionalCheckboxName) {
|
567
|
-
case 'Case sensitive':
|
568
|
-
fillInTheGapsOverImageTextPage.caseSensitiveCheckbox()
|
569
|
-
.click()
|
570
|
-
.should('not.be.checked');
|
571
|
-
break;
|
572
|
-
case 'Validate if answer is included in the response':
|
573
|
-
fillInTheGapsOverImageTextPage.validateIfAnswerIsIncludedCheckbox()
|
574
|
-
.click()
|
575
|
-
.should('not.be.checked');
|
576
|
-
break;
|
577
|
-
case 'Ignore extra spaces':
|
578
|
-
fillInTheGapsOverImageTextPage.ignoreExtraSpacesCheckbox()
|
579
|
-
.click()
|
580
|
-
.should('not.be.checked');
|
581
|
-
break;
|
582
|
-
case 'Ignore single letter mistake':
|
583
|
-
fillInTheGapsOverImageTextPage.ignoreSingleLetterMistakeCheckbox()
|
584
|
-
.click()
|
585
|
-
.should('not.be.checked');
|
586
|
-
break;
|
587
|
-
default:
|
588
|
-
throw new Error('invalid state string');
|
589
|
-
}
|
590
|
-
},
|
591
|
-
|
592
|
-
/**
|
593
|
-
* Verify answer input field placeholder text
|
594
|
-
* @param {number} answerFieldIndex index of answer input field
|
595
|
-
*/
|
596
|
-
verifyAnswerInputFieldPlaceholder: (answerFieldIndex) => {
|
597
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionAnswerInputFieldWrapper(), answerFieldIndex)
|
598
|
-
.within(() => {
|
599
|
-
fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection()
|
600
|
-
.should('have.attr', 'placeholder', 'Enter answer');
|
601
|
-
});
|
602
|
-
},
|
603
|
-
|
604
|
-
/**
|
605
|
-
* Clear answer input field
|
606
|
-
* @param {number} answerFieldIndex index of answer input field
|
607
|
-
*/
|
608
|
-
clearAnswerInputField: (answerFieldIndex) => {
|
609
|
-
utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionAnswerInputFieldWrapper(), answerFieldIndex)
|
610
|
-
.within(() => {
|
611
|
-
fillInTheGapsOverImageTextPage.answerInputFieldSpecifyCorrectAnswerSection()
|
612
|
-
.clear()
|
613
|
-
.blur();
|
614
|
-
});
|
615
|
-
},
|
616
240
|
}
|
617
241
|
|
618
242
|
const tests = {
|
@@ -627,65 +251,7 @@ const tests = {
|
|
627
251
|
...imageCanvasComponent.tests,
|
628
252
|
...questionInstructionsComponent.tests,
|
629
253
|
...fillInTheGapsTextCommonComponent.tests,
|
630
|
-
|
631
|
-
/**
|
632
|
-
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
633
|
-
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
634
|
-
* @example - verifySpecifyCorrectAnswerAccordionContentsAndFunctionality('Correct');
|
635
|
-
*/
|
636
|
-
verifySpecifyCorrectAnswerAccordionContentsAndFunctionality: (accordionName) => {
|
637
|
-
it(`When user has added a response token in image, then its corresponding response accordion \'Response 1\' should be displayed in the ${accordionName} accordion in expanded state`, () => {
|
638
|
-
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordion(), 1);
|
639
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionIsExpanded(0);
|
640
|
-
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionLabel(), 0), 'Response 1');
|
641
|
-
});
|
642
|
-
|
643
|
-
it('When user focuses in and out of the response accordion \'Answer\' input field, \'Error: Answer is required.\' error message should be displayed', () => {
|
644
|
-
fillInTheGapsOverImageTextPage.steps.focusInAndFocusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer(0, 0);
|
645
|
-
utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
|
646
|
-
utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Answer is required.');
|
647
|
-
});
|
648
|
-
|
649
|
-
it('When gives an input to \'Answer\' input field,then error message should disappear', () => {
|
650
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Petals' }]);
|
651
|
-
commonComponents.steps.verifyErrorMessageIsNotDisplayed();
|
652
|
-
});
|
653
|
-
|
654
|
-
it('\'Accepted student input\' label, menu and its options - \'Text\', \'Number\', \'Integer\' should be displayed and \'Text\' option should be active', () => {
|
655
|
-
utilities.verifyInnerText(acceptedStudentInputComponent.acceptedStudentInputLabel(), 'Accepted student input');
|
656
|
-
utilities.verifyElementVisibilityState(acceptedStudentInputComponent.acceptedStudentInputLabel(), 'visible');
|
657
|
-
acceptedStudentInputComponent.steps.verifyAcceptedStudentTypeMenuButtons(0);
|
658
|
-
acceptedStudentInputComponent.steps.verifyAcceptedStudentTypeActiveButton(0, 'Text');
|
659
|
-
});
|
660
|
-
|
661
|
-
it('User should be able to collapse response accordion', () => {
|
662
|
-
fillInTheGapsOverImageTextPage.steps.collapseResponseAccordionSpecifyCorrectAnswer(0);
|
663
|
-
});
|
664
|
-
|
665
|
-
autoScoredSpecifyCorrectAnswerSection.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty(accordionName);
|
666
|
-
|
667
|
-
it(`CSS of ${accordionName} accordion contents`, { tags: 'css' }, () => {
|
668
|
-
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionLabel(), 0), {
|
669
|
-
'color': css.color.text,
|
670
|
-
'font-size': css.fontSize.default,
|
671
|
-
'font-weight': css.fontWeight.bold
|
672
|
-
});
|
673
|
-
});
|
674
|
-
|
675
|
-
it(`Accessibility of ${accordionName} accordion contents`, { tags: 'a11y' }, () => {
|
676
|
-
cy.checkAccessibility(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordion(), 0).parents('[aria-label="Specify correct answer section"]'));
|
677
|
-
});
|
678
|
-
},
|
679
|
-
|
680
|
-
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
681
|
-
it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
|
682
|
-
utilities.verifyElementCount(fillInTheGapsOverImageTextPage.responseAccordion(), 2);
|
683
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionIsExpanded(0);
|
684
|
-
fillInTheGapsOverImageTextPage.steps.verifyResponseAccordionIsExpanded(1);
|
685
|
-
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionLabel(), 0), 'Response 1');
|
686
|
-
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseAccordionLabel(), 1), 'Response 2');
|
687
|
-
});
|
688
|
-
},
|
254
|
+
...customizeSpecialCharacterComponent.tests,
|
689
255
|
}
|
690
256
|
|
691
257
|
export const fillInTheGapsOverImageTextPage = {
|
@@ -31,6 +31,7 @@ const steps = {
|
|
31
31
|
...fillInTheGapsTextCommonComponent.steps,
|
32
32
|
...questionInputFieldComponent.steps,
|
33
33
|
...additionalSettingsPanel.steps,
|
34
|
+
...customizeSpecialCharacterComponent.steps,
|
34
35
|
/**
|
35
36
|
* Verify that the incorrect option icon is displayed for a specific answer input field.
|
36
37
|
* @param {number} inputFieldIndex - The index of the answer input field to verify.
|
@@ -63,7 +64,7 @@ const steps = {
|
|
63
64
|
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'notExist');
|
64
65
|
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.incorrectIcon(), 'notExist');
|
65
66
|
});
|
66
|
-
}
|
67
|
+
}
|
67
68
|
}
|
68
69
|
|
69
70
|
const tests = {
|
@@ -71,7 +72,13 @@ const tests = {
|
|
71
72
|
...questionInstructionsComponent.tests,
|
72
73
|
...commonComponents.tests,
|
73
74
|
...questionInputFieldComponent.tests,
|
74
|
-
...fillInTheGapsTextCommonComponent.tests
|
75
|
+
...fillInTheGapsTextCommonComponent.tests,
|
76
|
+
...customizeSpecialCharacterComponent.tests,
|
77
|
+
...autoScoredSpecifyCorrectAnswerSection.tests,
|
78
|
+
...scoringSectionBaseEditTab.tests,
|
79
|
+
...autoScoredScoringSectionMultiResponseType.tests,
|
80
|
+
...autoScoredStudentViewSettings.tests,
|
81
|
+
...createQuestionBasePage.tests
|
75
82
|
}
|
76
83
|
|
77
84
|
export const fillInTheGapsTextPage = {
|