itemengine-cypress-automation 1.0.120 → 1.0.122-updateILCRepo28Feb-2c3e0e3.0
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/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/package.json +2 -2
- 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
@@ -36,6 +36,33 @@ const steps = {
|
|
36
36
|
.click();
|
37
37
|
},
|
38
38
|
|
39
|
+
enterTextInTeacherGuidelinesInputField: (teacherGuidelinesText) => {
|
40
|
+
additionalSettingsPanel.additionalSettingsTeacherGuidelinesInputField()
|
41
|
+
.click()
|
42
|
+
.type(teacherGuidelinesText)
|
43
|
+
.blur();
|
44
|
+
additionalSettingsPanel.additionalSettingsTeacherGuidelinesInputField()
|
45
|
+
.should('have.text', teacherGuidelinesText);
|
46
|
+
},
|
47
|
+
|
48
|
+
enterTextInSampleAnswerInputField: (sampleAnswer) => {
|
49
|
+
additionalSettingsPanel.additionalSettingsSampleAnswerInputField()
|
50
|
+
.click()
|
51
|
+
.type(sampleAnswer)
|
52
|
+
.blur();
|
53
|
+
additionalSettingsPanel.additionalSettingsSampleAnswerInputField()
|
54
|
+
.should('have.text', sampleAnswer);
|
55
|
+
},
|
56
|
+
|
57
|
+
enterTextInAcknowledgementsInputField: (acknowledgements) => {
|
58
|
+
additionalSettingsPanel.additionalSettingsAcknowledgementsInputField()
|
59
|
+
.click()
|
60
|
+
.type(acknowledgements)
|
61
|
+
.blur();
|
62
|
+
additionalSettingsPanel.additionalSettingsAcknowledgementsInputField()
|
63
|
+
.should('have.text', acknowledgements);
|
64
|
+
},
|
65
|
+
|
39
66
|
expandAdditionalSettings: () => {
|
40
67
|
additionalSettingsPanel.additionalSettingsPanel()
|
41
68
|
.click()
|
@@ -5,7 +5,7 @@ import { scoringSectionBase } from "./scoringSectionBase";
|
|
5
5
|
import { commonComponents } from "./commonComponents";
|
6
6
|
import { previewScoringAndShowCorrectAnswerComponent } from "./previewScoringAndShowCorrectAnswerComponent";
|
7
7
|
const css = Cypress.env('css');
|
8
|
-
//
|
8
|
+
//Note: deprecated file
|
9
9
|
const steps = {
|
10
10
|
correctIncorrectLabelAndBorderExists: (questionType) => {
|
11
11
|
switch (questionType) {
|
@@ -2,7 +2,7 @@ import utilities from "../../support/helpers/utilities";
|
|
2
2
|
import { commonComponents } from "./commonComponents";
|
3
3
|
import { scoringSectionBase } from "./scoringSectionBase";
|
4
4
|
const css = Cypress.env('css');
|
5
|
-
//
|
5
|
+
//Note: deprecated file
|
6
6
|
const selectors = {
|
7
7
|
allOrNothingCheckboxLabel: () => cy.get('label[for*="defaultScoring"]'),
|
8
8
|
allOrNothingCheckbox: () => cy.get('input[type*="radio"][aria-label="All or Nothing"]'),
|
@@ -2,7 +2,7 @@ import { dialogBoxBase } from "../dialogBoxBase";
|
|
2
2
|
import { scoringSectionBase } from "./scoringSectionBase";
|
3
3
|
import { commonComponents } from "./commonComponents";
|
4
4
|
const css = Cypress.env('css');
|
5
|
-
//
|
5
|
+
//Note: deprecated file
|
6
6
|
const selectors = {
|
7
7
|
setCorrectAnswerLabel: () => cy.get('.set-correct-answer-label'),
|
8
8
|
setCorrectAnswerHelpText: () => cy.get('.edit-set-correct-answer-help-text'),
|
@@ -345,13 +345,13 @@ const tests = {
|
|
345
345
|
});
|
346
346
|
utilities.verifyInnerText(utilities.getNthElement(scoringSectionBase.pleaseEnterPointsErrorMessage(), 0), 'Error: Please enter points.');
|
347
347
|
utilities.verifyElementVisibilityState(scoringSectionBase.pleaseEnterPointsErrorMessage(), 'visible');
|
348
|
-
if (questionType != 'list ordering' && questionType != 'short text response') {
|
348
|
+
if (questionType != 'list ordering' && questionType != 'short text response' && questionType != 'text entry math') {
|
349
349
|
steps.verifySpecifyCorrectAnswerErrorMessage();
|
350
350
|
}
|
351
351
|
else if (questionType === 'short text response') {
|
352
352
|
utilities.verifyInnerText(utilities.getNthElement(commonComponents.errorMessage(), -1), 'Error: Answer is required.');
|
353
353
|
}
|
354
|
-
if (questionType === 'fill in the gaps over image text' || questionType === 'text entry math') {
|
354
|
+
else if (questionType === 'fill in the gaps over image text' || questionType === 'text entry math') {
|
355
355
|
utilities.verifyInnerText(commonComponents.errorMessage().last(), 'Error: Please enter points.');
|
356
356
|
utilities.verifyElementVisibilityState(commonComponents.errorMessage().last(), 'visible');
|
357
357
|
}
|
@@ -46,7 +46,7 @@ const steps = {
|
|
46
46
|
setMaximumCheckAnswerAttempts: (maxCheckAnswerAttempts) => {
|
47
47
|
autoScoredStudentViewSettings.steps.checkAllowStudentToCheckAnswerCheckbox();
|
48
48
|
autoScoredStudentViewSettings.steps.expandMaxCheckAnswerAttemptsDropdown();
|
49
|
-
autoScoredStudentViewSettings.steps.
|
49
|
+
autoScoredStudentViewSettings.steps.selectMaxCheckAnswerAttemptsDropdownListOption(maxCheckAnswerAttempts)
|
50
50
|
},
|
51
51
|
|
52
52
|
expandMaxCheckAnswerAttemptsDropdown: () => {
|
@@ -89,6 +89,13 @@ const tests = {
|
|
89
89
|
});
|
90
90
|
},
|
91
91
|
|
92
|
+
verifyMaximumAttemptsDropdownDisplayedWhenAllowStudentsToCheckAnswerIsChecked: () => {
|
93
|
+
it('When the user checks the \'Allow student to check answer\' checkbox, then \'Maximum check answer attempts\' dropdown should be displayed', () => {
|
94
|
+
autoScoredStudentViewSettings.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
95
|
+
utilities.verifyElementVisibilityState(autoScoredStudentViewSettings.maximumCheckAnswerAttemptsDropdown(), 'visible');
|
96
|
+
});
|
97
|
+
},
|
98
|
+
|
92
99
|
verifyMaxCheckAnswerAttemptsDropdown: () => {
|
93
100
|
it('\'Maximum check answer attempts\' should have \'No limit\' selected by default and on expanding the dropdown options 1 to 10 should also be displayed', () => {
|
94
101
|
utilities.verifyInnerText(autoScoredStudentViewSettings.maximumCheckAnswerAttemptsDropdownLabel(), 'Maximum check answer attempts');
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import utilities from "../../support/helpers/utilities";
|
2
2
|
import { dialogBoxBase } from "../dialogBoxBase";
|
3
3
|
import { commonComponents } from "./commonComponents";
|
4
|
-
import {
|
4
|
+
import { imageCanvasComponent } from "./imageCanvasComponent";
|
5
5
|
const css = Cypress.env('css');
|
6
6
|
|
7
7
|
const selectors = {
|
@@ -110,9 +110,9 @@ const tests = {
|
|
110
110
|
backgroundImageUploadComponent.steps.uploadFile('highlightImage.jpg');
|
111
111
|
utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadImageProgressBar(), 'visible');
|
112
112
|
backgroundImageUploadComponent.steps.verifyFileNameLabel('highlightImage.jpg');
|
113
|
-
utilities.verifyElementVisibilityState(
|
113
|
+
utilities.verifyElementVisibilityState( imageCanvasComponent.canvasImage(), 'visible');
|
114
114
|
utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadImageProgressBar(), 'notExist');
|
115
|
-
|
115
|
+
imageCanvasComponent.steps.verifyImageIsUploaded();
|
116
116
|
});
|
117
117
|
|
118
118
|
it('Delete button should appear beside uploaded file\'s name', () => {
|
@@ -184,7 +184,7 @@ const tests = {
|
|
184
184
|
backgroundImageUploadComponent.steps.clickOnCancelButtonInDeleteImagePopup();
|
185
185
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
186
186
|
utilities.verifyInnerText(backgroundImageUploadComponent.uploadedFileNameLabel(), 'sample1.jpg');
|
187
|
-
utilities.verifyElementVisibilityState(
|
187
|
+
utilities.verifyElementVisibilityState(imageCanvasComponent.canvasImage(), 'visible');
|
188
188
|
});
|
189
189
|
|
190
190
|
it('When user clicks on \'Delete image\' button, then popup should close and image inside the canvas should be deleted', () => {
|
@@ -192,7 +192,7 @@ const tests = {
|
|
192
192
|
backgroundImageUploadComponent.steps.clickOnDeleteButtonInDeleteImagePopup();
|
193
193
|
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
194
194
|
utilities.verifyInnerText(backgroundImageUploadComponent.noFileChosenLabel(), 'No file chosen');
|
195
|
-
|
195
|
+
imageCanvasComponent.steps.verifyCanvasImageNotExist();
|
196
196
|
});
|
197
197
|
}
|
198
198
|
}
|
@@ -86,10 +86,16 @@ const steps = {
|
|
86
86
|
createQuestionBasePage.previewTab()
|
87
87
|
.should('have.attr', 'aria-selected', 'false');
|
88
88
|
},
|
89
|
-
|
89
|
+
|
90
|
+
verifySavedSuccessfullySnackbar: () => {
|
91
|
+
commonComponents.snackbar()
|
92
|
+
.should('have.text', 'Saved successfully!')
|
93
|
+
.should('be.visible');
|
94
|
+
},
|
95
|
+
|
90
96
|
clickOnCancelButton: () => {
|
91
97
|
createQuestionBasePage.cancelButton()
|
92
|
-
|
98
|
+
.click();
|
93
99
|
}
|
94
100
|
}
|
95
101
|
|
@@ -287,6 +287,12 @@ const steps = {
|
|
287
287
|
.type('{backspace}');
|
288
288
|
},
|
289
289
|
|
290
|
+
enterTextInPredefinedTextInputField: (predefinedText) => {
|
291
|
+
essayResponseCommonComponents.predefinedTextInputField()
|
292
|
+
.type(predefinedText)
|
293
|
+
.should('have.text', predefinedText);
|
294
|
+
},
|
295
|
+
|
290
296
|
verifyGradingViewResponseFieldIsNonEditable: () => {
|
291
297
|
essayResponseCommonComponents.responseField()
|
292
298
|
.should('have.attr', 'contenteditable', 'false');
|
@@ -143,6 +143,19 @@ const steps = {
|
|
143
143
|
fillInTheGapsCommonComponents.previewTabCorrectAnswerResponseWrapper()
|
144
144
|
.should('have.length', correctAnswerArray.length);
|
145
145
|
},
|
146
|
+
|
147
|
+
setPlaceholderText: (placeholder) => {
|
148
|
+
fillInTheGapsCommonComponents.placeholderTextInputField()
|
149
|
+
.type(placeholder)
|
150
|
+
.should('have.value', placeholder);
|
151
|
+
},
|
152
|
+
|
153
|
+
setResponseContainerHeight: (height) => {
|
154
|
+
fillInTheGapsCommonComponents.heightInputField()
|
155
|
+
.type(height)
|
156
|
+
.should('have.value', height)
|
157
|
+
.blur();
|
158
|
+
}
|
146
159
|
}
|
147
160
|
|
148
161
|
const tests = {
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import utilities from "../../support/helpers/utilities";
|
2
|
+
|
3
|
+
const selectors = {
|
4
|
+
correctAnswersNumeration: () => cy.get('[class*="__AnswerCell"] .answer-numeration-number-box'),
|
5
|
+
correctAnswersOptions: () => cy.get('[class*="__AnswerWrapper"] .question-text-wrapper'),
|
6
|
+
correctAnswersLabel: () => cy.get('.correct-answers-label'),
|
7
|
+
tickIconWrapper: () => cy.get('.tick-icon-wrapper'),
|
8
|
+
correctAnswerContainer: () => cy.get('.dnd-correct-answer-wrapper'),
|
9
|
+
correctIncorrectAnswerLabel: () => cy.get('[class*="CorrectIncorrectLabel"]'),
|
10
|
+
}
|
11
|
+
|
12
|
+
const steps = {
|
13
|
+
/**
|
14
|
+
*@description Verifies the correctness of answer responses in the correct answer section, including the count.
|
15
|
+
* @param {string[][]} correctAnswerArray An array of arrays, each containing the expected answer options for a specific correct answer section.
|
16
|
+
*/
|
17
|
+
verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount: (correctAnswerArray) => {
|
18
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropCommonComponents.correctAnswersOptions(), correctAnswerArray.length);
|
19
|
+
correctAnswerArray.forEach((correctAnswer, index) => {
|
20
|
+
utilities.verifyTextContent(utilities.getNthElement(fillInTheGapsDragAndDropCommonComponents.correctAnswersNumeration(), index), index + 1);
|
21
|
+
correctAnswer.forEach((answerOption) => {
|
22
|
+
utilities.verifyTextContent(utilities.getNthElement(fillInTheGapsDragAndDropCommonComponents.correctAnswersOptions(), index), answerOption);
|
23
|
+
});
|
24
|
+
});
|
25
|
+
},
|
26
|
+
|
27
|
+
verifyCorrectAnswerSectionNotExists: () => {
|
28
|
+
utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropCommonComponents.correctAnswerContainer(), 'notExist');
|
29
|
+
},
|
30
|
+
}
|
31
|
+
|
32
|
+
const tests = {
|
33
|
+
|
34
|
+
}
|
35
|
+
|
36
|
+
export const fillInTheGapsDragAndDropCommonComponents = {
|
37
|
+
...selectors,
|
38
|
+
steps,
|
39
|
+
tests
|
40
|
+
}
|