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.
Files changed (107) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  3. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +4 -5
  4. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +64 -3
  5. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  6. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
  7. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  9. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  18. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
  19. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  20. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
  21. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  22. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  23. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  24. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  25. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  26. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  27. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  28. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  29. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
  30. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
  31. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +251 -0
  32. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  33. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
  34. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  35. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
  36. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  37. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
  38. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  39. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +530 -0
  40. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  41. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +119 -0
  42. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +263 -0
  43. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  44. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  45. package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
  46. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  47. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
  48. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  49. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  50. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  51. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
  52. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
  53. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
  54. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
  55. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
  56. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
  57. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
  58. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
  59. package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
  60. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +2 -2
  61. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.smoke.js +179 -0
  62. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
  63. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
  64. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
  65. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
  66. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
  67. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
  68. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  69. package/cypress/fixtures/constants.js +1 -1
  70. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  71. package/cypress/fixtures/theme/ilc.json +16 -16
  72. package/cypress/pages/audioPlayerPage.js +55 -543
  73. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  74. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  75. package/cypress/pages/components/autoScoredStudentViewSettings.js +4 -4
  76. package/cypress/pages/components/commonComponents.js +1 -0
  77. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  78. package/cypress/pages/components/equationEditorFlyout.js +3 -2
  79. package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
  80. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
  81. package/cypress/pages/components/imageCanvasComponent.js +2 -1
  82. package/cypress/pages/components/index.js +1 -0
  83. package/cypress/pages/components/optionsWrapperComponent.js +11 -0
  84. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
  85. package/cypress/pages/components/toolSettingsComponent.js +6 -0
  86. package/cypress/pages/contentBlocksPage.js +2 -2
  87. package/cypress/pages/createItemPage.js +29 -0
  88. package/cypress/pages/dialogBoxBase.js +2 -2
  89. package/cypress/pages/drawingResponsePage.js +23 -4
  90. package/cypress/pages/feedbackScalePage.js +3 -0
  91. package/cypress/pages/graphingPage.js +18 -0
  92. package/cypress/pages/gridFillPage.js +18 -2
  93. package/cypress/pages/index.js +1 -1
  94. package/cypress/pages/itemPreviewSettingsPage.js +4 -0
  95. package/cypress/pages/listOrderingPage.js +122 -647
  96. package/cypress/pages/matchingPage.js +1 -1
  97. package/cypress/pages/multipleSelectionPage.js +23 -1
  98. package/cypress/pages/numberLinePage.js +1196 -59
  99. package/cypress/pages/rulerPage.js +6 -2
  100. package/cypress/pages/textSelectionPage.js +460 -22
  101. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +3 -107
  102. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -2
  103. package/cypress/support/migrationHelpers/migrationScript.js +0 -13
  104. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +6 -106
  105. package/package.json +2 -2
  106. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
  107. 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, response count, response field properties from question ${index}`);
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, response count, response field properties from question ${index}`);
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, fillInTheGapsDropdownPage } from "../../pages";
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
- cy.get('[class*="QuestionTypeWrapper"]')
50
- .then(($questionInstructions) => {
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 &nbsp; and &ZeroWidthSpace;
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-figDropdown-5a8309d.0",
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
+ }