itemengine-cypress-automation 1.0.181-figDropdown-5a8309d.0 → 1.0.181
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +4 -5
- package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +64 -3
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
- package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +251 -0
- package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
- package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
- package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
- package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/LayoutSection.js +530 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +119 -0
- package/cypress/e2e/ILC/NumberLine/numberLineSection.js +263 -0
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
- package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
- package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.smoke.js +179 -0
- package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
- package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
- package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
- package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
- package/cypress/fixtures/constants.js +1 -1
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
- package/cypress/fixtures/theme/ilc.json +16 -16
- package/cypress/pages/audioPlayerPage.js +55 -543
- package/cypress/pages/brainingCampManipulativePage.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +4 -4
- package/cypress/pages/components/commonComponents.js +1 -0
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/equationEditorFlyout.js +3 -2
- package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
- package/cypress/pages/components/imageCanvasComponent.js +2 -1
- package/cypress/pages/components/index.js +1 -0
- package/cypress/pages/components/optionsWrapperComponent.js +11 -0
- package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
- package/cypress/pages/components/toolSettingsComponent.js +6 -0
- package/cypress/pages/contentBlocksPage.js +2 -2
- package/cypress/pages/createItemPage.js +29 -0
- package/cypress/pages/dialogBoxBase.js +2 -2
- package/cypress/pages/drawingResponsePage.js +23 -4
- package/cypress/pages/feedbackScalePage.js +3 -0
- package/cypress/pages/graphingPage.js +18 -0
- package/cypress/pages/gridFillPage.js +18 -2
- package/cypress/pages/index.js +1 -1
- package/cypress/pages/itemPreviewSettingsPage.js +4 -0
- package/cypress/pages/listOrderingPage.js +122 -647
- package/cypress/pages/matchingPage.js +1 -1
- package/cypress/pages/multipleSelectionPage.js +23 -1
- package/cypress/pages/numberLinePage.js +1196 -59
- package/cypress/pages/rulerPage.js +6 -2
- package/cypress/pages/textSelectionPage.js +460 -22
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +3 -107
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -2
- package/cypress/support/migrationHelpers/migrationScript.js +0 -13
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +6 -106
- package/package.json +2 -2
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
@@ -483,7 +483,7 @@ export const extractLrnQuestionData = {
|
|
483
483
|
|
484
484
|
figText: (lrnQuestionDataArr, index) => {
|
485
485
|
let obj = {};
|
486
|
-
cy.log(`Extracting the question instructions, question
|
486
|
+
cy.log(`Extracting the question instructions, question and response count from question ${index}`);
|
487
487
|
obj.questionIndex = index;
|
488
488
|
obj.questionType = 'figText';
|
489
489
|
lrnPage.steps.extractQuestionInstructions(obj, index);
|
@@ -530,7 +530,7 @@ export const extractLrnQuestionData = {
|
|
530
530
|
|
531
531
|
figTextGrading: (lrnQuestionDataArr, index) => {
|
532
532
|
let obj = {};
|
533
|
-
cy.log(`Extracting the question instructions, question
|
533
|
+
cy.log(`Extracting the question instructions, question and response count from question ${index}`);
|
534
534
|
obj.questionIndex = index;
|
535
535
|
obj.questionType = 'figText';
|
536
536
|
lrnPage.steps.extractQuestionInstructions(obj, index);
|
@@ -794,111 +794,7 @@ export const extractLrnQuestionData = {
|
|
794
794
|
obj.correctAnswers = correctAnswers;
|
795
795
|
});
|
796
796
|
lrnGradingDataArr.push(obj);
|
797
|
-
}
|
798
|
-
|
799
|
-
figDropdown: (lrnQuestionDataArr, index) => {
|
800
|
-
let obj = {};
|
801
|
-
cy.log(`Extracting the question instructions, question and response count from question ${index}`);
|
802
|
-
obj.questionIndex = index;
|
803
|
-
obj.questionType = 'figDropdown';
|
804
|
-
lrnPage.steps.extractQuestionInstructions(obj, index);
|
805
|
-
lrnPage.questionWrapper()
|
806
|
-
.eq(index)
|
807
|
-
.within(() => {
|
808
|
-
lrnPage.questionContainerPreviewTab()
|
809
|
-
.then(($question) => {
|
810
|
-
let innerText = $question[0].innerText;
|
811
|
-
innerText = innerText.replace(/\n/g, '');
|
812
|
-
//getting rid of the and ​
|
813
|
-
innerText = innerText.replace(/\u00a0/g, ' ');
|
814
|
-
innerText = innerText.replace(/\u200b/g, '');
|
815
|
-
innerText = innerText.trim()
|
816
|
-
obj.previewQuestion = innerText;
|
817
|
-
});
|
818
|
-
lrnPage.clozeResponse()
|
819
|
-
.then(($responseFields) => {
|
820
|
-
obj.previewResponseCount = $responseFields.length;
|
821
|
-
});
|
822
|
-
let responses = [];
|
823
|
-
lrnPage.clozeResponse()
|
824
|
-
.each(($responseField) => {
|
825
|
-
let responseObj = {}
|
826
|
-
responseObj.placeholder = $responseField[0].placeholder;
|
827
|
-
responseObj.spellcheck = $responseField[0].spellcheck;
|
828
|
-
// responseObj.ariaLabel = $responseField[0].ariaLabel;
|
829
|
-
responses.push(responseObj);
|
830
|
-
});
|
831
|
-
obj.responses = responses;
|
832
|
-
let allDropdownOptions = [];
|
833
|
-
lrnPage.clozeResponse()
|
834
|
-
.each(($element) => {
|
835
|
-
let currentOptions = [];
|
836
|
-
cy.wrap($element)
|
837
|
-
.find('[role="option"]')
|
838
|
-
.each(($element, index) => {
|
839
|
-
if (index !== 0) {
|
840
|
-
let innerText = $element[0].innerText;
|
841
|
-
currentOptions.push(innerText);
|
842
|
-
}
|
843
|
-
}).then(() => {
|
844
|
-
allDropdownOptions.push(currentOptions);
|
845
|
-
});
|
846
|
-
});
|
847
|
-
obj.allDropdownOptions = allDropdownOptions;
|
848
|
-
});
|
849
|
-
lrnQuestionDataArr.push(obj);
|
850
|
-
},
|
851
|
-
|
852
|
-
figDropdownGrading: (lrnQuestionDataArr, index) => {
|
853
|
-
let obj = {};
|
854
|
-
cy.log(`Extracting the question instructions, question and response count from question ${index}`);
|
855
|
-
obj.questionIndex = index;
|
856
|
-
obj.questionType = 'figDropdown';
|
857
|
-
lrnPage.steps.extractQuestionInstructions(obj, index);
|
858
|
-
lrnPage.questionWrapper()
|
859
|
-
.eq(index)
|
860
|
-
.within(() => {
|
861
|
-
lrnPage.questionContainerPreviewTab()
|
862
|
-
.then(($question) => {
|
863
|
-
let innerText = $question[0].innerText;
|
864
|
-
innerText = innerText.replace(/\n/g, '');
|
865
|
-
//getting rid of the and ​
|
866
|
-
innerText = innerText.replace(/\u00a0/g, ' ');
|
867
|
-
innerText = innerText.replace(/\u200b/g, '');
|
868
|
-
innerText = innerText.trim()
|
869
|
-
obj.previewQuestion = innerText;
|
870
|
-
});
|
871
|
-
cy.get('.lrn_clozedropdown_answer')
|
872
|
-
.then(($responseFields) => {
|
873
|
-
obj.previewResponseCount = $responseFields.length;
|
874
|
-
});
|
875
|
-
let correctAnswers = [];
|
876
|
-
cy.get('.lrn_correctAnswerList li')
|
877
|
-
.each(($answers) => {
|
878
|
-
let answerData = {}
|
879
|
-
cy.wrap($answers)
|
880
|
-
.within(() => {
|
881
|
-
cy.get('.lrn_responseIndex')
|
882
|
-
.then(($element) => {
|
883
|
-
let answerNumeration = $element[0].innerText;
|
884
|
-
answerData.answerNumeration = answerNumeration;
|
885
|
-
});
|
886
|
-
let options = []
|
887
|
-
cy.get('.lrn_responseText')
|
888
|
-
.each(($option) => {
|
889
|
-
let optionData = {}
|
890
|
-
let innerText = $option[0].innerText;
|
891
|
-
optionData.innerText = innerText;
|
892
|
-
options.push(optionData);
|
893
|
-
});
|
894
|
-
answerData.options = options
|
895
|
-
});
|
896
|
-
correctAnswers.push(answerData);
|
897
|
-
});
|
898
|
-
obj.correctAnswers = correctAnswers;
|
899
|
-
});
|
900
|
-
lrnQuestionDataArr.push(obj);
|
901
|
-
},
|
797
|
+
}
|
902
798
|
|
903
799
|
/* singleSelection: (lrnQuestionDataArr, index) => {
|
904
800
|
let obj = {};
|
@@ -13,8 +13,7 @@ const lrnQuestionTypesENUM = {
|
|
13
13
|
shortTextResponse: 'Short text',
|
14
14
|
uploadResponse: 'File upload',
|
15
15
|
figDragAndDrop: 'Cloze with drag & drop',
|
16
|
-
contentBlocks: 'Passage'
|
17
|
-
figDropdown: 'Cloze with drop down'
|
16
|
+
contentBlocks: 'Passage'
|
18
17
|
}
|
19
18
|
|
20
19
|
export default lrnQuestionTypesENUM;
|
@@ -9,7 +9,6 @@ const migrationQuestionTypes = Cypress.env('migrationQuestionTypes');//["textEnt
|
|
9
9
|
const migrationQuestionTypesLrn = migrationQuestionTypes.map((questionType) => lrnQuestionTypesENUM[questionType]);
|
10
10
|
let lrnMcqTypesRegex = /Multiple choice – standard|Multiple choice – multiple response|True or false|Multiple choice – block layout/;
|
11
11
|
let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
12
|
-
let lrnFigDropdownRegex = /Cloze with drop down|Cloze dropdown/
|
13
12
|
|
14
13
|
|
15
14
|
let lrnQuestionDataArr = [];
|
@@ -29,7 +28,6 @@ const extractLrnPreviewData = (currQuestionType, lrnQuestionDataArr, index) => {
|
|
29
28
|
case lrnQuestionTypesENUM.uploadResponse: return extractLrnQuestionData.uploadResponse(lrnQuestionDataArr, index);
|
30
29
|
case lrnQuestionTypesENUM.figDragAndDrop: return extractLrnQuestionData.figDragAndDrop(lrnQuestionDataArr, index);
|
31
30
|
case lrnQuestionTypesENUM.contentBlocks: return extractLrnQuestionData.contentBlocks(lrnQuestionDataArr, index);
|
32
|
-
case lrnQuestionTypesENUM.figDropdown: return extractLrnQuestionData.figDropdown(lrnQuestionDataArr, index);
|
33
31
|
default: throw new Error('Invalid lrn question type');
|
34
32
|
}
|
35
33
|
}
|
@@ -48,7 +46,6 @@ const verifyIePreviewData = (questionType, questionData, index) => {
|
|
48
46
|
case 'uploadResponse': return verifyIeQuestionData.uploadResponse(questionData, index);
|
49
47
|
case 'figDragAndDrop': return verifyIeQuestionData.figDragAndDrop(questionData, index);
|
50
48
|
case 'contentBlocks': return verifyIeQuestionData.contentBlocks(questionData, index);
|
51
|
-
case 'figDropdown': return verifyIeQuestionData.figDropdown(questionData, index);
|
52
49
|
default: throw new Error('Invalid ngie question type');
|
53
50
|
}
|
54
51
|
}
|
@@ -65,9 +62,7 @@ const extractLrnGradingData = (currQuestionType, lrnGradingDataArr, index) => {
|
|
65
62
|
case lrnQuestionTypesENUM.figDragAndDrop: return extractLrnQuestionData.figDragAndDropGrading(lrnGradingDataArr, index);
|
66
63
|
case lrnQuestionTypesENUM.essayResponse: return cy.log('Manually Graded Question Type');
|
67
64
|
case lrnQuestionTypesENUM.essayResponseBasic: return cy.log('Manually Graded Question Type');
|
68
|
-
case lrnQuestionTypesENUM.drawingResponse: return cy.log('Manually Graded Question Type');
|
69
65
|
case lrnQuestionTypesENUM.contentBlocks: return cy.log('Resource and tool');
|
70
|
-
case lrnQuestionTypesENUM.figDropdown: return extractLrnQuestionData.figDropdownGrading(lrnGradingDataArr, index);
|
71
66
|
default: throw new Error('Invalid lrn question type');
|
72
67
|
}
|
73
68
|
}
|
@@ -85,8 +80,6 @@ const verifyIeGradingData = (questionType, questionData, index) => {
|
|
85
80
|
case 'contentBlocks': return cy.log('Resource and tool');
|
86
81
|
case 'essayResponse': return cy.log('Manually Graded Question Type');
|
87
82
|
case 'essayResponseBasic': return cy.log('Manually Graded Question Type');
|
88
|
-
case 'drawingResponse': return cy.log('Manually Graded Question Type');
|
89
|
-
case 'figDropdown': return verifyIeQuestionData.figDropdownGrading(questionData, index);
|
90
83
|
default: throw new Error('Invalid ngie question type');
|
91
84
|
}
|
92
85
|
}
|
@@ -130,9 +123,6 @@ export const migrationScript = (referenceIds) => {
|
|
130
123
|
;
|
131
124
|
currQuestionType = lrnQuestionTypesENUM.essayResponse;
|
132
125
|
}
|
133
|
-
if (lrnFigDropdownRegex.test(currQuestionType)) {
|
134
|
-
currQuestionType = lrnQuestionTypesENUM.figDropdown;
|
135
|
-
}
|
136
126
|
if (migrationQuestionTypesLrn.includes(currQuestionType)) {
|
137
127
|
extractLrnPreviewData(currQuestionType, lrnQuestionDataArr, index)
|
138
128
|
}
|
@@ -164,9 +154,6 @@ export const migrationScript = (referenceIds) => {
|
|
164
154
|
if (migrationQuestionTypesLrn.includes(currQuestionType)) {
|
165
155
|
extractLrnGradingData(currQuestionType, lrnGradingDataArr, index);
|
166
156
|
}
|
167
|
-
if (migrationQuestionTypesLrn.includes(currQuestionType)) {
|
168
|
-
currQuestionType = lrnQuestionTypesENUM.figDropdown;
|
169
|
-
}
|
170
157
|
});
|
171
158
|
}
|
172
159
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { essayResponsePage, fillInTheGapsDragAndDropPage, contentBlocksPage, fillInTheGapsTextPage, multipleSelectionPage, textEntryMathPage, uploadResponsePage
|
1
|
+
import { essayResponsePage, fillInTheGapsDragAndDropPage, contentBlocksPage, fillInTheGapsTextPage, multipleSelectionPage, textEntryMathPage, uploadResponsePage } from "../../pages";
|
2
2
|
import { draggableOptionContainer, fillInTheGapsDragAndDropCommonComponents } from "../../pages/components";
|
3
3
|
import { singleSelectionPage } from "../../pages/singleSelectionPage"
|
4
4
|
import utilities from "../helpers/utilities";
|
@@ -45,16 +45,11 @@ export const iePage = {
|
|
45
45
|
questionInstructions = questionInstructions.replace(/00:00\n\/\n00:00\n/g, '');
|
46
46
|
expect(questionInstructions).to.be.eq(expectedQuestionData.previewQuestionInstructions)
|
47
47
|
});
|
48
|
+
} else if (expectedQuestionData.previewQuestionInstructions === '') {
|
49
|
+
utilities.verifyInnerText(singleSelectionPage.questionInstructionsText(), '');
|
48
50
|
} else {
|
49
|
-
|
50
|
-
.
|
51
|
-
if ($questionInstructions[0].innerHTML.includes('question-instruction')) {
|
52
|
-
utilities.verifyInnerText(singleSelectionPage.questionInstructionsText(), '');
|
53
|
-
} else {
|
54
|
-
singleSelectionPage.questionInstructionsText()
|
55
|
-
.should('not.exist');
|
56
|
-
}
|
57
|
-
});
|
51
|
+
singleSelectionPage.questionInstructionsText()
|
52
|
+
.should('not.exist');
|
58
53
|
}
|
59
54
|
}
|
60
55
|
}
|
@@ -748,102 +743,7 @@ export const verifyIeQuestionData = {
|
|
748
743
|
});
|
749
744
|
});
|
750
745
|
});
|
751
|
-
}
|
752
|
-
|
753
|
-
figDropdown: (expectedQuestionData, index) => {
|
754
|
-
cy.get('.ngie-cloze-with-dropdown')
|
755
|
-
.eq(index)
|
756
|
-
.within(() => {
|
757
|
-
iePage.steps.verifyQuestionInstructions(expectedQuestionData);
|
758
|
-
//Unable to verify question container as dropdown options also appear in expectedQuestionData object
|
759
|
-
/* fillInTheGapsDropdownPage.questionContainerPreviewTab()
|
760
|
-
.then(($question) => {
|
761
|
-
let innerText = $question[0].innerText;
|
762
|
-
innerText = innerText.replace(/\n/g, '');
|
763
|
-
//getting rid of the and ​
|
764
|
-
innerText = innerText.replace(/\u00a0/g, ' ');
|
765
|
-
innerText = innerText.replace(/\u200b/g, '');
|
766
|
-
innerText = innerText.trim()
|
767
|
-
expect(expectedQuestionData.previewQuestion).to.be.include(innerText);
|
768
|
-
}); */
|
769
|
-
fillInTheGapsDropdownPage.dropdownWrapperPreviewTab()
|
770
|
-
.then(($resposneWrapper) => {
|
771
|
-
expect($resposneWrapper.length).to.be.eq(expectedQuestionData.previewResponseCount);
|
772
|
-
});
|
773
|
-
fillInTheGapsDropdownPage.dropdownWrapperPreviewTab()
|
774
|
-
.each(($responseField, index) => {
|
775
|
-
expect($responseField[0].placeholder).to.be.eq(expectedQuestionData.responses[index].placeholder);
|
776
|
-
expect($responseField[0].spellcheck).to.be.eq(expectedQuestionData.responses[index].spellcheck);
|
777
|
-
// expect($responseField[0].ariaLabel).to.be.eq(expectedQuestionData.responses[index].ariaLabel);
|
778
|
-
});
|
779
|
-
|
780
|
-
});
|
781
|
-
let allDropdownOptions = [];
|
782
|
-
for (let dropdownCount = 0; dropdownCount < expectedQuestionData.allDropdownOptions.length; dropdownCount++) {
|
783
|
-
cy.get('.ngie-cloze-with-dropdown')
|
784
|
-
.eq(index)
|
785
|
-
.within(() => {
|
786
|
-
fillInTheGapsDropdownPage.dropdownWrapperPreviewTab()
|
787
|
-
.eq(dropdownCount)
|
788
|
-
.click();
|
789
|
-
});
|
790
|
-
let currentOptions = [];
|
791
|
-
utilities.verifyElementVisibilityState(fillInTheGapsDropdownPage.dropdownList(), 'visible');
|
792
|
-
fillInTheGapsDropdownPage.dropdownListOptions()
|
793
|
-
.each(($option) => {
|
794
|
-
let optionText = $option[0].innerText;
|
795
|
-
currentOptions.push(optionText);
|
796
|
-
}).then(() => {
|
797
|
-
cy.get('body')
|
798
|
-
.click();
|
799
|
-
utilities.verifyElementVisibilityState(fillInTheGapsDropdownPage.dropdownList(), 'notExist');
|
800
|
-
allDropdownOptions.push(currentOptions);
|
801
|
-
if (allDropdownOptions.length === expectedQuestionData.allDropdownOptions.length) {
|
802
|
-
expect(allDropdownOptions.length).to.equal(expectedQuestionData.allDropdownOptions.length);
|
803
|
-
allDropdownOptions.forEach((options, index) => {
|
804
|
-
expect(options).to.deep.equal(expectedQuestionData.allDropdownOptions[index]);
|
805
|
-
});
|
806
|
-
};
|
807
|
-
});
|
808
|
-
}
|
809
|
-
},
|
810
|
-
|
811
|
-
figDropdownGrading: (expectedQuestionData, index) => {
|
812
|
-
cy.get('.ngie-cloze-with-dropdown')
|
813
|
-
.eq(index)
|
814
|
-
.within(() => {
|
815
|
-
cy.log('Here')
|
816
|
-
iePage.steps.verifyQuestionInstructions(expectedQuestionData);
|
817
|
-
//Unable to verify question container as dropdown options also appear in expectedQuestionData object
|
818
|
-
/* fillInTheGapsDropdownPage.questionContainerPreviewTab()
|
819
|
-
.then(($question) => {
|
820
|
-
let innerText = $question[0].innerText;
|
821
|
-
innerText = innerText.replace(/\n/g, '');
|
822
|
-
//getting rid of the and ​
|
823
|
-
innerText = innerText.replace(/\u00a0/g, ' ');
|
824
|
-
innerText = innerText.replace(/\u200b/g, '');
|
825
|
-
innerText = innerText.trim()
|
826
|
-
expect(expectedQuestionData.previewQuestion).to.be.include(innerText);
|
827
|
-
});*/
|
828
|
-
fillInTheGapsDropdownPage.dropdownWrapperPreviewTab()
|
829
|
-
.then(($resposneWrapper) => {
|
830
|
-
expect($resposneWrapper.length).to.be.eq(expectedQuestionData.previewResponseCount);
|
831
|
-
});
|
832
|
-
expectedQuestionData.correctAnswers.forEach((correctAnswerData, index) => {
|
833
|
-
fillInTheGapsDropdownPage.correctAnswerResponseWrapper()
|
834
|
-
.eq(index)
|
835
|
-
.within(() => {
|
836
|
-
cy.get('.answer-numeration-number-box')
|
837
|
-
.then(($answerNumeration) => {
|
838
|
-
expect($answerNumeration[0].innerText).to.be.eq(correctAnswerData.answerNumeration);
|
839
|
-
});
|
840
|
-
cy.get('.question-text-wrapper').then(($answerOption) => {
|
841
|
-
expect($answerOption[0].innerText).to.be.eq(correctAnswerData.options[0].innerText);
|
842
|
-
});
|
843
|
-
});
|
844
|
-
});
|
845
|
-
});
|
846
|
-
},
|
746
|
+
}
|
847
747
|
|
848
748
|
/* singleSelection: (expectedQuestionData, index) => {
|
849
749
|
cy.get('.ngie-single-select')
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.181
|
3
|
+
"version": "1.0.181",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -35,4 +35,4 @@
|
|
35
35
|
"node-fetch": "^3.3.2",
|
36
36
|
"react-uuid": "^2.0.0"
|
37
37
|
}
|
38
|
-
}
|
38
|
+
}
|